Advertisement

anyone in my shoes?

Started by February 11, 2002 05:31 AM
14 comments, last by Mr_Confused 22 years, 7 months ago
I would like to know if there are any beginners to game programming who are learning C++ and finding it easy but are daunted by the task of making a whole game in it? or even just one level! What I mean is, I''m learning C++ (and finding it quite easy - I''ve had programming experience in Perl, PHP, java-script and a little Java, might be why). The way I''m going I feel that making a small game (probably just one level) wouldn''t be too difficult (window for critiscism) but I am unsure of what I would need to put into the game - like graphics, ai, simple loops! I know how to program some of this stuff, but I am unsure of what goes into a game. I know I waffle on, but to sum up: (1) I can program C++, but am still learning (2) I am unsure of what goes into a game. Question: are there any articles or preferably books that could tell me how or what is need to program a game. Finally, I have never programmed a game before - even in BASIC (tried, got bored of crappy results capable in BASIC).
---------------------------------------------------------Until you've failed, you don't know what success is.
First,
I think I understand somehow what you are trying to say.

Second,
you are already on the right web site.

Look at the "For Beginner" section,
there they guide you through.

Hope you''ll get started ...
Advertisement


//this is a simple gameloop


  while (true){  GetInputFromPlayer();  UpdatePlayer();  UpdateEnemies();  DrawBackground();  DrawPlayer();  DrawEnemies();  FlipBackBufferToFront();}  


What do you need to know ?

1. How to get graphics to the screen (GDI or DirectX)

2. How to manage datastructures such as "structs" or "classes" and "linked lists".

The rest is merely logical thinking...
-------------Ban KalvinB !
Each enemy or player can be given certain states to let your program know what to do with them..

For example..

int PlayerState; //0=Alive, 1=Dying, 2=Dead

If the player is dying then don''t do anything with the keyboard input from the player.


int PlayerHealth; //0 = dead, 100 = Full health

if (PlayerHealth <= 0)
{
PlayerState = 1; //player is now dying
}
-------------Ban KalvinB !
Granat, use an enum! ;-)

- Pete
quote: Original post by siaspete
Granat, use an enum! ;-)


  enum health {dead, dying, alive};health playerHealth;if (playerHealth == dead){...}if (playerHealth == dying){...}  


"I''ve learned something today: It doesn''t matter if you''re white, or if you''re black...the only color that REALLY matters is green"
-Peter Griffin
"I've learned something today: It doesn't matter if you're white, or if you're black...the only color that really matters is green"-Peter Griffin
Advertisement
Not for health, for state. Jeez.
matrix, do we really need to declare another instance of health? ie, health playerHealth?
i mean, we could also use health right?
ie, if(health == death)....
http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
Thanks Granat, you hit the nail on the head.

I know the basics of programming, and learning a new langugage isn''t a problem, its learning what needs to go into a game, and your simplified game loop helps a lot.

I also would like to say thanks to Siaspete who provided me with a perfect example of how the game developing community thinks. They have all forgotten what it is like to be a beginner. For a start I barely understand what an enum is; I know it is a data type, but thats it. They think that beginners, game beginners anyway, need to learn functions, datastructures and languages to make games, when infact they need to undertand how to make a game, i.e. what goes in.

Also, thanks Beast Master, but the beginners section sucks. Its full of people who have no idea of how to teach people, and infact they could probably use a few lessons themselves.

Finally if anyone knows of any online, or offline (books), resources about the basics of game making, similar to Granats post, I would be very grateful.
---------------------------------------------------------Until you've failed, you don't know what success is.
If you''re unsure of what needs to go into a game coding wise, then start off using a 3D engine and community. Personally, I think you should lay off of C++, at least for your first three or four games, and instead, use something like darkBasic (www.darkbasic.com), or, if you''re more adventurous than that, check out Revolution3D, which you can program with in both Visual BASIC and C++. At least by using these programs/dll''s you can download sample code that shows you how to do stuff.

For Gods sake, if your new to C++ and games programming, start at the beginning, else you may lose interest and give up, without experiencing the joys of building a successful game.

And remember, good graphics and speed are not the only thing that make a good game!


Lazarus404
Lazarus404

This topic is closed to new replies.

Advertisement