Full Screen speeding things up

New releases and general discussions.

Post » Mon Jan 25, 2016 2:54 am

Ok the problem I seem to have is when I put it to full screen things start to speed up.

Here's an example.

I have a private variable for a shot timer. set to 0 at default.
I also have a private variable called Shot Time set to 20.

I have it so every tick add 1 to shot timer, and a separate event saying when shot timer is greater than shot time, it spawns a bullet and resets shot timer to 0.

When on full screen it fire exponentially faster.


Edit
Well I set it so when increment the shot timer by 1 * TimeDelta it fixes the issue.
B
5
S
2
G
1
Posts: 11
Reputation: 997

Post » Wed Jan 27, 2016 9:04 pm

1st, if this is for Construct Classic (and not C2), it should be moved into Help.

Secondly, I would recommend using the clamp(a,b,c) system function for timers instead, as it is much more reliable.

have a private variable "timer"

"timer" greater than 0
>set "timer" to Clamp("timer" - 100 * TimeDelta, 0, 500)

[[The "500" corresponding with 5 seconds, 300 with 3, etc. I've been told that having things in multiples of 100 is easier and better in the long run, as calculations with values less than 100s can be buggy.]]

"timer" = 0
>sprite : create bullet
>sprite : set "timer" to [insert number here]
Check out my VGM on my soundcloud page!
Video-Game Music: E.C.2151
B
9
S
3
G
2
Posts: 194
Reputation: 1,713

Post » Wed Jan 27, 2016 10:16 pm

Thanks I will give that a try.

Thank you also for telling me where to post.

I just clicked on construct classic discussion, and figured the page was for construct classic.
B
5
S
2
G
1
Posts: 11
Reputation: 997


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest