First game

Started by
4 comments, last by Plexmark 20 years, 8 months ago
Hello, I am new to these boards and game development. I am currently in the military and taking college classes and have finnished the first 3 core classes on programming. The two on C++ and structures at University of Maryland University College. I want to get into programming games and am looking to start off with the idea of programming tetris first. But I can not really find any tutorials on making the game. I have a great knowledge of the console programming that the classes gave me. But I have not really done much Windows API or DX stuff. I can initialize the window and get the buffers up and I have a small understanding of the code for flipping the buffers. Any ideas on where to find info to program tetris, everyone says it should be your first program, but I think I need more experience with actual windows programming. I am going through some API and MFC stuff now to get a grasp. Any help or info would be great, thanks. Plexmark ----------------------------- If I can help send me a message: ICQ:15998198
Plexmark-----------------------------If I can help send me a message: ICQ:15998198
Advertisement
quote:Hello, I am new to these boards and game development. I am currently in the military and taking college classes and have finnished the first 3 core classes on programming. The two on C++ and structures at University of Maryland University College. I want to get into programming games and am looking to start off with the idea of programming tetris first. But I can not really find any tutorials on making the game.
Making Tetris is a good idea for someone beginning to make games.

If you are using Windows, Tetris can be done sufficiently in GDI (Graphical Device Interface). GDI is not very powerful, but for Tetris, it will do.

Have you ever programmed a Window''s application/program before? If not, I suggest acquiring the excellent book by Charles Petzold, Programming Windows 5th Edition.

Using DirectX before you have an understanding of how to organize your game code may become problematic. I suggest sticking with GDI for the time being and later moving onto DirectX when you feel more comfortable.

You should not need MFC for this. I have a sneaking suspicion you are throwing large APIs at a problem with the idea that they will solve your problems. They will not.

The way I would write Tetris would be to set up a window.

Set a timer to check what keys are being pressed.

Set up another timer to handle the animation steps.

... Hopefully it will be a nudge in the right direction.
Heres a tutorial, clicky


[edited by - Bakingsoda36 on August 14, 2003 4:52:58 PM]
Does anyone know any tutorials or sites that show some GDI code or a good way to start learning it. I am trying to learn in the correct order so I got a good background and dont have to backtrack.



Plexmark
-----------------------------
If I can help send me a message: ICQ:15998198
Plexmark-----------------------------If I can help send me a message: ICQ:15998198
I would suggest making something a bit more simple like Pong. It isn't as complex as tetris so it will allow you to concentrate more on learning how to initialize and use windows and DirectX functions.

If it is the GDI you are interested in then try:

www.gametutorials.com


Very good tutorials on Windows game programming and the GDI. It also has a nice intro into network game programming. It also has a directX and openGL tutorial but I haven't taken a look at those so I'm not sure how good those are.

[edited by - OneBitWonder on August 14, 2003 4:42:45 PM]
<< Does anyone know any tutorials or sites that show some GDI code or a good way to start learning it. >>

GameTutorials.com is very good. Learned how to do back (double) buffering there. One good series of articles here on GameDev is the Genesis series, print these out

Game Programming Genesis Part 1 on Win32

Part 3 on Win GDI graphics

Printable version of Part 3 on one page

Microsoft's own site is good for documentation of the GDI functions. I'm at the stage trying to learn Win GDI to make PacMan with bitmaps. I've already done a smooth asteroids clone with Win GDI Polygon/Ellipse functions. Once you get your Game Loop down with WinMain and WinProc in Win32, you probably won't have to change it much. Just a copy/paste once its set the way you like.

I use Lamothe's straight C style (plenty of #defines, plenty of globals), much simpler for me to understand. Don't plan on changing much when I get into 3D....although perhaps I'll need to break up projects into smaller files and use some linked lists instead of arrays. My demos here

VazGames.com

Phil P

[edited by - PhilVaz on August 14, 2003 8:26:54 PM]

This topic is closed to new replies.

Advertisement