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 / First game help (tetris)

Author
Message
Maati
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location:
Posted: 3rd May 2009 09:45
So I've been learning c++ for more than half-year, but I thought i'd be easier to create games with DBpro. I read some tutorials, pretty much learned the syntax. But the problem is I created only simple programms, so I have no idea how to create tetris. Well, I do have some ideas. I think it would work out if I made the tetris board a 2D array. The falling shape would be 1 and the empty space would be 0. If a line of 1 is full, then it disappears. I want to create a really simple game. No menus, no scoring and so on. The problem is I have no idea how to write that. Any help, please? Thanks, in advance.
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 3rd May 2009 17:44
maybe read more tutorials? i have no idea, i'm a complete n00b at 2d dark basic. In 3d this is easier, but still a fair challenge.. i think...

(\__/)
(O.o )
(> < ) This is Bunny. Copy Bunny into your signature to help him on his way to world domination!
acelepage
20
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 5th May 2009 18:31
Arrays can store the values on the game board, so you could use a 2D array: dim board(6,20)
For actually drawing the playing pieces on screen, I would suggest using sprites. You could make each tetris shape a single sprite, or build the shapes out of single block sprites, which would require your code to position them into the correct shape. Once a sprite is created, it can be rotated and moved about the screen. Sprites are created from images, as you can see in the command syntax in the help.

( 2b || !2b ), that is the question. The answer: true

Login to post a reply

Server time is: 2024-09-28 06:23:21
Your offset time is: 2024-09-28 06:23:21