Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


anyone in my shoes?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
15 replies to this topic

#1 Mr_Confused   Members   -  Reputation: 122

Like
Likes
Like

Posted 10 February 2002 - 11:31 PM

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).

Sponsor:

#2 Beast Master   Members   -  Reputation: 122

Like
Likes
Like

Posted 10 February 2002 - 11:51 PM

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 ...

#3 granat   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 February 2002 - 02:16 AM



//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...

#4 granat   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 February 2002 - 02:20 AM

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
}

#5 siaspete   Members   -  Reputation: 208

Like
Likes
Like

Posted 12 February 2002 - 02:26 AM

Granat, use an enum! ;-)

- Pete

#6 matrix2113   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 February 2002 - 11:25 AM

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

#7 siaspete   Members   -  Reputation: 208

Like
Likes
Like

Posted 13 February 2002 - 12:15 AM

Not for health, for state. Jeez.

#8 mickey   Members   -  Reputation: 100

Like
Likes
Like

Posted 13 February 2002 - 01:24 AM

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)....

#9 Mr_Confused   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 February 2002 - 01:50 AM

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.

#10 Lazarus404   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 February 2002 - 02:55 AM

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

#11 Mr_Confused   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 February 2002 - 03:20 AM

Thanks Lazarus404 for your advice.

I have decided not to use C++ for games just yet. I''m going to be using VB, so I probably will use Revolution3D to teach myself, but probably make a basic 3D engine, cos i''ve got a friend who knows VB and DX really well.

Thanks anyway, but I won''t be using DarkBasic as its absolutely, completely, without a doubt, the biggest piece of crap in the history of the world. Granted it does teach you how to make games, but not what goes into it because its commands are like: make_quake_3_clone(); And the frame rates are crap as well. Also the games are so slow its unbelievable that its a commercial product.

#12 siaspete   Members   -  Reputation: 208

Like
Likes
Like

Posted 13 February 2002 - 04:00 AM

Mr_Confused,

I have not forgotten what it was like to be a beginner. I would say that all programmers are beginners in one way or another.

I do remember though, when a term I didn''t understand came up (like "enum") I would look to see what it meant, and not insult someone who was trying to help.

MSDN can tell you, as will a google search.

I can often be very terse with my answers here, and almost as often this can be seen as rudeness, but I don''t intend it to be. I''ve got work to do so I can''t hang around on the board, but when I see someone asking something I know the answer to, I try to help.

The key to good game design is mastering the language, and knowing what tools to use for each problem you''ll find. There are tutorials all over the web, unfortunately they are more often than not for more advanced topics.

Most programmers solve problems by seeing a similarity to a problem they''ve solved before and constructing a new solution from that. If you''re a beginner to programming, then making a very simple game would be the way to start. I suggest something like Pong. It seems *too* simple, but remember that each game you make after then will be just an easy step from something you''ve done before.

- Pete

#13 granat   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 February 2002 - 07:05 AM

quote:
Original post by Mr_Confused
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.



That''s exactly why I chose not to use an enum...No need to confuse. I''m sure that in time you would learn by yourself what an enum was. Right now you need to get started.

I do think that it is a mistake to abandon C/C++ (if you want to do games).
I think you should stick with C and use a graphics wrapper such as Allegro or SDL.






#14 Jason Zelos   Members   -  Reputation: 211

Like
Likes
Like

Posted 13 February 2002 - 07:16 AM

If you still decide to use VB then check out the artices section and look for Jack Hoxley''s ''Direct X graphics for Visual Basic'' parts 1, 2 and 3. It teaches basic 3D using DX8.

,Jay

#15 Kylotan   Moderators   -  Reputation: 3338

Like
Likes
Like

Posted 13 February 2002 - 07:46 AM

quote:
Original post by Mr_Confused
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.

I disagree - I think learning your tools is equally important. Everything you do will be expressed through those tools (the language, the functions, data structures), so if you don''t understand them, you won''t be able to implement your ideas.

Now, I understand you didn''t ask about programming details, and that is fair enough. But on the whole, the two go hand-in-hand and need to be given equal consideration.



[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost ]

#16 Mr_Confused   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 February 2002 - 11:12 AM

(1) Siaspete I did not mean offense when I made the comment. It was not a personal comment about _you_, you just happened to say the right thing at the right moment. However I do fell that I didn''t explain myself properly. I did not mean that programmers forget what it is like to be a beginner in the sense that they can''t remember, I meant that beginners ask _why_ something does that, whereas experienced programmers say how do I do that. Beginners simply need a basic understanding, whereas experienced programmers need a basic explaination. I hope you understand I meant no offense.

(2) Granat I would like to say that I am not abandoning C++, I am going to be making small apps ''n'' stuff.

To everyone who keeps saying that the learning the language is important. I do not disagree, but as Granat said, "Right now you need to get started" and he is exactly right. I do not need to learn the language to a huge extent I just need get started. Thanks Granat you''ve been really helpful.

Thank you to everyone who has replied to this post, all the info gathered has been really useful. Thanks.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS