• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Game Maker Music Game Design Theory

XD005

Member
Hello all,

I'm the developer of a project called Dancing Inferno 3 that was floating around on the forums some time ago.
It was a PC only game made on GM7/8 before the debut of Studio. This project used a lot of synchronous functions (freezing the game) to show loading screens, and exploits of issues/glitches of GM of the time.
I want to port this project to Android and elaborate and change some of the gameplay features since its an engine I've been utilizing in all my music projects for some time now. Most of the stuff, I'm sure can be translated over, a lot of code cleaned up and menus removed.

My one question is, I remember in the past you were unable to get the position of a piece of music playing in Game Maker: Studio. I see the function audio_sound_track_get_position has been added. Although, it seems this gives you the time in seconds. Does anybody know if it is rounded to the nearest whole second or can I convert the time into milliseconds? I was contemplating purchasing a copy of Game Maker: Studio but I'd like to know what its capable of first. Additionally, would it be feasible to use the clock functions to get greater accuracy or would you guys advise against that? It would merely take one system lock-up to throw the whole game off. I used an extension for my older games.
 

FrostyCat

Redemption Seeker
audio_sound_get_track_position() doesn't round, so multiplying it by 1000 will give you a valid figure in milliseconds.

For a rhythmic game, I strongly recommend using step-independent timing functionality such as get_timer() or delta_time along with audio_sound_get_track_position(). It doesn't take a full-blown system lock-up to make things go south, even natural fluctuations in frame rendering can add up in as a little as a minute or two.
 

XD005

Member
audio_sound_get_track_position() doesn't round, so multiplying it by 1000 will give you a valid figure in milliseconds.

For a rhythmic game, I strongly recommend using step-independent timing functionality such as get_timer() or delta_time along with audio_sound_get_track_position(). It doesn't take a full-blown system lock-up to make things go south, even natural fluctuations in frame rendering can add up in as a little as a minute or two.
Thanks for the answer. I've downloaded the evaluation version. It appears these values are given in Microseconds.
This is perfect. It seems these values are unaffected by the lag as well so it seems the trick is to make some type of "timestamp" system when the game is paused,
moves to another room, or something of the like. I can stretch the audio with this and everything in case the game gets out of sync. :D
 
Top