HELP! Sidescroller-Lag-o-phobia: need tips on avoiding lag

Just started using Construct 2? Post your questions here

Post » Tue Jun 16, 2015 1:14 pm

I've been over the performance tips post, but I still have some questions. I've read that having too many objects, and objects that are too big can reduce performance. I plan to make a side-scrolling platformer/shooter heavy on atmosphere and story, and I want the environment to be highly interactive. that means a lot of objects. not necessarily destructible objects (although its an option) since adding physics would be the best way to do that and also a great way to give you lag, as I've read in the same post. Probably just putting in objects with a lot of animations.
tldr: Can I put "items" in just one sprite as animations spread on the map?

---Is it possible to have just the one object, but put in the "objects" as separate animations, and just set the animation for particular spots in the map? (like one object is a book, another a mirror, or a statue, etc...) instead of making an object for each and every item- is it favorable to just store them in one sprite with lots of animations? (Given you have an inexhaustible event sheet) and:

---Beyond what the performance tips post had, any other tips for optimum performance?
Posts: 1
Reputation: 177

Post » Tue Jun 16, 2015 7:06 pm

In what environment are you seeing lag? In a browser? In NW.JS? On your phone?

What is your cpu usage? What is your fps (search in forum how to add your own fps/cpu readout with a spritefont, as debug mode can cause a lot of slowdown).

The 'uni-sprite' method you mention is not one I'm particularly fond of, because all the frames and animations for the mega-sprite are loaded into memory, even those that aren't in use. So, probably not a good match for a platformer. That being said, there are situations where it's a good way to go (simpler games).
Don't lose your work. Backup your game with Dropbox.
Posts: 1,106
Reputation: 9,732

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest