How do I increase speed over time

0 favourites
  • 4 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • I have a game almost complete, but I need to increase the difficulty over time.

    I am pretty sure it is an easy thing to do but I can't seem to get it to work the way I want to.

    if anyone can help that would be great! or point me to a tutorial about it.

    I am also having issues with Iads on my game as well.

    thanks!

  • i figured out the iads. just need to figure out the difficulty speed over time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What I did is to have a global variable called difficultyFactor, I incremented it every amount of time, then I used that factor to increment speed or anything I need to increment.

    ex

    Lets say:

    difficultyFactor = 0

    regularSpeed = 100

    Then in my game sheet:

    Speed = regularSpeed + (regularSpeed * difficultyFactor/10)

    This wont modify the speed because difficultyFactor is 0 at this point, then after some time:

    difficultyFactor = 1

    Speed = regularSpeed + (regularSpeed * difficultyFactor/10)

    This will increment the speed by a decimal fraction giving us 110 for speed

    You can play with those values.

    Also I needed to spawn some enemies at a certain difficulty, so I just did:

    if (difficultyFactor > 5) spawn Enemy

    I hope it helps

  • Thanks that's extactly what I was looking for!!

    Have u ever tried keeping a high score in a device storage? I have an ios game and the high score does update all the time. I am using a couple global var and web storage.

    Again thanks for the help on the first part!

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