LynxJam2023 - day 9
Hero Dust » Devlog
I spent the last days working on the game engine.
While trying to optimize the text part, I browsed CC65 TGI driver to look how it handles text.
I talk about tgi_outtextxy( ) mainly.
What it does :
- store x,y on 2 zero page vars for faster access
- call outtext native method
- compute size based on number of characters
- create a bitmap of this size
- copy each char bitmap from the tgi font to this large bitmap
- create a sprite with this large bitmap as sprite data
- compute size (again !) based on number of characters
- add it to store x,y
So
Pros :
- you can use tgi_outtext right after, the text will be at the right position
- you can also use tgi_gotoxy any time
Cons:
- The size is computed twice so we lost ticks
- The bitmap isn't cache (and you can't get it either to cache it yourself), so it's done EVERY frame
- You can't change the font
- You could make you're own outtext with own font...but you can't remove the native one so more bytes lost
Get Hero Dust
Download NowName your own price
Hero Dust
Status | Released |
Author | KanedaFr |
Genre | Role Playing |
More posts
- LynxJam2023 - day 11Dec 09, 2023
- LynxJam2023 - day 10Dec 07, 2023
- LynxJam2023 - day 5Dec 01, 2023
- LynxJam2023 - day 4Nov 30, 2023
- LynxJam2023 - day 3Nov 29, 2023
- LynxJam2023 - day 2Nov 28, 2023
- LynxJam2023 - day 1Nov 28, 2023
- LynxJam2023 - day 0Nov 28, 2023
Leave a comment
Log in with itch.io to leave a comment.