Advertisement

newbie question

Started by June 16, 2002 02:52 AM
10 comments, last by stevensn 22 years, 6 months ago
Hi, Ok, so i''m a complete newbie to games programming so i guess im in the right place for a little help. I know how to program in C++ and have and understanding of arrays, strings, pointers and such like. I also have several ideas for games but sadly i am not sure where to begin. I have not written a game before and most of my C++ knowledge revolves around using the MFC classes. So, my question is where do i begin? Thanks Neil
Start with a simple tetris clone. This game will cover the basics of the game-loop and you will not need to worry much about graphics (everyone can draw a block .

After that you can try to make a game where some physics are involved, such as pong.

If you succeeded in making these two games, then it''s time for something bigger, eg a side way scroller.

Just don''t rush and try to make a 3d shooter, because you will fail. Begin simple...

Be sure to check out the beginner''s articles on this site!!

+++ Corvus +++
+++ Corvus +++
Advertisement
Another question,

I want to do a tetris clone, sounds easy enough, you only need blocks (graphics wise), but should i be using MFC or should i be staying clear of MFC.

Also what exactly is the game loop and how do you implement it, is it just a for(...) loop or something more complex and intricate.

Thanks
A game-loop is the sequence of functions your program goes through each frame.
You initialize everything, and from there enter the loop, until the game has reason to end you just continue looping.

For a tetris clone (although I never did one myself), you''d just need something like

void InitGame()
{
// initialization stuff
// blah blah blah
GameLoop();
}

void GameLoop()
{
while(!endgame) // loop until endgame flag is set
{
CheckInput();
MoveBlocks();
CheckBlockCollisions();
DrawBlocks();
//etc...
}
EndGame();
}

Hope that clears things up.

------------
aud.vze.com - The Audacious Engine <-- It''s not much, yet. But it''s mine... my own... my preciousssss...
MSN: nmaster42@hotmail.com, AIM: LockePick42, ICQ: 74128155
_______________________________________Pixelante Game Studios - Fowl Language
Thanks, that cleared the game loop up.

what about using MFC (Microsoft Foundation Classes), or are they a nono when developing games
quote: Original post by stevensn
what about using MFC (Microsoft Foundation Classes), or are they a nono when developing games

The consensus on this board is that MFC is not for games, with which I disagree. I suggest you look into WTL (Windows Template Library -- run a search on it on MSDN) which is what I'm using. It has the same functionality as MFC as far as games are concerned and is much nicer, but has about zero documentation. If you can read the source, WTL is for you. Otherwise, if you feel that MFC simplifies your life, by all means use it. If you don't like MFC, feel free to not use it. The choice is yours.

Alternatively, if you're using DX8, you can take advantage of the Common Files framework that is included with DX8. There's also an AppWizard to help you get started.

[edited by - IndirectX on June 16, 2002 5:10:30 PM]
---visit #directxdev on afternet <- not just for directx, despite the name
Advertisement
Ok, i''m stuck, ive created a window and game loop, and initialized DirectX, i am writing a teris clone btw.

I have my images (cubes of various colors), but i''m not certain where to go from here.

Does anyone know of any tutorials for tetris clones.

I know i need to use DirectInput to get the keyboard input, and DirectDraw to get the images onto the screen, but the help files are a little too techy for my rather small intellect

Thanks in advance
Try the Hands-On Interactive Game Development tutorial. It goes as far as to create a working tertis game (I think).
quote: Original post by stevensn
Does anyone know of any tutorials for tetris clones.

Well, there''s one by pouya.

Don''t take it too seriously, though.
---visit #directxdev on afternet <- not just for directx, despite the name
Man, that is the dumbest thing I''ve ever seen...

Hibiki
Wheres the any key?
HibikiWheres the any key?www.geocities.com/dragongames123/home.html
find your elementat mutedfaith.com.<º>

This topic is closed to new replies.

Advertisement