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 / Tetris project help

Author
Message
CodeKilla
13
Years of Service
User Offline
Joined: 4th Mar 2011
Location:
Posted: 4th Mar 2011 18:17
i have recently started a tetris project it all works but i dont know how to put the shapes in as it only spawns 1 coloured square on the grid at a time here is my code so far:



any help will be greatly appreciated.
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 5th Mar 2011 16:40
i think OBese87 can get you these answers, or try to make a tetris clone by yourself, from start... you learn more of writing your own code than copy and paste from another person.



mostly i do is search the forums for answers if i really really dont know, ill ask it on the forums.
CodeKilla
13
Years of Service
User Offline
Joined: 4th Mar 2011
Location:
Posted: 6th Mar 2011 10:29
:S ok this is my own code i have started this from scratch, i'm not after a copy and paste but more of advice/help to show me how to get shapes spawning instead of just my coloured square i have now.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 6th Mar 2011 17:38
I don't see anywhere where you read the DATA at the end of the code so there's no way to interpret the DATA for different shapes.

I applaud your effort but it's far easier to work with sprites.



CodeKilla
13
Years of Service
User Offline
Joined: 4th Mar 2011
Location:
Posted: 6th Mar 2011 23:32
thanks for the help much appreciated

i havnt read the data in as im a bit stuck on that bit :/

ill give sprites a go but im not sure the check to see if a line is full and the drop down detection would work if i used the sprites.

but ill give it ago

many thanks
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 7th Mar 2011 09:08
Quote: "i havnt read the data in as im a bit stuck on that bit :/"


Ah. Just type READ and hit F1 and it'll bring up the help files on reading DATA.

Quote: "ill give sprites a go but im not sure the check to see if a line is full and the drop down detection would work if i used the sprites.

but ill give it ago "


It's basically the way you do it already with the grid() array. You use the array to track which areas have a block there or not (and what color using your color array).

CodeKilla
13
Years of Service
User Offline
Joined: 4th Mar 2011
Location:
Posted: 9th Mar 2011 12:41
thanks for your solution much appereciated but with sprites im confused as i was thinking of making a smaller grid 3x3 and reading the shapes into that.

is it possible you could show me what you ment by

Quote: "
It's basically the way you do it already with the grid() array. You use the array to track which areas have a block there or not (and what color using your color array).
"


cheers
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 10th Mar 2011 18:37
Since I'm still sick and a bit too lazy to show you myself here's a link to a Tetris game that Diggsey made back in 2007 for Darkbasic Pro. It has a small 4x4 grid just like you wanted to make too.

http://forum.thegamecreators.com/?m=forum_view&t=119154&b=5

It requires Cloggy's D3D Plugin which you can get here: http://www.dbdepot.co.uk/d3dfunc.html

Login to post a reply

Server time is: 2024-11-22 23:18:51
Your offset time is: 2024-11-22 23:18:51