Game Lag Music Syncing Problem

0 favourites
  • 5 posts
From the Asset Store
6 looping tracks to use in your games and projects. These tracks are in the style of the 1960s detective movie genre.
  • I'm making a DDR-type rhythm game to go along with my Way of the Sax comic. If I just let the game play without pressing any buttons, the music syncs to the music just fine. If I try to actually play the game by pressing buttons, the game falls behind the music.

    Ok, I know there's no way to make audio do what you want via HTML5 due to browser limitations.

    However, is there a way to make the game catch up to the music, like maybe some kind of framerate correction?

    To see what I mean, go to the game here...

    http://www.wayofthesax.com/wip/rhythmminigame

    First just let it play by itself; don't press anything. Music and game sync.

    Then refresh and try to play. Game begins to fall behind and by the end is way behind.

    Any thoughts?

    Here's my capx...

    http://www.wayofthesax.com/wip/rhythmminigame/rhythm%20game%20test.capx

  • I fixed it sort of, but now I'm having a similar problem that seems to change depending on which computer I use.

    Go ahead and try to play the game. The fourth indicator should NOT line up, but the first 3 do.

    This is for the latest release r107. On my laptop I configured the system to compare the enabling of the bullet behavior to my system clock. In other words, at prescribed times, the bullet behavior for each attack indicator is enabled. It works perfect on my laptop. Everything lines up at the top and with the music (button presses no longer cause a problem here).

    However, when I put it on my main computer, things don't line up anymore.

    I have very capable systems...laptop is a 2 year old Toshiba with a Core i5 and Radeon 5650...desktop has a Phenom II 920 and a Radeon 4850.

    The problem is with Construct. How can I get the game to stop lagging behind?

    Capx has been updated and "completed" or so I thought.

    Please use the links above...

  • A week and still no reply?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ok, finally I figured it out. No where on the site are there any clear instructions as to how to correctly use dt. How was I supposed to know that to make a perfect timer all I needed to do was have "Every tick -> add dt to system clock". That's it. Fixes everything. It's so simple, yet I had to piece this info together and narrow down my problem to the system clock event. Before I was telling it "Every 0.1 seconds add 0.1 to system clock".

    It seems to me that my original method should have worked because I thought that the internal timescale of Construct 2 already was independent of the framerate. Obviously it is not, and I couldn't find this info under the dt section in the manual. Construct 2's own time counter is not framerate independent, kind of making the whole time counting thing useless.

    Also, I'm a little disappointed that in a week, no one was able to even make a reply to this thread. In the past, replies have been fairly swift and helpful. Is everyone on vacation this week? I was out of town without consistent internet and still visited this site a few times from Kinko's and borrowing my neighbor's internet by standing across the street.

    However, I forgive you all. Maybe you saw "music" and "sync" in the same title and avoided it, knowing that audio support still isn't that good. For now, I seem to have fixed the problem on my own, but I'm still a little disappointed at the lack of response.

    Please feel free to check out the game. I'll go ahead and showcase this in "My Creations".

  • I saw the words "Music" and "Sync" and sort of looked the other way :)

    You must be having a touch time with this game, but hopefully it will work out for you!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)