Good Questions!
I recently received some great questions about the Citrus Engine, and instead of responding privately, I thought other people might be interested in these answers as well. Here we go:
Q: How big can I make my level?
A: There is no limit to the size of a level, but just like any engine, the developer will want to run tests to make sure that loading, memory, and processor performance meets their minimum requirements. Personally, I have not made any unbelievably large levels, but I have seen other clients make levels as big or bigger than a typical mario level with no performance issues.
There are several ways that the Citrus Engine can handle large levels. Which way that you choose depends on your unique situation.
- Split large levels into sub-levels. Allow your hero to leave a screen and enter again in a new screen. An example of this is in Mario games when Mario goes down a pipe. You can pre-load your next screen while the player is going through the current one. Usually the next screen will be completely loaded by the time they get to it.
- If you want your level to be continuous, you can strategically design your levels to create “points of no return” so that occasionally you can stream-out (unload from memory) a part of the level that you know the player will not return to (at least not in this life). Then you can start preloading parts of the level that are further away from the player. Again, the streamed-in section of the level will probably be fully loaded by the time the player gets to it. These two methods can be used to keep memory and collision processing low.
- Push the limits of the engine (reasonably) to see how big you can safely make your level without killing slower computers.
Q: Can you animate with “sprite sheets” and/or MovieClips?
A: The Citrus Engine doesn’t natively support typical sprite sheets, but this is not normally a problem. The Citrus Engine follows an animation interface that is extremely flexible, allowing designers and developers to implement their own custom animation systems if they need to. The Citrus Engine, but default, uses the gotoAndPlay() method of MovieClips to transition between animations. This is very flexible and meets the vast majority of needs. You can find a tutorial on how to do this here.
Q: Is there a limited number of frames or animations that a game object can have?
No, just be respectful of load times if your game is being deployed on the internet.


Reader Comments
There are no comments for this entry.