Help whit a Tetris game type.

You must understand the Game Editor concepts, before post here.

Help whit a Tetris game type.

Postby Game A Gogo » Sun Nov 12, 2006 1:05 am

ok, me and Jaco Pastorius is working on a game called metris, but, we got a major problem here, we don't know how to make the line Disappear after their made, I thought of scrolling the whole game down, but what if the guy makes a line in the middle? i thought a long while for this one, the only way, the insane way we thought of was, like making the block multiple actor, and deleting the needed actor for the line, but for scrolling it, AHHH, this one gives me a headache, hope you can help.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Novice » Sun Nov 12, 2006 9:20 am

What line??? What does your game look like???
What type of game are you making??? What block???
No one can help you if don't give us some info. :?
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score

Postby Game A Gogo » Sun Nov 12, 2006 9:56 pm

well if you would read the title, it woiuld say what kind of game it is.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Novice » Mon Nov 13, 2006 9:26 am

Oops :oops: :oops:
Sorry about that, i read it also metris, i even did a google search to find what it is.
You can make your line disappear buy storing your whole level in a multidimensional array, and then checking if a line has been made, something like this.

00000
00000
00000
10010
11111
10110
Code: Select all
if (array[0][5]==1&&array[1][5]==1...&&array[4][5]==1)
{
     //make the blocks above come down one level and add points
}

This would be done easier using a while statement to check all rows for a complete line.
Again sorry for the misunderstanding.
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score

Postby Game A Gogo » Mon Nov 13, 2006 11:57 pm

its ok, but, its no use...

Anyway, the only visually way to do this, is by making each block with multiple actor, but then, for the rotating thing, ahhh, yeah, TT
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby DilloDude » Tue Nov 14, 2006 1:29 am

The rotating thing would be a pain. Perhaps, make for each shape block one animation with all rotations, and have script to convert each square to an array. So the block knows what space it occupies. Make tha stack at the bottom a text actor, and when the block touches the stack, it goes through a script to update the text, and then destroys itself. Then the text checks for a complete row and then updates itself again. Try fiddling with this idea. Just remember that text can only have 255 characters, so if you want more than that (remembering to leave space for the newline character), you may need to have an array of text actors, each representing 5 or so rows (depending on the size).
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby Fuzzy » Tue Nov 14, 2006 9:51 pm

rotation is easy. since the rotations happen in 90 degree steps, rather than interpolated at x degrees, you have every and all shape be a base actor that stores its rotation. One byte would do easily.

The base actor knows where it should be next draw event, and it knows how to draw itself based on its angle. It examines its angle and creates appendage actors that are parented to it with the ruleset for that angle. at the same time, it detroys the old arms from the last angle.

Then it examines the area below it, and if it is open, it moves downward.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: Help whit a Tetris game type.

Postby xr2alex99 » Wed Jun 18, 2008 2:27 pm

well maybe the filled region may help
at the bottom add the line thing and if the line is (filled region) filled then everything in it is destroyed
(\___/) My bunny :twisted:
(=' . '=) is a king of :twisted:
(")___(") awesome :twisted:
User avatar
xr2alex99
 
Posts: 22
Joined: Sat Sep 01, 2007 7:48 am
Score: 0 Give a positive score

Re: Help whit a Tetris game type.

Postby Thanx » Thu Jun 26, 2008 2:44 pm

Here's my idea:

The gameplay is made up of clones, nothing will have to move, each clone has the animations it might need.

Next, you'll need an array, for the gameplay, basically describing where there's a block, where there isn't.

Then for the shapes falling down you need a small array, the size of howmany squares the shape's out of. Each variable in the array contains the position of that square on map. (the cloneindex of the clone showing its animation). Each rotation you'll change thes numbers.

Each step if the space is free under it,you add to the numbers of the shape array the width of the board (that'll give the squares 1 row beneath the ones in the earlier turn.

to check wether there's space beneath, you'll have to use the board's array to help, but that shouldn't be too complicated.

If it reached the bottom, simply refill the shape's array, without changing the filledness of the ealier squares you were working with, to keep the old shape in place.

To check wether a line is full, divide the board into lines. E.g. the board's width is 10, then divide it to 0-9, 10-19, etc. And check wether they're all filled. (Using the board's array).
If a ine were to be filled copy the rows above to the row below, and so on, and the new row should be all open, as you know.

I think that's what has to be done, this is the way I'd do it...
Hope this helped,
Thanx
http://www.youtube.com/watch?v=XyXexDJBv58
http://www.youtube.com/watch?v=Be4__gww1xQ
These are me and playing the piano (second one with a friend/fellow student)
Hope you watch and enjoy!
User avatar
Thanx
 
Posts: 314
Joined: Sat Jan 26, 2008 10:07 pm
Location: Home sweet home! :)
Score: 24 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest