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


Tetris Tutorial with Dx8??

Recommended Posts

burgc002    122
Boy am I having a time...I read that my first attempt at a game should be tetris, ok no prob I know I can''t make EQ first off, I figured out how to load bmps and copy them to a surface and then copy that surface to the backbuffer which eventually gets copied to the primary surface.But that is about all I can do heh, I read the Hands-On tutorials to try to get an idea of what to do, they said that the play area should be a 2d array and that the individual pieces should be 4X4 array, but I''m not sure how Im supposed to get my 4X4 array into the play area array at the proper position....and now I think i have confused myself yet seems to me that the ddraw stuff was easier..anyway just rambling while trying not to toss my VC++ compiler in the lake. Oh by the way if anyone knows where they are doing a similar tutorial (tetris) with DX8 please let me know. Thanks for letting me ramble.

Share this post

Link to post
Share on other sites
DrunkenHyena    805

As fun as Tetris is, it''s overrated as a "first game". Your first game should be something simple that you find very interesting. If you really like tetris, then go for it, otherwise do a cheap knock off of a game you do like.

I haven''t looked at that tutorial, but I assume the idea is to have your play area be a 2D grid, and each piece is defined as a 4x4 area to copy into the grid. A very simple way to do that would be to define a sprite that is a single grid space, and then draw it repeatedly to form the pieces as defined in you 4x4 grid.

I think Missile Command would be a cooler first project, but that''s just me.

Stay Casual,

Drunken Hyena

Share this post

Link to post
Share on other sites
TheHermit    122
Ok, so whilst on the "first game" topic, let me ask this simple(ish) question...

Erm, I have an idea for a simple 2d block style game, vaguely tetris, but feel it would be cool (not to mention >educational<) to instead of using coloured blocks, instead use spinning cubes and bouncing spheres to represent the blocks, and where is a good place to learn the stuff necessary to begin this game.

Hmm, unclear, long question.... Elaborate:

I have a fair knowledge of C++ (ie object orintation, etc) enough (maybe) windows knowledge (can create a window ) and would like to code in directX 8.

I''ve started using NeXe and Drunken Hyena''s Tutorials as a basis to build my knowledge, and are finding them quite good. I guess maybe time on my part is a vital factor i don''t have heaps of, but any other resources, comments, suggestions, pointers, etc. would be not only welcome, but happily accepted, noted, taken on board, ...Well, you get the picture....

(how the mind can wander sometimes...)

Share this post

Link to post
Share on other sites
RelisH    122
The game that I''m currently working on is Tetris Attack, which is like tetris, but has a few different elements and is much harder to program.

The game is in 3D, and the blocks appear 3D, but the game itself plays like the original Tetris Attack, which I think was a 2d game for the SNES with Yoshi.

I''m done coding the networking part (so people can play over the net) and am almost done debugging the game itself.

The only tip I could provide is to make sure you have a firm base before you begin programming the game, and planning the thing it is a good idea.
The hardest part about this for me was doing the animations, where the cubes would move about and pop out whenever they were selected and not screw up with multiple animations ocurring on the same cube when, for example, a cube drops right into your swap selector.

You''ll really need to use classes to make this work properly. But the key is planning! This is probably the first time I''ve ever done any serious planning for any program, but it realy paid off by reducing hassle and increasing effiency.

Share this post

Link to post
Share on other sites
eng3d    91
For the first post :

You cannot find a tutorial :"how to made x style of game". You find tutorial for build the basic concepts, and you can use this for made the tetris game.

1)you must create the screen! (sdk have samples about it)
2)you must investigate how to draw a object in the screen.

Then with all this, you have the enough toos for made the tetris (incomplete but functional).

if you can draw one object, then you can draw,move..


"Cuando se es peon, la unica salida es la revolución"

Share this post

Link to post
Share on other sites