Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
How to make a game like "Gitar Hero" — Gideros Forum

How to make a game like "Gitar Hero"

pedropadelpedropadel Member
edited April 2012 in Game & application design
Hi all,

I'm making a game similar to "Gitar Hero" but I have a problem of synchronization.

I'm using the OnTimer event to move the blocks N pixels in each run. The problem is that sometimes OnTimer not work and out of sync the music with the blocks.

I have a csv file with the times in milliseconds which each block must pass over the push area.
I also calculated how many pixels you have to move the block in each run of OnTimer. In the player of Gideros the game working properly but when I run in mobile I have problems of synchronization (tested on Samsung Galaxy and Xperia Neo)

Any advice? Can you think of an alternative solution? How to make a game like "Gitar Hero"?

Thank you very much!

(Sorry for my english!)

Comments

  • ar2rsawseenar2rsawseen Maintainer
    That's really interesting problem.

    I wonder why timer is out of sync?
    Maybe because sound channel needs some time to load, while timer is already activated, etc.

    What music format are you using? mp3 or wav?

    -WAV files: Entire sound is loaded into memory. Consumes little CPU while playing. Suitable for simultaneously played sound effects.
    -MP3 files: Sound is played by reading small chunks therefore consumes little memory. Consumes more CPU compared to WAV files. Suitable for background music/speech.

    It's hard to tell, what would be better, maybe using wav to load song completely into memory would do the job.

    You can also try using SoundChannel:getPosition() to see miliseconds passed from sound start and adjust block movements to it inside timer.
  • avoavo Member
    I think that all sound is slightly delayed on android? and this isn't a Gideros problem, but an android wide problem.
  • @ar2rsawseen The sound files are MP3. The WAV would be a solution but then the size of game will be very big... (the game have 13 songs)

    I will try the SoundChannel:getPosition() method... May be it is a solution...

    My game is already uploaded to Google Play. It's called "Ritmo Cofrade Linares".

    https://play.google.com/store/apps/details?id=com.santacenero.ritmocofradelinares

    You can download it if you want and check the problem of which I speak. I will try to fix it in netx versions ...

    Thank you very much!

    Likes: gorkem

    +1 -1 (+1 / -0 )Share on Facebook
  • @ar2rsawseen I have the algorithm for moves the blocks and now it works better!

    Now I use the SoundChannel:getPosition() method.

    Thank you very much!
Sign In or Register to comment.