• Advertisement

Archived

This topic is now archived and is closed to further replies.

newbie to c++ wondering about games

This topic is 5807 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi i am im the process of learning c++ and am interested in game development i have already read several tutorial type documents about c++ loops and all the basic functions of the language and i am wondering where i should go from here to start making a game i have read all of the documents on this website that have titles that would possibly explain how to begin making a game, but nothing really says how all of the documents suggest starting off very basic with things like tetris, which i understand and am fine with, but where would i find information on how to even start doing that? loops and everything tutorials say do not talk about the things you would need to make even the most basic game like tetris (how to have the game load the images used, assigning images to move according to keys, etc) i have done some basic programming and some other things (not too much though) before so i understand most of the concepts, but where would i at least find a list of commands or something on how to deal with say directx or something else to make simple games? i looked at some of the directx documents also but most of them dealed with specific problems or were more advanced than my current level any suggestions on what to read/do would be greatly appreciated thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
It really sounds like you should continue learning some basic programming before you continue onto game programming.

But if you insist I would start really really simple. What about trying to making a small text adventure game like in the good old days. That should challenge enough to learn a lot about programming to get you really to the challenges that come ahead. Rome wasn''t built in a day (I have programmed daily for 16 years and still have a lot to learn...)

Share this post


Link to post
Share on other sites
Games are all about data manipulation. For example, in PONG, you will have data representing your ball, the paddles, and the arena area. You will detect interactions between these data in the form of input from the user which causes their paddle to move, collision of the ball with a wall which causes a bounce (and sometimes a score), and collision of the ball with a paddle which causes the ball to deflect away from the wall. Then we just loop and wait for the ending condition. The psudocode looks something like this:

while(Player1Score < 6 && Player2Score < 6)
{
BallX += BallXVelocity;
BallY += BallYVelocity;
if(BallX < Player1PaddleX && BallY >= Player1PaddleY - HalfPaddleHeight && BallY <= Player1PaddleY + HalfPaddleHeight)
BallXVelocity = -BallXVelocity;

if(BallX <= ArenaLeftWall)
{
Player1Score++;
BallXVelocity = -BallXVelocity;
}
// repeat for right wall and increment Player2Score if necessary

// do bouncing for upper and lower walls

// do player input and move paddles (if(Player1PressedUpKey) then Player1PaddleY--, etc.)

// maybe do AI

// draw all the items (paddles, ball, score, arena...)
}
// game over. print winner and do special stuff


Hope that helps you visualize how it breaks down. Just remember to analyze what you want to do: find out how you can represent it as data and interactions. Everything else is just learning function names.

Later,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

[if you have a link proposal, email me.]

Share this post


Link to post
Share on other sites
i understand how to detect the interactions and what to do any everything you mentioned
i am just stuck with the second part of what you said, "everything else is just learning function names"

that is what my main problem is currently
i have some reference manual type things but it is all mostly explaining how a specific function would work and how to use it, not what functions are used at a given time or event to do things

i guess what i was really asking is are there any tutorial type documents that would take me through and introduce me to more functions like directdraw functions and such, rather than just posting a message on the board every time i want to do something and dont know the function name

i completely agree with felonius that i should continue learning the programming before i try to do anything too crazy, but the question is where would i continue to learn?

all the tutorials i can find talk about the same things over and over

thanks agian for any help

Share this post


Link to post
Share on other sites
You have a couple of options. I suggest you do them both, but whatever order you want to do them in is fine.

First: There is a almost complete tutorial on this site in aspecial forum called Hands-On Interactive Game Developement. It is currently innactive, because the guy is no longer around, but is still full of all the original questions and answers as well as the tutorial information. It takes you step by step through the process to make a Tetris clone.

Second: Buy Tricks of the Windows Game Programming Gurus by Andre LaMothe. It is very informative and if you have a basic grasp of C or C++ it is a good book to learn game programming in general as well as for Windows.

---
Make it work.
Make it fast.

"Commmmpuuuuterrrr.." --Scotty Star Trek IV:The Voyage Home

Share this post


Link to post
Share on other sites

  • Advertisement