Flappy Bird various obstacles

Get help using Construct 2

Post » Mon Jun 02, 2014 7:03 pm

This is just an example of what I want to do using flappy bird!

So in my picture instead of just having pipes alone there are falling rocks, flames, and spikes.

I just need guidance on how to get them to randomly appear like in the event sheet, but not just pipes.

If I was playing the game it'd be more pipes than others, but an example would be:

pipe, pipe, flame, pipe , pipe, pipe, pipe, rocks, flame, pipe, pipe , pipe, spikes, spikes,

I'm sure this isn't hard for people who are really comfortable with C2, but I am maybe 2 weeks in and want to make this kind of game.
I WILL TRY: Making all of the obstacles pipes, rocks, flames, spikes. All the same type of obstacle sprite. So pipe will be animation 0, rock 1, flames 2, spikes 3. Then I will make an instance variable called type and start it at 0 for default. Then I don't know HOW but will create some type of random * dt formula so that not just pipes are created. BUT I don't know how to make pipes as animation 0 appear more often than the rest of the features.
You do not have the required permissions to view the files attached to this post.
B
18
S
8
G
1
Posts: 56
Reputation: 2,018

Post » Tue Jun 03, 2014 4:39 am

I would suggest that you use an IF STATEMENT to accomplish this:
IF floor(random(100)) < 50 | spawn pipes //spawn pipes 50% of the time
ELSE | spawn random other objects //like the flames or rocks

I hope this helps

Don't hesitate to ask if this is not clear
B
30
S
4
G
3
Posts: 67
Reputation: 2,329

Post » Wed Jun 04, 2014 5:56 pm

@refais23

I've never done an if statement before, but this sounds good.

I've done some C++ but Construct 2 is way faster for someone jumping into the field of game design.

So I will have to learn if statements then. From what you've said it seems like it should work. After watching the construct video that comes up on Youtube when you search Construct 2 side scroller with the Tuts+ game development. I started my game over and will build it more efficiently. Hopefully can get back to you on this queston soon.
B
18
S
8
G
1
Posts: 56
Reputation: 2,018

Post » Wed Jun 04, 2014 6:11 pm

@JDunamis
Just create 1 obstacle sprite and put the other obstacles in other frames.
Then, when the object is created, assign a random frame.
For more pipes than other objects, put 2 or 3 frames just for it.

Or use "choose" like that: *the 0 frame is the pipe*
choose(0,0,0,1,2,3,4,etc)
B
20
S
4
Posts: 385
Reputation: 2,270

Post » Wed Jun 04, 2014 7:35 pm

Hi,
moving background is easy by adding Sin behavior or Bullet.
2D Game GUI Designer
B
12
S
4
G
3
Posts: 130
Reputation: 3,778

Post » Wed Jun 04, 2014 8:27 pm

Manarsoft wrote:Hi,
moving background is easy by adding Sin behavior or Bullet.


what you mean by easy ? .... for performance ?
B
46
S
16
G
8
Posts: 794
Reputation: 8,335

Post » Fri Jun 06, 2014 4:20 pm

@Zathan.

That will work perfectly I believe thank you. That's more simple than I thought! Awesome.
B
18
S
8
G
1
Posts: 56
Reputation: 2,018


Return to How do I....?

Who is online

Users browsing this forum: dand, mageekm, oosyrag and 27 guests