bsergent / overmorrow

Typescript canvas game engine
http://challengercity.com/v4/projects/overmorrow/
0 stars 1 forks source link

Layer support for AnimationSheet #49

Open bsergent opened 5 years ago

bsergent commented 5 years ago

A limited number of layers would be very beneficial. Primarily, this would allow for hidden layers to be kept in the original Aseprite file with important mapping information (collision, held item points, specular) that would not be rendered. See #36 for more details in held item mapping. It might also be useful for drawing items over and under the player, but that can already be done to a limited extend with the limit being that the entire player sprite must be drawn either in front of or behind items. This could also be useful for laying armor or something.

Another possibility is removing the need for a separate image and .json metadata file by just loading .ase files and parsing them into images on load. This solely depends on how stable and complicated .ase files are. See this page for the file format specifications. Looks like a lot of work to support.

Yeah, loading .ase files seems a bit complicated, so maybe it would be more beneficial to just write a script that generates multiple files (image, mapping, metadata .json). Something could even be written to translate the mapping image into fields w/n the .json file.

bsergent commented 5 years ago

If adding layer support, it would make sense to rename AnimationSheet to Sprite as its functionality is already beyond just animations.