Sign in to follow this  

drawing graphics

Recommended Posts

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.

Share this post

Link to post
Share on other sites
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!

Share this post

Link to post
Share on other sites
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
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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this