Log In  

While experimenting with translating some "Zelda - Link From The Past" tiles into pico, I noticed that a lot of sprites save memory by mirroring the left half to the right one.

While the API allows drawing sprites mirrored along the x-axis, the map editor only permits one tile direction.

Would it be possible to add the ability to mirror sprites to the map editor as well?

P#10758 2015-05-18 01:46 ( Edited 2015-05-18 12:32)

One way to do it would be to add a bit to every map cell. If you partition sprite memory in half (one half for sprites that are map tiles, one half for others) then you could paint wrong-half sprites on the map to indicate the corresponding right-half sprite should be drawn, but flipped.

Another way to do it, if the proportion of flipped tiles are much smaller than the proportion of non-flipped tiles, is to have an exceptions table, something like:


Regardless, you probably end up doing your own map drawing, instead of map(), something like this:

for i=0,16 do
 for j=0,16 do
  local m = mget(i,j)
P#10760 2015-05-18 08:32 ( Edited 2015-05-18 12:32)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2022-12-01 02:19:47 | 0.005s | Q:10