Screen flashes and stutter in sidescroller, FPS ~40

0 favourites
  • 8 posts
From the Asset Store
40 high-quality characters. This asset is perfect for a side scrolling game, or even a turn based RPG type game.
  • Hello,

    I'm working on making a Contra-like game and to teach myself I am working on replicating Contra Level 1 Jungle.

    I am unable to get the side-scrolling smooth. There is a stutter about once a second in the motion when walking. It's especially noticeable once you walk to the right enough to get past the water area (Controls are WASD, Space, Enter). Also the screen appears to get a bit brighter and dimmer when motion stops / starts. Possibly it's the same issue. And in debug FPS is about 40 for me (Chrome).

    I have a tilemap for the background and one for platform tiles (same source pic but with jump-thru behavior). Also there is a player sprite with a few animations, a couple bullet objects, and a couple invisible rectangles for detecting when in the water. Not many objects. Is the tilemap too big?

    Below is the link to the folder with the capx file in my public Google drive. If this isn't accessible please let me know and I'll use Megaupload or open a Dropbox account.I thank you in advance for any help. I can't proceed unless I can be sure performance will not be an issue...

  • Sorry, didn't know I couldn't post a link to my file...

    "Message: blue102 is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?"

    I think I found a way around it:

    [quote:3e8mtkr1]https://drive.google.com/folderview?id=0B57LPVRcA77tR3o5QUNMWmdtR0E&usp=sharing

  • IIRC there is a bug when mixing jump-thru and tilemap - see here.

    Recommendation seems to be don't mix the behaviors.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you for the quick reply zenox98.

    I deleted the tilemap with the jump-thru behavior, filled in the other one to look right, and threw down invisible jump-thru sprites on all the platforms.

    Unfortunately there was no change in performance.

    Here is a "link" to the modified capx version in my Google Drive:

    [quote:2hvv1rmk]https://drive.google.com/folderview?id=0B57LPVRcA77tc1hDSFRRME9NMlU&usp=sharing

  • Try turn off 'Pixel rounding' in the Projects Settings. Maybe that helps.

  • Thanks Asmodean, I gave it a try. No difference that I can see. I fiddled with the project settings a lot once I noticed the odd performance, but haven't found a combination yet that works.

  • I tried your game in FireFox and Chrome. The only difference with PixelRound off is that the scrolling is smother but for small hiccups in the beginning the game scrolls without problems with PixelRound on or off. It has stable 60 FPS and a CPU Usage from 2-6%.

    Be aware that if you use Debug with the tab Inspect it consumes a lot of CPU-Time.

  • Thanks again for the help, Asmodean. I had a CPU crash, did a reboot, and now everything is smooth again ftmp. Occasional "stutter" after landing on a platform. I hope I didn't wast anyone's time just because my computer was possessed.... :S I appreciate all the help and quick responses. Love this site!

    Edit: Also great to know about the debug CPU usage, thx.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)