Tiles or actors?


  • Posts: 129
I have a doubt, in the performance of the game, create actors or create tiles which are the most optimal.
as an example mario boxes would be better if they are actors or tiled.
Actors is easier to configure the tiles a little more complex. Or a hybrid between the two? For example, an actor creates a tile and then the actor is killed to leave the tiled in its place, since the tiles are created by giving them coordinates, and instead the actors can be placed manually and when the actor dies it leaves the tiled in its coordinates created.


  • *
  • Posts: 2737
Most of the time the difference is negligible, but there are some exceptions.

Using actors configured for decorative purposes (disabling collisions; no behaviors with update loops; etc.) is roughly the same cost as using tiles.

Actors with always or drawing events attached carry a little more overhead, but you may be surprised what you can get away with.

Using actors to create decorative tiles should be fine. If you're creating collision boxes, though, keep in mind that these tile collision boxes will not be merged into smaller, bigger boxes. This not only creatives additional overhead, but also having separate boxes side-by-side can create a scenario where moving actors get "snagged" by the box corners as they glide over the ground. This effect is very noticeable in platformers. There are ways to get around this, but it's a hassle.


  • Posts: 129
That hooking around the corners, it happens to me with the actors that I use as contiguous blocks. But I solve it by creating a circular collision in front of the player so he will never get hooked. I asked why I wanted to make blocks that are destroyed, put many on the screen, and I thought that if I made them with tiles that would cost less work to execute.