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 / interactive grid

Author
Message
boonsy
14
Years of Service
User Offline
Joined: 8th Aug 2010
Location:
Posted: 15th Sep 2010 11:32
im trying to create a grid that can be navigated by using the arrow keys that will allow me to place tetris like shapes onto it. i need help in setting up the grid.

any input would be greatly appreciated
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 16th Sep 2010 08:13
There are two ways you can go with a Tetris like game. You can create an array to store the grid, use the array to remember which boxes are full or not, and you can use the grid to determine if the piece your trying to move can move or not. Or you can make an imaginary grid that's just noticeable to the user because each piece moves a specific number of pixels each time.

An imaginary grid:


Login to post a reply

Server time is: 2024-09-28 22:28:16
Your offset time is: 2024-09-28 22:28:16