The Daily Click ::. Forums ::. Klik Coding Help ::. Creating Rhythm Games (IE Making objects scroll by Beats per Minute of a song)
 

Post Reply  Post Oekaki 
 

Posted By Message

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
17th December, 2011 at 19:40:18 -

I am trying to figure out how to make an object scroll across path of a set length based on the bpm of a song, but I can't seem to find a good formula.

For example:

If a song is 100 beats per minute and the Field of View (distance the object has to travel to reach its target) is 1000 pixels, I need to find out how many pixels the object needs to travel every 1/100th of a second.

I've come up with a few formulas, and one I have is somewhat accurate, but it seems to scroll way faster than I expected.


Also: MMF runs .01 the same as 0.02 correct? If so, is there any workaround for this such as an extension?








 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
18th December, 2011 at 19:28:16 -

I figured it out. MMF is only accurate to 1/50th of a second, which is below sub-par for a rhythm game, but it works.

If anyone is interested in the formulas just post here and I'll post them up.

 
n/a

Hagar

Administrator
Old klik fart

Registered
  20/02/2002
Points
  1692

You've Been Circy'd!Teddy Bear
18th December, 2011 at 22:48:18 -

Increasing the frame rate will get you some more iterations per second, assuming the users PC's can keep up. Also if the frame rate is much above 60, tearing will start to occur , and of course vertical syncrhonisation will bring it back down to 60 Hz (or whatever the monitor is running).


 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
20th December, 2011 at 05:07:52 -


Originally Posted by ..::hagar::..
Increasing the frame rate will get you some more iterations per second, assuming the users PC's can keep up. Also if the frame rate is much above 60, tearing will start to occur , and of course vertical syncrhonisation will bring it back down to 60 Hz (or whatever the monitor is running).



True, but I'll lock it to 60fps since that is standard and I can't stand tearing.



 
n/a
   

Post Reply



 



Advertisement

Worth A Click