How do I make 'accelerating ground' forRunner game?

0 favourites
  • 7 posts
From the Asset Store
25 high quality isometric ground blocks + sprite sheet
  • Hey everyone.

    I just started my adventure with Construct 2 just few days ago. And I've made 2 tutorials - for beginners (Monster shooter game) and Platform game - for begginers, but I worked with similar softwares for making games couple years ago - it was The Games Factory and Multimedia Fusion <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /> so I'm not totally beginner.

    Ok, so i want to make simply Runner game, and I'm working on the template for that (there os one template for this type of games, in C2). But in this template there is no accelerating for GRound (blocks) on which the player is running. There is behavior 'Bullet' for the ground/blocks (tiled graphic) and the initial Speed is = 300. So I created the event that in > 7 seconds the Speed of blocks set to 400. But i know, maybe this isn't perfect event <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" /> And maybe it should look like "every next 20 seconds, add + 100 or 50 to speed" or something like that. But how to make good event for that?

    And I set the position of player to X=100 - so i keep player in the same position in X, apart of blocks movement speed.

    But I have another question. In template, there was that EVent with actions: oi67.tinypic.com/11j6qma.jpg

    So I want modificate that - when the speed of blocks movement will increases, then the distance between platform of blocks should increase too.. But how to do that?

    I have only one idea at this moment - to add sub event to this one with "< 20 seconds" and copy that whole event - and make another event with sub event "20 - 40 seconds" and there modify action with distance between appearing blocks.. But i'm not shure that its good too.. because I have to make that every 20 seconds for example to make the game harder ( increases speed of blocks movements and distances between blocks)

    Can you help me <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" /> ?

    Thanks

  • Nobody can't help?

  • ??????

  • You need to consider some parameter to adjust everything during gameplay.

    Modified example from default demo:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to put the speed as a global variable.

    When you encounter the event that makes it speed up (for example every X seconds indeed) aff a certain value to the content of that variable.

    VariableSpeed = VariableSpeed + Value

    Then add also the same content to the current bullet speed of existing blocks.

    Block.Bullet.Speed = Block.Bullet.Speed + Value

    Possibly to modify the distance of block creation, according to the new speed, you can act on "NextBlock" value.

    Possibly something like :

    NextBlock = NextBlock + Value * dt

    It is up to you to see if multiplying by dt (Delta Time) will fit or not and if not adding it won't make the game impossible.

    Finally make it so that on creation, block's speed will be based on the variable's value.

    Create Block

    Block.Bullet.Speed = VariableSpeed

    This should, every 20 seconds raise up the overall speed of blocks and their distance of creation.

    As to what condition exactly use instead of every 20 seconds, it is up to you and what you want to happen in the game.

  • Thakns guys, a will try it And than I'l give solutions.

  • You don't even need to vary the distance between the platforms during a speed increase, because if you simply spawn new platform at regular intervals, say, every 1 second. Well, if the ground is moving faster, then everything moves faster, and moves across the screen faster. But the spawn rate is still every 1 second. Which means that the distance between platforms will increase AUTOMATICALLY because the speed the platforms are moving is faster then the spawn rate, and keeps getting faster than the spawn rate.

    Bear in mind this is if you spawn platforms as it goes - if you have a pre-made level you'll have to do it some other way.

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