I'm trying to learn all I can about game programming but I still can't grasp one concept. That is, how does one put code with graphics? Or does it even work that way? I've always been confused about that.

Thanks!

Graphics are just blocks of data that get read in by code and then get displayed using libraries like OpenGL or DirectX or what ever else you choose to use.

If you were to do something with graphics I would suggest just making a box that is colored through the code (ie glColor3f(r, g, b) ) then once you figure that out and understand whats going on, try to use texture mapping bringing in images.

Not sure if you mean graphics as in jpg bmp or tga files or graphics like drawing a box on the screen in general.

I'm assuming you're not looking at the right "game programming" materials if you haven't found anything on the subject of adding graphics into an application. Look at OpenGL or DirectX tutorials or documentation for how this actually works. nehe.gamedev.net has everything you need to get started on OpenGL and Microsoft should have lots of stuff on DirectX (or XNA if you like C#).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.