toad.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server operated by David Troy, a tech pioneer and investigative journalist addressing threats to democracy. Thoughtful participation and discussion welcome.

Administered by:

Server stats:

303
active users

#pico8

17 posts12 participants0 posts today

A #Pico8 code minimisation tip that might be helpful if you are writing something for #TweetTweetJam:

Pico-8 defines 26 numeric globals with single-glyph names. Those numbers might be useful for something. Using the glyph takes only a single character, saving space compared to long literal values.

Here's a little Pico-8 program to print them all:

for k,v in pairs(_𝘦𝘯𝘷) do
if type(v) == 'number' then
printh(
k .. " = " ..
tostr(v,1) .. " / " ..
tostr(v)
)
end
end

A #Pico8 code minimisation tip that might be helpful if you are writing something for #TweetTweetJam:

Referring to an uninitialised variable is two characters shorter than using the nil keyword.

t[i]=nil (8 characters)

t[i]=z (6 characters)

You can use a character from the punyfont or kanji character set for the uninitialised variable to avoid accidentally using the name for something and breaking the logic.

A #Pico8 code minimisation tip that might be helpful if you are writing something for #TweetTweetJam:

Combining assignments into a single statement reduces token count but not character count:

x,y=1,2 (7 characters)

x=1 y=2 (7 characters)

You can remove whitespace between statements if doing so doesn’t merge the end of one and the start of the other into a single identifier:

x=1y=2 (6 characters)