Simple ActorsBackgroundOne common complaint about Stencyl is its inability to accommodate many actors on screen. Unfortunately for us, this notion is largely a misconception that's gone unaddressed for quite some time. Where does this come from?
Stencyl is powered by Box2D, an industry standard physics engine that provides sophisticated collisions and real-world physics out of the box. Every Actor created in Stencyl corresponds to an entity (called a "Body") in this physics engine. Box2D was never designed to support hundreds or thousands of simulated bodies on-screen at one time.
Do games need hundreds/thousands of actors on screen? Sort of.The solution isn't to brute force this and make Box2D faster. Few, if any games, need hundreds of physics-abiding actors on screen at the same time. So why are so many actors being created?
- Special effects, such as particles, are used to visually enhance a game and don't need to obey physics.
- Some games don't need physics at all, such as puzzle games and shooters. They could get away with pixel-based collisions.
- Some developers take pride in placing one-off "doodads" inside their scenes that are purely decorative.
All of these are cases where the engine needs to support hundreds, if not thousands of actors, but do not need physics. What we need is a way to opt-out actors from any form of physics. That's what simple actors are.
The Solution - Simple ActorsSimple Actors are actors that have no physics attached to them. They behave like regular actors in all other respects.
Simple Actors are perfect for environmental effects, particles and games where physics is unnecessary, such as puzzle games. Unlike regular actors, Stencyl can support hundreds, if not thousands of these on-screen at a time depending on the platform.
How does this differ from Simple Physics?In Simple Physics mode, actors obey a simplified physics model. This can potentially still drag the system down, unless you dump these actors into a group that does not collide with any other group.
How-To Create a Simple ActorTo designate an actor as a Simple Actor, mark the actor's mode as
Minimal under
Physics > Advanced.