framerate below 60

Get help using Construct 2

Post » Wed Dec 18, 2013 6:58 am

There's actually a simpler method to fake reducing the framerate. Set the 'clear background' property to no, then add to a variable 1 each tick. When the variable is above the desired threshold (5 for example to make the effect obvious), make all the layers visible for one tick.

Every tick
- add 1 to variable
If variable = 5
- make all layers visible
- set variable to 0
Else
- make all layers invisible

Using this method, you don't have to recode anything, but this will only work on platforms that don't automatically clear the screen regardless of c2's setting, though (I seem to recall there is a platform that ignores it), and needs the background to be completely obscured otherwise you'll get smearing effects.

Also, @jayderyu - don't use a condition checking if a variable equals a float/decimal - use integers instead. Because of rounding errors, floats cannot be relied on to be exact, they are very often off by a tiny amount and so the condition won't run.Arima2013-12-18 07:18:41
Moderator
B
91
S
32
G
33
Posts: 3,005
Reputation: 27,552

Post » Wed Dec 18, 2013 7:36 am

Yeah, so if there wasn't any native option I was thinking about somehow refreshing the screen way slower =P

Will test soon(tm). Thanks for the logic ;)
B
33
S
9
G
1
Posts: 156
Reputation: 3,024

Post » Wed Dec 18, 2013 9:06 pm

Wow, nice trick @Arima, works well. Thanks a lot

Not sure if I actually want to use it in my oldschool looking game, but I just put those events in a group and decide to turn it on or offOlivierC2013-12-18 21:08:34
B
12
S
5
G
2
Posts: 132
Reputation: 2,627

Post » Wed Dec 18, 2013 10:28 pm

On a side not C2's runtime will only redraw the screen if something visually changes. So you can carefully setup your events so things only change every 1/30 seconds. Of course as jayderyu mentioned it wouldn't really work with behaviors.

EDIT:
To add on to Arima's method you can use events like this:

Every 1/30 seconds
- make all layers visible
Else
- make all layers invisibleR0J0hound2013-12-18 22:45:32
B
85
S
27
G
85
Posts: 5,073
Reputation: 57,880

Post » Wed Dec 18, 2013 11:19 pm

ah yes indeed, even better. I idn't know you could attach an 'else' to this kind or event
B
12
S
5
G
2
Posts: 132
Reputation: 2,627

Previous

Return to How do I....?

Who is online

Users browsing this forum: menos30, mercuryus, RetroSpock, TRMG and 13 guests