Can I get a hand making a Tetris type game?

Get help using Construct 2

Post » Thu May 31, 2012 4:34 am

Hey guys! You probably have heard of Tetris, that classic game with falling pieces. Is anyone willing to give me a hand in making a game similar to this?

First of all, I'm having trouble getting it to make random objects of different sprites. Does anyone know how to make the piece where it randomly chooses what tile to give you? And is there a way to get it to recolor it so I don't need as many sprites? Thanks!
B
5
Posts: 19
Reputation: 413

Post » Thu May 31, 2012 5:54 pm

recolor no. Theres a plugin to recolor a sprite in js but its prolly not the best solution for constant use

As for the random piece just use set animation frame -> int(random(0,numframes+1))

numframes is the number of frames in the animation that holds all the different block shapes
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Fri Jun 01, 2012 2:50 am

@aridale That sort of looks right, but I don't know. I need to do more with it than random sprite. Now that I think about it, I need a "random object" function, so that it can make the individual pieces, like when it breaks the rows when you finish that.

That does look good, though. Maybe I'll use that for something else. Thanks anyway!
B
5
Posts: 19
Reputation: 413

Post » Fri Jun 01, 2012 5:57 pm

I think what youll have to do for tetris to work at all is have a single block object as in 1 block then make it spawn in 4 of those in the shape of the actual game pieces. That way you have an individual object for each block for collisions. Cause I dont think you can make an L shape or the offset 2x2s with the built in collision poly editingaridale2012-06-01 17:58:27
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Fri Jun 01, 2012 11:00 pm

[QUOTE=SonicSuitMario] Now that I think about it, I need a "random object" function, so that it can make the individual pieces[/QUOTE]

I think you may want to make all the basic shapes (sprites) in advance, not randomly generate them.

Here is another post on the topic
http://www.scirra.com/forum/grouping-and-random-generations-of-groups_topic50183.html
Guyon2012-06-01 23:05:48
B
28
S
8
G
8
Posts: 530
Reputation: 7,154


Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt, mjj1990, spcsmrf and 7 guests