Frage

Using the SKTextureAtlas in Sprite Kit, and my game is still not going as fast as I want.

I have a lot of different weapons that get use in the game but the player can only use 1 at once. I have a big texture atlas with 30 of them in it, but I thought: Maybe these don't need to be in an atlas, since they are changed very rarely (maybe every 1-2 minutes)

Does that make any sense, should I just use those outside of an SKTextureAtlas maybe?

War es hilfreich?

Lösung

The idea of a texture atlas is to put as many images as possible that are or could be displayed simultaneously in the same atlas.

Only if removing the weapons allows you to put more simultaneously used images into the same atlas will you see any benefit from not putting them in the same atlas.

If on the other hand your atlas contains only weapons, and you did this kind of separation for most other game objects too (ie one atlas for each specific enemy etc.) then your texture atlases aren't nearly as effective as they could be.

Again, the guiding principle is to have as many images displayed simultaneously in the same atlas. Atlases are not intended for grouping images by category or object type.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top