By the way, I was one of the few who voted “We’re not ready”.
I think we’re missing a couple of things yet.
@FManga proposed to add a way to get some UI separate from TAS’ Tilemap and Sprites layers.
It’d be especially useful for MicroPython games it seems.
So I’m in the process of making one for TAS. It’s basically a new, independent tilemap, with a tileset (containing all the ASCII characters but also special tiles), allowing the creation of a simple UI made out of boxes, gauges, fixed-font texts, etc. The inspiration is clearly from the Final Fantasy series and old RPGs from the NES/SNES.
I’ll post more about that subject later, but here is a small preview I already posted on Discord yesterday:
- Terminal-style text printing.
- Facilities to draw a Box, a Gauge (e.g. FF’s RTB bars), Checkboxs drawing.
- Movable (like in the gif) using offsets.
- Uses a single, huge image of 6x768 8BPP as a tileset.
- A few tilesets will be made for the Jam.
- Tilesets can be switched on-the-fly.
- Made for TASMode & TASModeLow, enabled with a single macro from the Settings.
More to come about that subject!
PS: Sorry, I’m not fond of the weird smiley in the example project, so I replaced it with one of my own characters’ sprite
Great, as I am going to use Python for the jam
Btw. How much is the UI system going to use ROM and RAM?
- Each 8BPP 6x6 Tileset would use 4608 B of FLASH.
- Could be halved if using 4BPP tilesets, but that’ll require a specific script in femtoide to generate them. Additionally, it’ll drain more CPU and make palette handling more complicated.
- The generated code cost is unknown yet. I don’t think it’ll go above 2000 B, the code is not very elaborate and the compiler is given a lot of constexpr etc to optimize stuff away.
- The Tilemap currently takes 1136 B in RAM.
- 1110 B are used for the tiles themselves.
- The remaining 26 B are more likely to grow a bit more.
It’s going to change as I implement more things, but it should remaining along these lines.
If I implement anything that costs a lot, in RAM or FLASH, I’ll make it optional (I’m thinking about color-per-tile).
I would love to expand my TileSet tutorial to include this when you are finished.
That’ll be a pleasure!
(Sorry, I kind of hijacked this topic for that component)
A few news about the UI Tilemap!
I’ve optimized a bit the whole so it could be more usable.
Here are some stats, using the default TAS project.
- A - No Sprite, TAS Tilemap, No UI Tilemap - ??? FPS (emu - 65 FPS)
- B - No Sprite, TAS Tilemap, Full UI Tilemap - 31 FPS (emu - 40 FPS)
- C - No Sprite, No TAS Tilemap, Full UI Tilemap - 45 FPS (emu - 55 FPS)
- D - A single 12x12 Sprite, TAS Tilemap, “Stairs” UI Tilemap - 47 FPS (emu - 58 FPS)
- E - A single 12x12 Sprite, TAS Tilemap, “FPS Counter” UI Tilemap - 49 FPS (emu - 60 FPS)
- F - A single 12x12 Sprite, TAS Tilemap, Blank UI Tilemap - ??? FPS (emu - 60FPS)
- G - No Sprite, TAS Tilemap, Blank UI Tilemap - ??? FPS (emu - 60FPS)
There are still a bit of room for improvement, since I still get only 60 FPS for a blank UI Tilemap (case G) vs 65 FPS for no UI Tilemap at all (case A).
In any case, these performances are now acceptable for me. I don’t expect much of the screen to be covered by this UI system when in action, so the 31 FPS shouldn’t be something that happens too much.
Today and tomorrow:
- I’ll work on the actual API, making it as nice as I can.
- I’ll also take a look at a way to do some recoloring for tiles, if I get enough time to do so.
“Stair” made of FPS counters
FPS Counter alone