Game Lag Music Syncing Problem

Get help using Construct 2

Post » Fri Oct 12, 2012 9:38 pm

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.capxptbcomposer2012-10-13 03:29:07
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Sat Oct 20, 2012 3:52 am

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...
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Sat Oct 20, 2012 6:09 pm

A week and still no reply?
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Sat Oct 20, 2012 8:13 pm

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".
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Sat Oct 20, 2012 8:24 pm

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!
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests