Timing issue on different platforms

Get help using Construct 2

Post » Wed Nov 04, 2015 12:11 am

Hello. I'm doing some rhythm game where timing is very essential but I haven't used to Construct 2 engine yet, so here is the technical issue that bothers me:
Music starts right after the layout is loaded, then I use "Wait" function to catch up with beat (i.e. 4 secs). After some time passes I change the variable that activates "Every 8 seconds" loop to spawn sequence of notes every 8 beats. So I expect it to start after 12 seconds and when I run this layout from the constructor (in browser) - rhythm is just perfect. But! If I start from previous layout and go to playable layout from menu - timer goes off 1-2 seconds sooner. If I build ".exe" and try it again - timer ends almost 4-5 seconds sooner. There was a bug that began notes' spawn few seconds later but I forgot how to repeat it. Anyway, these timings are terribly random and nothing good for gameplay.
Are there any specifics of engine I don't consider or should I use some other actions for synchronizing? Thank you.
B
8
S
1
G
2
Posts: 19
Reputation: 938

Post » Wed Nov 04, 2015 8:29 am

For timed events using the timer-behaviour gets the best results..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Nov 04, 2015 10:19 am

LittleStain wrote:For timed events using the timer-behaviour gets the best results..



this ^ and also try using delta time.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Wed Nov 04, 2015 2:12 pm

>>LittleStain
Oh, forgot about that behaviour. I've linked main event to timer's loop and notes appear at the right moment now. Thank you :)
Still, I don't get why it was so random earlier. Does "Every X seconds" event use another less precise algorythm? Should I ever use it then?
edit: By the way, is there any delay between loops of timer behaviour? It feels like rhythm began to go off slightly.
>>jojoe
Can I use dt outside of "Every tick" event?
B
8
S
1
G
2
Posts: 19
Reputation: 938

Post » Wed Nov 04, 2015 4:06 pm

Myrmex wrote:>>LittleStain
Oh, forgot about that behaviour. I've linked main event to timer's loop and notes appear at the right moment now. Thank you :)
Still, I don't get why it was so random earlier. Does "Every X seconds" event use another less precise algorythm? Should I ever use it then?
edit: By the way, is there any delay between loops of timer behaviour? It feels like rhythm began to go off slightly.
>>jojoe
Can I use dt outside of "Every tick" event?


What do you mean by an "every tick" event..
All events, that are not triggered events, are every tick events when their conditions are met..

Every x seconds uses the wallclocktime, which starts counting when the game is started..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Nov 04, 2015 7:35 pm

Every x seconds uses the wallclocktime, which starts counting when the game is started..

So whenever I activate that function - it's already started?
I mean, if there's "every 5 seconds" event which gets greenlight 2 seconds after beginning of layout - that doesn't really matter because I've spent unknown amount of time in the menu? Geez, I wish I knew that before I screwed my mind. Thank you for explanation.
B
8
S
1
G
2
Posts: 19
Reputation: 938


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests