Hello guys!
So i was wondering how do i increase speed during time?
My scenario:
I want the player to increase speed when he starts to collect more and more coins.
Someone that could help me?
Hello guys!
So i was wondering how do i increase speed during time?
My scenario:
I want the player to increase speed when he starts to collect more and more coins.
Someone that could help me?
How are you moving your player now?
Rob
Now i’m using the code from a template which is a clone of “flappybird”, which basically is a bird flying once you tap it.
So i wanna remove the player object and just want it to scroll on it’s own without having a character in it. So it’s dependent on “tapping” if you know what i mean.
And then increasing the speed for how many times you tap/collect coins(score)
First, I don’t know that template. You really didn’t answer the question. What’s moving the bird? Are you applying force with physics? Are you transitioning it? Are you moving it in an enterFrame listener? Does the object stand still and the background is moving (i.e. you’re moving the game camera)?
Without seeing code or you providing something to go on, people can’t help you.
if he’s doing it like a flappy bird, then no bird is actually moving… the background image is scrolling at a certain speed and he’s moving in objects (e.g. coins) from the right side of the screen to the left, which i’m guessing are also just doing transitions.
no physics I think.
anyway, if that is so, you just need to link the variable of coins collected to the speed set in transitions, as some kind of a multiplier… i.e.
speed = speed * collectedCoins*0.01
that would increase the speed by 1 % for each collected coin… collect 100 coins and it’s a 100 percent speed increase
joe, shouldn’t that be more like:
baseSpeed = xxx
speed = baseSpeed * ( 1 + collectedCoins * 0.01 )
I think what you have will result in an exponential decrease in the speed. After you collect the first coin the speed would drop to 1% of it’s current value. After the second it would drop to 2% of the previous 1%, etc., etc.
How are you moving your player now?
Rob
Now i’m using the code from a template which is a clone of “flappybird”, which basically is a bird flying once you tap it.
So i wanna remove the player object and just want it to scroll on it’s own without having a character in it. So it’s dependent on “tapping” if you know what i mean.
And then increasing the speed for how many times you tap/collect coins(score)
First, I don’t know that template. You really didn’t answer the question. What’s moving the bird? Are you applying force with physics? Are you transitioning it? Are you moving it in an enterFrame listener? Does the object stand still and the background is moving (i.e. you’re moving the game camera)?
Without seeing code or you providing something to go on, people can’t help you.
if he’s doing it like a flappy bird, then no bird is actually moving… the background image is scrolling at a certain speed and he’s moving in objects (e.g. coins) from the right side of the screen to the left, which i’m guessing are also just doing transitions.
no physics I think.
anyway, if that is so, you just need to link the variable of coins collected to the speed set in transitions, as some kind of a multiplier… i.e.
speed = speed * collectedCoins*0.01
that would increase the speed by 1 % for each collected coin… collect 100 coins and it’s a 100 percent speed increase
joe, shouldn’t that be more like:
baseSpeed = xxx
speed = baseSpeed * ( 1 + collectedCoins * 0.01 )
I think what you have will result in an exponential decrease in the speed. After you collect the first coin the speed would drop to 1% of it’s current value. After the second it would drop to 2% of the previous 1%, etc., etc.