0 Favourites

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

  • 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?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
202 26,933
The Mnk's avatar
The Mnk
Unread hot topic
157 12,693
megatronx's avatar
megatronx
Unread hot topic
85 7,283
shimo's avatar
shimo