drawing graphics

Started by
4 comments, last by FlyingIsFun1217 16 years, 4 months ago
I am pretty new to C++ and I'm using Dev-C++. I know this is probably to early for me to be trying to figure this out but I was just wondering how I could draw graphics to the screen. Do I have to create the things (i.e. monsters, NPCs, boulders) with another program or can I do it all with C++ coding? Any help or input at all would be greatly appreciated.
Advertisement
Well, if you get really interested in it, and become proficient with the language you are using, you will use other API's (Application Programming Interfaces) to do things as you describe... sprites, lighting, that kind of stuff. If you get into 3D, you will almost assuredly use either DirectX (Windows only), or you will end up using OpenGL (which is cross-platform, windows, linux, mac).

For now, just make sure you have a solid background in the language you are using. If you don't have a good background in that language, then you end up not knowing how to do stuff right, and haphazardly throwing stuff together from examples that other people post online.

Best of luck!
FlyingIsFun1217
Thank you.
No problem ;)

FlyingIsFun1217
i never made the functions to control graphics myself, which is probably a bad thing :)

There's lots of "engines" that have such functions already coded. That sort of coding doesnt interest me so i simply use one of these.

The basics for graphics use is.

1. Create an image (for example in photoshop)
2. (code) Setup your graphics enviroment. For example i use a directX engine that handles "screen-memory" including resultion-settings, color depth etc
3. (code) Load the image using a graphics-loading function. The image is now often referred as a "texture" (or the texture is applied to a "sprite")
4. (code) use a drawing-function to put the texture/sprite on the screen.

Voila! You'll be coding tetris in notime!

I currently use
relishgames.com
but there is many engines out there if you instanlty wanna see how it works. The other path to go is to simply start making all these functions yourself. I was scared off by the directx/opengl stuff though.
Quote:Original post by suliman
I was scared off by the directx/opengl stuff though.


You'd be surprised...

The primitive stuff is actually really easy!

FlyingIsFun1217

This topic is closed to new replies.

Advertisement