# Inconsistent framerate

**URL:** <https://forum.kirupa.com/t/inconsistent-framerate/322164>\
**Category:** flash\
**Created:** [May 12, 2011, 4:35pm UTC](https://forum.kirupa.com/t/inconsistent-framerate/322164 "2011-05-12T16:35:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mono\_eric3](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mono_eric3/32/2499_2.png) [@mono\_eric3](https://forum.kirupa.com/u/mono_eric3)\
**Post date:** [May 12, 2011, 4:35pm UTC](https://forum.kirupa.com/t/inconsistent-framerate/322164/1 "2011-05-12T16:35:55Z")

</div>

Hello everyone!

I am having some serious issues with the framerate in my game and I’m wondering if anyone can help.

I am trying to create a game where a character runs from the left side to the right side of a large level at speed. I am currently aiming at a tile-based level layout and through a lot of experimentation I am still having the same issues.

Coming from an AS2 background (this is written in AS3) my first attempt was a grid of movieclips, which changed using gotoAndStop, this was quite slow.

I next used a sectioning method, that sectioned out and built the whole level and only displayed the required sections - this used a lot of memory, but the speed was okay, just occasional hitching.

I have since tried numerous different bitmap methods, and each one seems to perform well, but I just can’t seem to shake the occasional hitching.

I have tried both timing the update on an on enter frame event and a timer event with an updateAfterEvent call, with no discernible difference between the two.

It looks like the game update and the renderer are not syncing up and I haven’t a clue on how to fix it.

I have been searching for similar games to see if I am biting off more than I can chew, but the Mirrors Edge 2D game seems to handle a similar idea without such horrible hitching.

I’ve uploaded the a version here (use arrow keys, DOWN and RIGHT mainly): [http://www.realtimejunkie.co.uk/public/GameTest.html](http://www.realtimejunkie.co.uk/public/GameTest.html)

If anyone has any ideas, please shout.

Thanks in advance!
