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

Getting started with Tetris Attack/PPL type game...

Started by Codejoy Apr 17, 2003 at 1:01 PM 4 replies 3.7k views
Original Post
Codejoy
Codejoy
Well I did tetris, and now im ready to move on...id like to do one of my favorite puzzle games: Tetris attack (pokemon puzzle league to some of u). The thing is, I think I have some basic idea of how the code will look, but I want to post here to be reassured im on the right track. In tetris attack you have a bunch of blocks in rows and columns and slowly more are added row by row as the rest are pushed up...get to the ceiling and you loose. You get rid of blocks by swapping horizontially two blocks to complete sets of 3 or more blocks (horizontaly or vertically). Once this is done they dissapare, and the blocks above fall until they hit bottom or more blocks. This is where it gets interesting for me, while the blocks fall they can complete chains, by falling into place with 3 or more blocks (again horizontally and vertically) this can go on indefinitely provided there is 2 blocks with space to recieve the 3rd or more. My question is, how in a general pseudo code since would some of this look like. YOu have an array, of say playfield[15][30] which is a playfield of 15 rows by 30 columns (this isn exact) and in this field u have each element filled out with a block type..t and the players are basically always just swaping blocks horizontally so its a simple array swap..still easy. But how do you check for horiz or vert rows to be completed? after ever swap check the whole array and keep a count variable on current type. say the top left row and column has a blue block...so you go horizontally from there...if the next column on the same row is blue..keep traversing...if not try to travers the next row, if not there, move to the next column and start over? Then every frame you have to make sure blocks are falling, call say a moveblocks it just checks to see what blocks in the array are above a empty block element (represented by say -1?) and shuve the blocks down a column until they reach a element in the array that isnt -1 (blank) Now comes the hard part, somewhere in the falling mechinism i would guess, is when chains can be completed...so is this where you check for chains? and I havent a clue at all even vaguley how this would look. So any ideas to get me started here? Not asking for a handout really, just an idea on getting chains, for I cannot think of a good way to do it (and also to be reassured the other ideas I have on attacking the other problems are correct or close to correct) Thanks, Shane
fredercl
fredercl
Hey, I''m working on a tetris attack clone as well. I just started so I haven''t gotten far into it yet. I''m at work but i''ll post my thoughts when I get home.
fredercl
fredercl
Hey, I''m working on a tetris attack clone as well. I just started so I haven''t gotten far into it yet. I''m at work but i''ll post my thoughts when I get home.
Fear1337455
Fear1337455
My friend made a Direct3D netplay version of tetris attack. It was so hard. you would have 4 differnnt sides to work with and the blocks in between.
Spring has sprungFall has fellNow its winterAnd its colder than usual
Mage2k
Mage2k
Umm... well, I can think of two ways:

I.)
1. Check for and clear all completed rows/columns.
2. If any rows are completed set a flag to indicate that.
3. After all possible rows/columns have been checked, check the flag, if it is set repeat steps one and two.

or, II.)
1. Begin checking for completed rows/column.
2. Every time a row/column is cleared, start over.
3. Continue until all rows/columns have been checked.

I think method one will work best as completed rows/columns should be removed simultaneously and the second method may result in a totally different sequence that is quite arbitrary (based on where you start checking).



peace and (trance) out

Mage
---------------------------------------------------There are 10 kinds of people in the world:Those that understand binary, and those that dont...Mage
neonfaktory
neonfaktory
OMG TA was awesome! I R TEH BESTST AT IT!

I was seriously really good at it though, so if it ever comes time, I''ll give your beta a runnaround and tell you if the "feel" is the same. Haha, if I can still pull off ?x chains (it would lose count after 16x ) I''ll know the feel is top notch .
weee!

Topic Locked

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

Sign in to reply to this topic.