12-04-2017, 08:16 PM
(12-04-2017, 08:44 AM)megamarc Wrote: Interface elements: you can check the SuperMarioClone C# sister project, it has an overlaid interface like the one you want. It uses its own layer and tileset, and "printing" values is done updating the tilemap in realtime. Please check HUD.cs, and the smw_hud resource (tmx, tsx and png)
This approach works well when you can fit the interface into small tiles and your interface elements are aligned to the tile dimensions.
In my case I have a big panel bitmap (320x23) and a bunch of HUD sprites that need to be put on top of that.
The sprites are small (16x12) but need to be put at the non-aligned places and can overlap each other (so I can't init them as tiles).
Actually, after you've implemented sprite pixel manipulation, I can create a layer with fake empty tilemap and one panel sprite, and just redraw my elements directly to that sprite when needed.
Or put the HUD elements on top of the panel as separate sprites.
Will give it a try.