Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / how to make Tetris (dbc)?

Author
Message
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 13th Jan 2006 21:58
hi all, i have made a simple space invaders game and a hangman game, plus many fps' all without using tutorials and the like, - i only used some code snippets found as and when/if i got stuck, but anyway here's my prob...

i have started a tetris game but can't figure out how to get a decent start. so i would like to know if anyone out there knows of any good tutorials that i could use?
or, even better, maybe someone could simply look at my code and point me inthe right direction?



oh, btw i do realise some of the shapes are not right yet but i just wanted to make them all different for the time being.

and anyone who adds code etc will get a mention in the credits.

thank u for any help.

life's one big game
Dark Lord
19
Years of Service
User Offline
Joined: 19th Aug 2005
Location: Australia
Posted: 14th Jan 2006 04:40 Edited at: 14th Jan 2006 04:41
This may not help much but if I know Tetris correctly then your blocks would all have to snap to some kind of grid.
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 14th Jan 2006 18:00
how do u go about deleting parts of the shapes once a line has been made?
i was thinking of maybe just moving every shape down - thus hiding the line that has been created and then deleting the shapes once they got down to a certain height, would this way work ok, or would i end with loads of shapes and slow fps?

and how on earth do you even begin to determine if a line has been made?
the only way soo far i can think of is to make loads of little hidden shapes to place in the arena so that they can check for collisions, but this would surely take forever and there must be a better way.

life's one big game
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 15th Jan 2006 03:42
You can make an array that stores only 0's and 1's for the area the pieces can go. You can have it check for a row of 1's across to determine if the a line has been completed.


Login to post a reply

Server time is: 2024-09-24 13:34:58
Your offset time is: 2024-09-24 13:34:58