Platformer Movement - low FPS

adytt

  • Posts: 51
Hello Stencyl mates, was wondering if there are some improvements that can be made regarding the Platformer Movement behaviours as for example I'm struggling to improve the FPS for a current project.
Testing on simple scene (details bellow) once the actor starts walking the FPS drops from 60 to as low as 36, rising up to 43, 45 going low again and so own, being most steady in the 40 - 45 FPS range.

Scene details only include:
- 1 layer - tileset
- 1 actor (featuring the following behaviours: Animation Manager, OnGround, Walking, Jumping, Ducking, Slowdown, Hurt, Cannot Exit Screen, Camera Follow, )
- no background
- no drawing inside scene for score, lives, coins etc .

The only modification done to the standard package downloaded from StencylForge was to the walking Behaviour by adding playing a step sound on frame 0 and frame 3 of each walking left or right animation (each animation has 6 frames ) inside WhenUpdating

Removing the sound code only improves to FPS to a maxim low of 45

Test was performed on HP EliteBook -  i7-3520M CPU @ 2.90GHz   2.90 GHz , 16GB RAM SSD , WIN10 64bit

Test was done using the integrated FlashPLayer.
Another test was done after uploading the HTML5 (FPS MONITOR enabled) on an actual server and the results displayed were constant 39FPS

Testing the HTML5 game (simple scene actual) from a Andoid phone playing in browser resulted in a constant 59FPS, yet the steps sounds were sometimes missing when constant holding  the virtual button down. sounding like it would only play on frame0, not frame 0 and frame 3

Also checking the Onground behavior looks like the WhenUpdating event runs every frame

Any help would be kindly appreciated!



« Last Edit: July 16, 2021, 02:54:14 am by adytt »

Max Marin

  • Posts: 138
Where did you get that behavior from?
I'm human

adytt

  • Posts: 51
Where did you get that behavior from?
It's available freely on StencylForge