Flappy Bird various obstacles

0 favourites
  • 7 posts
From the Asset Store
Obstacle Impacts and Cartoon voices, will makes your game more funny!
  • 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.

  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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)

  • Hi,

    moving background is easy by adding Sin behavior or Bullet.

  • Hi,

    moving background is easy by adding Sin behavior or Bullet.

    what you mean by easy ? .... for performance ?

  • That will work perfectly I believe thank you. That's more simple than I thought! Awesome.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)