Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Free up sprite/animation slots?
#5
Don't worry by the memory. Each sprite takes about 100 bytes, so if you preallocate 128 sprites (SNES for example) it just takes about 13 kbytes. Nothing to worry about! Disabled sprites are free as they don't take any CPU cycles.

Yes, to check collisions with a given layer you must interrogate the layer tiles with TLN_GetLayerTile():
http://www.tilengine.org/doc/md_layers.h...totoc_md47

This just requires having the layer loaded with a valid tileset and tilemap, but it will work even if you've disabled the layer with TLN_DisableLayer() so it is not drawn.
Reply


Messages In This Thread
RE: Free up sprite/animation slots? - by megamarc - 04-07-2021, 05:49 AM
RE: Free up sprite/animation slots? - by megamarc - 04-07-2021, 07:02 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)