v1.0
Features:
- Dynamic Name Tab
- Simply Formatted
- Light Weight
Cons:
- Manually add a new line using '\n'
- Name Tab doesn't like special characters
Rather than assuming every character to be 3 pixels wide, you can print the name offscreen and get print's return values to know the pixel dimensions of the print, then print onscreen based on that and add your name border accordingly. You could handle multi line names, even, if you grab both x and y return values. Not sure that extra feature would be worth the tokens, though.
About the \n in the text string, nothing stops you from using a multi line string with [[ ]] if you prefer.
And if you really want to be able to call the function multiple times to do sequences of prints in the same window, you could use currying. (the text function returns a function, so you can do text("name",line1)(line2)(line3) for example. )
Note that currying is seldom used in pico-8 because of the high token cost of calls
@0xFFFF967F , Lua has a lot of non obvious powerful features. If you tell me you developpers background, I may be able to highlight what's new for you.
For me, the biggest discovery was related to the fact that functions are basic element of the language, at the same level than numbers, boolean, arrays or nil. Things like
spr=trace(spr)
where you change the behavior of a core function felt pretty wild at first.
[Please log in to post a comment]