Hi!
This question is about Qiso isometric engine.
To create a character we need to load a spritesheet. Also, we can unload this recently loaded by .remove and set it’s reference to nil. Okay.
But we are bound to use Qiso .addCharacter() function instead native sprite and it is requesting a spritesheet to work with. But I found no functions to change this spritesheet without creating a new character. To dinamically load another spritesheet we need to destroy the old and add a new one.
If we are NOT talking about pixel art games:
one 180x180 frame use 180w * 180h * 4rgba bytes ≈ 130KB of video mem.
animations are of 12…24 frames length (16 average)
130 * 16 ≈ 2 Megabytes per animation.
To have smooth isometric result i’m using 16 directions with 22.5 degree step
2 * 16 ≈ 32 MB per animation
Each character/monster has at least 3 attack + 1 death + 1 hit + 1 idle + 1 run animations
32 * 7 ≈ 220 Megabytes per ONE viable
Each frame you can render up to 5 viable(s) - Player(s)+Mobs.
This turns in a gygabyte of mem without taking into count tilemap with many layers, props, sprites, etc.
And 4 Gigs for modern resolution and 320x320p sprites.
So from ancient ages all RPGs are loading sprites dinamically, with culling, player view radius logic processing and this way I did it on other engines.
So I’m wondering if you, guys, have some optimized/tested strategy how to do this in a best way?
Best way to realtime load and swap to another spritesheet for Qiso character?
The bruteforce way is seen as to create another character with another spritehseet and just swap it’s visibility with old one (and destroy it in background). Seems much more effective would be to change internal link to other spritesheet or so?
Forgive me my dumb question, I havent dived under the hood of Qiso yet. Thanks in advance for all answers!