Skip to main content
GameDev.net gamedev.net
🔒 Locked

Trying to program a game...

Started by Sly Cat Nov 20, 2011 at 11:26 PM 1 replies 1.3k views
Original Post
Sly Cat
Sly Cat
I'm trying to program a computer game. For example, the game gives a robot a random amount of health and you get a weapon which deals 100 damage. You can choose to attack or retreat (quit) after each attack. Now so far I've only been programming using C++ in the black console screen and I wanted to know how I can take that program and make characters and make a real game. It doesn't have to be anything fancy it can even be 2D... I just wanted to know how.
alvaro
alvaro
In order to make graphics with C++, you need to use a library, like Allegro. Just download it, read some of the documentation and play with it for a little while. There is a lot to learn, but you can go slowly.
Synthesizer
Synthesizer

I'm trying to program a computer game. For example, the game gives a robot a random amount of health and you get a weapon which deals 100 damage. You can choose to attack or retreat (quit) after each attack. Now so far I've only been programming using C++ in the black console screen and I wanted to know how I can take that program and make characters and make a real game. It doesn't have to be anything fancy it can even be 2D... I just wanted to know how.


Well, you could try DirectX (c++) or XNA (c#, which is similar to C++ without pointers & some other stuff).
Here you can find nice tutorials which lead you from the beginning:
http://www.riemers.net/

(you can find XNA & DirectX tutorials on the right part of the page. You can also compare & see that it's not so different one from the other). XNA is a wrapper around Direct X which lets u make some things easier. Direct X is a multimedia component which includes solutions for you to handle networking, sounds, graphics, inputs, etc (so u don't have to write evrth in assembly, like in the old times when loading a simple bitmap, nor handling palettes & this kind of stuff). Appart from that, DirectX (& XNA in consecuence) work directly with hardware, which makes things faster: If you load a bitmap & work with it in a typical Windows Form, you won't get good timing results: movements will be slow & will flicker, as there are many abstraction layers beneath Windows Forms. On the other hand, DX & XNA lay almost over the hardware.

Hope this helps!
Synth

P.S.: there are more options, like OpenGL, or others, but be careful when choosing: it's not all about graphics, but input, sound, etc. etc. so be sure this libraries cover this areas as well.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.