Jump to content


Ready for the next step.


6 replies to this topic

#1 xISOx

    New Member

  • Members
  • PipPip
  • 28 posts

Posted 13 June 2006 - 05:49 AM

Okay, I have been playing around with console programming for a while, and now, I think I am ready to move up to larger things. (I hope :yes: )

The thing is, I have no idea where to start. I think I need something called a Windows API, but I have no idea where to get it, or how to use it.

Are there any resources that you could recommend to help me pull myself into the realm of graphical programming?

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 4780 posts
  • LocationBellevue, WA

Posted 13 June 2006 - 06:18 AM

It depends what you mean by graphical programming - do you mean writing programs that use the Windows user interface, or programs that draw 2D/3D graphics on the screen? Since this is a game programming site, I'll assume the latter B)

You don't need to know a lot about the Windows API to write graphics code; in fact, if you use something like GLUT or SDL, you won't need to touch the Windows API at all; otherwise, head on over to http://nehe.gamedev.net and look at the Windows version of lesson 1 to see how to get a basic OpenGL window on the screen.

In general, to develop for Windows, you'll need the Windows Platform SDK to be installed for your compiler. This is a set of header files and libraries that enable you to write programs that interface with Windows. If you're using Visual Studio, the Platform SDK is already installed; if you're using mingw, you can download it from the mingw site. Then all you need to do is set up your compiler to link with the Windows libraries (again, in Visual Studio this is done for you), #include <windows.h>, and then search on the Web for tutorials about how to use the API.
reedbeta.com - developer blog, OpenGL demos, and other projects

#3 xISOx

    New Member

  • Members
  • PipPip
  • 28 posts

Posted 13 June 2006 - 06:56 AM

Is OpenGL what I want?

I thought DirectX was better for making games and such.

#4 Reedbeta

    DevMaster Staff

  • Administrators
  • 4780 posts
  • LocationBellevue, WA

Posted 13 June 2006 - 03:47 PM

They're essentially equivalent in capabilities. Once you learn how to use one, you can easily learn the other.

The links I posted were all OpenGL-related because that's what I personally use. However it's fine to start using Direct3D instead, I just don't have any links for you in that case. B)
reedbeta.com - developer blog, OpenGL demos, and other projects

#5 bignobody

    Valued Member

  • Members
  • PipPipPip
  • 155 posts

Posted 13 June 2006 - 04:12 PM

http://www.drunkenhy...-bin/directx.pl

Aims to be the "spiritual companion" to NeHe, but for DX.

Regards,
-bignobody
notsoftgames.com - Creator of Shlongg!

#6 Jack9

    Member

  • Members
  • PipPip
  • 37 posts

Posted 13 June 2006 - 08:00 PM

I guess I would be considered the typical programmer. My graphics largely consist of boxes and sometimes the odd rounded corner. I like textures because they allow my boxes to look pretty. I've never really bothered to get into 3D, especially after discovering the complexity of dealing with 2D.

If you want to learn about the Windows API, I think VB or RealBasic teaches plenty in a short time. You can quickly learn how Windows abstracts a lot of the events and visual elements that people are familiar with. This becomes useful later, when you're trying to conceptualize visual classes. The events are near universal. If you want to learn about the Windows API you might want to look up MFC (Microsoft Foundation Classes - http://www.techtutorials.info/mfc.html).

SDL and OGL and DirectX are nice for fine control, but are they really what you would recommend most people start with? I think that's counterproductive in most cases. I would suggest that someone move on from understanding how to play with basic elements, to buffered drawing using an abstraction like HGE (C++) or Pygame (Python) or what-have-you. Pick a language you like.

The prototype of my pygame project is roughly:

Main()
{
init()
main_loop()
while(1)
{
for each in event_que
{
handle(each) // or switch on each
}
draw_buffer(assemble_visuals()) // called "flipping"
}
}

create_visuals()
{
new_buffer
for each_object in game
{
draw_to_buffer(object.get_visual(), buf)
}
return buf
}

#7 monjardin

    Senior Member

  • Members
  • PipPipPipPip
  • 1033 posts

Posted 13 June 2006 - 08:13 PM

I'm a big fan of SDL. PyGame is wrapped around SDL, right?

Since noone has mentioned it, everything you could ever want to know about the Win32 API (and then some) is here: http://msdn.microsoft.com
As has been discussed here and here, you are probably better off searching it with google. However, Microsoft is trying to improve their dismal MSDN search. ;)
monjardin's JwN Meter (1,2,3,4,5,6):
|----|----|----|----|----|----|----|----|----|----|
*





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users