@sejo thanks a lot for day 6 of the #uxn tutorial! Read/skimmed through it today, but planning on diving in and adding on to the Pong game tomorrow :)

I saw you're planning to discuss all the remaining devices next day, exciting! If you're taking requests, I'd love to see fonts in a future day. How they work and ofc how to use them, where to find sample files (uxn repo I think?), etc. Also linking to how fonts can be made. (Nasu? Also the unreleased #Slight from @zce)

@makeworld i'm glad you are enjoying it!

yeah, i wanted to discuss fonts e.g. for displaying the score, but it was too much already 😅 - i might add that as an appendix of some sorts

in any case, the monospaced approach for latin characters (?) would work similarly to the sprites frames animation in day 4. you'd have a tile for each glyph, all of them under a label, in order. you choose one by adding a corresponding offset to the adddress of the label.


@makeworld i like how the screen.tal example by @neauoire illustrates that: git.sr.ht/~rabbits/uxn/tree/ma

a nibble (resulting from AND) is converted into a short ( #00 SWP ) and multiplied by 8 ( #30 SFT2 ) to get a corresponding offset, as each tile is 8 bytes long.
that offset is added to the address of the font-hex label ( ;font-hex ADD2 ) that has a tile for each hexadecimal character.

the calculated address is then sent to .Screen/addr

· · Web · 1 · 0 · 3

@sejo @makeworld I tend to organize my pixel fonts following this table: wiki.xxiivv.com/site/ascii.htm

So, the character sprite "A"(#41) begins at (#0041 #0008 MUL2 SPRITESHEET ADD2)

If the characters were 8x16 instead of 8x8, then it would be #0041 #0010 MUL2 SPRITESHEET ADD2

I hope this helps :)

Sign in to participate in the conversation

Revel in the marvels of the universe. We are a collective of forward-thinking individuals who strive to better ourselves and our surroundings through constant creation. We express ourselves through music, art, games, and writing. We also put great value in play. A warm welcome to any like-minded people who feel these ideals resonate with them.