Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Rhythm Game Possibility?  (Read 4057 times)

0 Members and 1 Guest are viewing this topic.

thamesonfire

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
    • View Profile
Rhythm Game Possibility?
« on: November 28, 2008, 08:49:26 PM »

Hello Everyone,  ::rock

I'm new here, but have gotten quickly excited about WME after reading through the documentation and scores of forum posts. As a point of reference, my last experience programming was with Turbo C++ for DOS, so I am trying to quickly get re-acclimated with that side of things (go easy on me).

I was wondering what some of the experts (or anyone, really) here thought about the possibilities of doing a rhythmic-game with WME ala Guitar Hero/Rock Band. I've read through some forum posts regarding the state of some of the sound and music functions in WME, and it seems like it might be a bit of a challenge without MIDI support (not for the music, but the for timings of notes, although one could come up with their own binary filetype, I suppose); and clearly one would need to be able to keep track of the timings of OGG/WAV files rather precisely. Can this currently be done?

I realize, of course, that this engine is not designed for this specifically. However, as a professional composer who's worked on a few video games, I would be very interested in seeing further support for the music and sound functions. There are lots of really interesting things going on in this area of development at the big companies right now with beat-mapping and multi-channel music and audio.

Hope everyone state-side had a nice holiday.
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: Rhythm Game Possibility?
« Reply #1 on: November 29, 2008, 12:27:20 AM »

Hello Everyone,  ::rock

I'm new here, but have gotten quickly excited about WME after reading through the documentation and scores of forum posts. As a point of reference, my last experience programming was with Turbo C++ for DOS, so I am trying to quickly get re-acclimated with that side of things (go easy on me).

I was wondering what some of the experts (or anyone, really) here thought about the possibilities of doing a rhythmic-game with WME ala Guitar Hero/Rock Band. I've read through some forum posts regarding the state of some of the sound and music functions in WME, and it seems like it might be a bit of a challenge without MIDI support (not for the music, but the for timings of notes, although one could come up with their own binary filetype, I suppose); and clearly one would need to be able to keep track of the timings of OGG/WAV files rather precisely. Can this currently be done?

I realize, of course, that this engine is not designed for this specifically. However, as a professional composer who's worked on a few video games, I would be very interested in seeing further support for the music and sound functions. There are lots of really interesting things going on in this area of development at the big companies right now with beat-mapping and multi-channel music and audio.

Hope everyone state-side had a nice holiday.



Hi there!

Since you need to get the exact position of a song inside to make such a game, it's quite hard. I don't know if you can use the ticks-value that WME counts from start as kind of a "timeline", then it *could* work. The functions are all there, I just don't know if it will be exact enough.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Rhythm Game Possibility?
« Reply #2 on: November 29, 2008, 12:49:50 PM »

I wonder what time precision is needed for this kind of game.

But anyway, there's the global timer, so if you remember the time when the music started, you can get get the current point of playback. You'd probably want to create some kind of definition (using some external tool) which would contain time and action, and your scripts would need to load this definition and periodically check if the player performed required action at the expected time (with some tolerance of course).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: Rhythm Game Possibility?
« Reply #3 on: November 29, 2008, 03:05:02 PM »

I wonder what time precision is needed for this kind of game.

But anyway, there's the global timer, so if you remember the time when the music started, you can get get the current point of playback. You'd probably want to create some kind of definition (using some external tool) which would contain time and action, and your scripts would need to load this definition and periodically check if the player performed required action at the expected time (with some tolerance of course).

I thought about something like guitar hero, where you have to be very precise with timing the notes correctly the player has to play while the song is running. Thats not so easy, and it has to run the same way on every different PC, when the graphics runs out of synch you can put the game into the trashbin. Like the early versions of frets on fire, the PC Conversion of Guitar Hero, which had exact the same problem.
Logged

thamesonfire

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
    • View Profile
Re: Rhythm Game Possibility?
« Reply #4 on: November 29, 2008, 07:08:05 PM »

First, thanks for all the input.

Mnemonic, yes, this was basically what I've come up with so far as well:

I see the global timer runs in milliseconds, correct?

So you can use GetMusicPosition() or GetMusicChannelPosition() to sync the two. Then read from an external file at what relative time positions you are looking for keystrokes (obviously adding a margin of error for human motor skills :) ) and that should do it?

My concerns are these, and please correct me where I am wrong or ignorant:

1. I read a forum post about problems with GetMusicPosition(). http://forum.dead-code.org/index.php?topic=2773.0 Has this been fixed?

2. You might want to give the player a heads up about what's coming (ala Guitar Hero), and that's where I believe Spellbreaker is voicing his concern for maintaining graphical sync. I suppose you could script a way to periodically check sync as you go and make corrections for unwanted drift either way.

Truthfully, the precision of time required is not that loose, but certainly not accurate to the ms or anything like that. Music tempos are thought of in BPM (beats per minute). So, a tune in 4/4 (4 beats per measure) at 120BPM has two beats each second. So if you wanted the player to play 2 notes in the course of a beat, you're talking about a sync point every 250ms (give or take maybe 30ms either way).

Another couple questions about music functionality:

1. Does SetMusicPosition work without delay or is there a pause?
2. Do the loop points work without a pause?
3. When playing back multiple music channels at once can I maintain a tight sync between the two?

Clearly some of this stuff will be trial and error. But I appreciate your thoughts on the matter.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Rhythm Game Possibility?
« Reply #5 on: November 30, 2008, 10:36:04 AM »

I see the global timer runs in milliseconds, correct?
Yes.


1. I read a forum post about problems with GetMusicPosition(). http://forum.dead-code.org/index.php?topic=2773.0 Has this been fixed?
No, GetMusicPosition() is still somewhat off. That's why I suggested using the global timer instead. If you rememebr the start time, you can get current playback time at any point:

Code: WME Script
  1. var MusicStart = Game.CurrentTime;
  2. Game.PlayMusic("path\music.ogg")
  3.  
  4. // ... and later
  5. var CurrentPlaybackTime = Game.CurrentTime - MusicStart;
  6.  


1. Does SetMusicPosition work without delay or is there a pause?
2. Do the loop points work without a pause?
There should be no delays.


3. When playing back multiple music channels at once can I maintain a tight sync between the two?
Depends on what kind of synchronization you're talking about.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.062 seconds with 24 queries.