jarcane / minicosm

A FP-oriented game engine inspired by universe.rkt, written in Clojurescript
24 stars 2 forks source link

"splitting" sprite/tile sheets #5

Open jarcane opened 4 years ago

jarcane commented 4 years ago

It would be useful to add support to the loader for automatically splitting up sprite/tile sheets into an array of sprite values. Providing all sprites as a single image and then splitting is standard procedure for most engines, and it's way more efficient when maintaining assets.

This would need a new item type for the loader syntax, and may require bringing in some image processing library to do the necessary manipulation, though this would compromise my goal so far of zero dependencies. I would guess this may be tricky to do manually in pure javascript as the available tools have some distinct footguns. Any advice would be recommended.