Archived

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

hello_there

tetris game help!!!

Recommended Posts

i''ve been trying to programme a game for ages now but i never get around to. Can someone please tell me how i would from start to finish make a 2d tetris game in open GL using visual c++. Can someone please please help me. BTW is anyone from New Zealand here.? hmmm interesting

Share this post


Link to post
Share on other sites
I''m a newbie so don''t take this too deeply.

It seems that if you want a tetris game you should start with the game itself (the parts that have to do with figuring out whats going on). I would suggest starting by getting some classes started, say one for a base class of all blocks, maybe one for holding the position of blocks for graphics and for algorythms. Then maybe figure out how to know when a row is complete, how to know when a block has come to where it can''t move. After you have done this then maybe move onto what the graphics of the blocks and the screen might be.

As for you windowing environment, that depends. If your game is pretty basic (ie only inputs are "New Game", rotate block, move block left) then i would suggest using the basic windowing functions in the GLUT library. These are pretty easy to use, although they are functions not classes (bit harder to tie them in). If you are using complex interaction, then i am at a loss as to what you might do. If you want it to look like standard windows, you could create an SDI application (AppWizard) and add the OpenGL functionality. This is described in a pretty in depth arcticle in the MSDN Library (i forget what its called, but it is a straight forward arcticle on an OpenGL enabled View class that lets you draw).

I hope I have helped in some way.

BTW you live in New Zealand?
I''m from the states, but love New Zealand.

In light of the atrocities my country is doing in the Middle East, I have been trying to convince my parents to move to New Zealand, as there both retired.


GOOD LUCK ON TETRIS!!

Share this post


Link to post
Share on other sites
Hi mate! Cant comment much about your post, but just to let you know I''m a fellow kiwi! Always good to see another ''local''

Share this post


Link to post
Share on other sites
True, but you don''t have nearly as much control code-wise. GLUT is based on callbacks, and from what I''ve heard it''s slow when you use a lot of the functions

Share this post


Link to post
Share on other sites