Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

How to use Symbols?

A topic by paul codes created May 07, 2020 Views: 254 Replies: 4
Viewing posts 1 to 5

In order to save some characters, I want to use symbols such as 웃.
I'm working with TIC80 but I absolutely don't know how to use these symbols in my code.
Thanks in advance!

Submitted

Hi Paul, in pico8 these are typed with shift key - so they appear instead of big letters :)

HostSubmitted

Hi Paul! As gerwazy said, it's fairly easy in PICO-8 using the shift key, but I'm not sure about TIC-80! One thing that I've done in the past is combined letters to create images. So, you could combine an O and an M, and stack them on top of each other to mimic a glyph. Might be the only way to go if TIC-80 doesn't support them!

Submitted(+1)

I’m new to TIC-80 (and jams and Itch…), but it looks to me like the TIC-80 font doesn’t even include symbols that aren’t on a standard US keyboard.

I used a * and a circle to get a spiky coronavirus-looking enemy. And then a circle and line for the player’s “cell” and turret.

I toyed with trying to either poke in sprites from code or memcopy from the screen to a sprite after drawing from code. It’s doable but takes up probably too many characters for this challenge. On the other hand, it is a challenge….

But yeah it looks like Pico-8 has several advantages for a “tiny code” challenge over TIC-80. Pay to win! Pay to win! (Just kidding!)

font ref:

https://itch.io/t/80843/font-availability#post-163418

https://fontstruct.com/fontstructions/show/1388526/tic-80-wide-font

Submitted (2 edits)

I got curious again and tried harder. There do not seem to be any symbols outside of ASCII values 32 through 126. There is a second set of the same but skinnier starting at 160 (32+128).

My local Lua 5.3 seems to have a utf8 module, but the Lua inside TIC-80 doesn’t.

Here’s the code to look at all the available characters in TIC-80:

cls()

first = 32
perrow = 32

for i=first,255 do
    print(string.char(i), (i-first)%perrow * 7.5, (i-first)//perrow * 10)
end

-- This gives an error in TIC-80 but works in a local Lua 5.3.5 install
-- print(utf8.codepoint("웃"))

function TIC()
end