[HTML5 - Lime5.8.2 - Openfl 6.5.0] Possible Image.copyPixels optimization?

If overheat is the reason… well, my PC is more sh…ty than it looks: it crashes when launching a browser game, not even running it :cold_sweat:
Spritesheet parsing must be very heavy :sweat:

Maybe in the future I could consider the classic strategy of extracting the sprites when needed, as @CikaRaki suggested.

This obligues you to keep in memory both the atlases and the copies of the sprites. Tilemaps would resolve both this problem and mine, but it is not so easy to switch to tilemaps in my project.

Would be ideal to update the spritesheet library to use Tilemap under the hood, instead of new Bitmap with a copy of the tile data, perhaps it could use new Tilemap with the correct Tile number

1 Like

I will give it a (second) try in the future, it is pretty complex to do such a thing under the hood in my project.

Yep that’s the price you need to pay.

I did see this recently: https://github.com/miltoncandelero/mapsheet

Well, I have my own implementation, Tilesheet, as I told you, that is perfectly specular to Spritesheet, with Behaviors and AnimatedTiles too, and I also used it for my particle system, but replacing Spritesheets in my projects will take a certain effort, as the structure is very particular and I would like to apply a certain level of optimization.

Anyway I will surely take a look at this project, to see how it works and if it introduces some interesting ideas.
Thanks :wink:

Appearantly the crashes were caused by a bugged version of Chrome (again): now I have updated from version 63 to 64, and all games start and run ok.

:exploding_head::exploding_head::exploding_head:

1 Like