{HOW?} as speed increases, frequency of pipes being spawned increases

choppedupmonkey

  • Posts: 604
how would i make an equation for a game that speeds up by 3 every 2 seconds, and i need to make pipes that spawn more in that amount of time. i have two different attributes, frequency, and speed. i cant find the perfect numbers that keep them together without doing weird stuff. if i try, the pipes will go to slow and just pile up.
My name is Jason, I live in America, and I am 18 years old

"Focus more on the product than profit, for the profit will come after the product." -Me

Donni11

  • *
  • Posts: 2182
how would i make an equation for a game that speeds up by 3 every 2 seconds, and i need to make pipes that spawn more in that amount of time. i have two different attributes, frequency, and speed. i cant find the perfect numbers that keep them together without doing weird stuff. if i try, the pipes will go to slow and just pile up.
Wait , you mean similar  to flappy bird ?
<a href="http://static.stencyl.com/games/28079-0.swf" target="_blank" class="new_win">http://static.stencyl.com/games/28079-0.swf</a>

« Last Edit: April 07, 2015, 06:04:40 am by Donni11 »
Peace

choppedupmonkey

  • Posts: 604
haha, the game isnt similar to flappy bird, but the "pipes" are spawned the same way. except flappy bird goes the same speed all the time, i want mine to get progresssively faster.
My name is Jason, I live in America, and I am 18 years old

"Focus more on the product than profit, for the profit will come after the product." -Me

Donni11

  • *
  • Posts: 2182
There are a few flappy bird games on the forge , try looking at the code for the pipes :) .
Peace

choppedupmonkey

  • Posts: 604
i did, those pipes go a constant speed, but i want mine to increase. you know?
My name is Jason, I live in America, and I am 18 years old

"Focus more on the product than profit, for the profit will come after the product." -Me

LIBERADO

  • *
  • Posts: 2668
... i have two different attributes, frequency, and speed. i cant find the perfect numbers that keep them together without doing weird stuff...
You don't need two attributes. You need only the SPEED attribute.
Simply, create a new pipe every time the distance between the last created pipe and the right border of the screen is higher than a fixed number of pixels.

<a href="http://www.filz.us/files/9c251af3/fe6/PIPES_with_variable_SPEED.swf" target="_blank" class="new_win">http://www.filz.us/files/9c251af3/fe6/PIPES_with_variable_SPEED.swf</a>

« Last Edit: April 03, 2015, 11:56:04 am by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

choppedupmonkey

  • Posts: 604
that is awesome man, could you possibly show me some example code? thanks so much liberato.

« Last Edit: April 03, 2015, 11:07:11 am by choppedupmonkey »
My name is Jason, I live in America, and I am 18 years old

"Focus more on the product than profit, for the profit will come after the product." -Me

LIBERADO

  • *
  • Posts: 2668
that is awesome man, could you possibly show me some example code? thanks so much liberato.
I have attached to this post a project file with the basic code to solve your problem.

« Last Edit: April 03, 2015, 12:37:45 pm by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

choppedupmonkey

  • Posts: 604
Thanks a billion! it'll help me a lot!
My name is Jason, I live in America, and I am 18 years old

"Focus more on the product than profit, for the profit will come after the product." -Me