Skip to main content
GameDev.net gamedev.net
🔒 Locked

Tetris question

Started by cryo75 Sep 3, 2003 at 5:47 AM 1 replies 600+ views
Original Post
cryo75
cryo75
Hi everybody, I''m new to game programming and DirectX so I decided to go the safe way by starting from the simple stuff.... and that''s doing a tetris-type game in vc++ and GDI, then I convert from GDI to DD7 and then to DX9... Ok, so my question is really basic. How should I define my blocks? As arrays of 4x4 or what?? Thanks, Ivan
theSeby
theSeby
yes, one solution is to define a block (with coordinate, color...) as struct or class, and then define a piece as an arry of 4 blocks.

------------------------
- Seby -
www.dfhi-bomber.fr.st
------------------------ - Seby -www.dfhi-bomber.fr.st
oliii
oliii
you can define the rotations likewise, and precompute them. So you''d have an array of 7x4 pieces, so 7x4x(4x4) unit blocks.
Everything is better with Metal.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.