Hello.
I was writing some code and came across this curiosity.
Now we all know that if you place a comparison inside parentheses that you neither need the THEN or END command.
if (a==b) print("match") |
However I am doing a comparison inside the comparison, nested, and it does not seem to work.
if (x<0) y=y-1 x=5 if (y==12) y=16 |
Any ideas on how to get this to work, guys, without using THEN or END, or is this a BUG ?




I've been hitting the PICO8 website for years now but just recently I noticed that the "Forum" link in the PICO8 site menu takes you to the Cartridges/Releases sub-forum and NOT the main forum...and that's not good.
Shouldn't the main menu link take you to the forum landing page?
I've just assumed that clicking the main menu link takes me to the starting point and I drill down from there...not that it has done some drilling for me already.
Now that I've paid attention to this, I'm seeing A TON of threads I never saw before that I'm interested in. One challenge forums have is duplicate and buried posts but if the site makes it hard to see all posts in the first place, it doesn't help.
This is the forum start page: https://www.lexaloffle.com/bbs/?cat=7
This is the where the "Forum" main menu link goes: https://www.lexaloffle.com/bbs/?cat=7#sub=2


This might be too broad of a question...but how do you create and manage timelines for actors in your game?
A lot of my games involve waves of enemies coming onto the screen, a la shmups and runners. I've made several games at this point that need these types of timelines but I feel like I have to create a new system each game. I haven't come up with a method/process/flow that I feel is reusable and that bothers me :)
A common pattern I use is a delimited string that gets parsed into an array that outlines which actors should appear and when based on timing (spawn after X seconds). It works okay but that giant string often requires external tools to create and often ends being very specific for the game - which isn't bad per se, just clunky.
I guess I don't have a problem to solve here...just looking for insight as to how others handle it or have dealt with it in their own games.












Small puzzle game created in PICO-8 for Github Game Off 2022. Help the mouse to leave the rooms by getting the elephant to break the door!




Just a little cart I made to play around with some 3d projection.
I also used the idea from this post to avoid storing the confetti in an array.
⬆️ fwd
⬇️ back
⬅️ left
➡️ right
🅾️ down
❎ up
Edit : made some adjustments after understanding the math better and added documentation



Feature Overview
BPACK() pack the value of the bit specification with bit width.
- If multiple bit values are specified, pack toward the most significant bit.
- To start bit packing from the decimal point bit, set [number s] to a negative value.
- If there are fewer bit width elements for the value to pack, the bit width elements are rotated.
- This function consumes 38 Token.
v=bpack({8,4},0,0xff,0xb) ?tostr(v,1) -- 0x0bff.0000 (bit-left-shift:0) v=bpack({8,4},4,0xff,0xb) ?tostr(v,1) -- 0x0bff.0000 (bit-left-shift:4) |
This function is included in the KNUTIL library.
release note
This is probably a huge request, but it would be super useful for me.
Nowadays, most of my Pico-8ing takes place on pico-8-edu.com on a school-issued chromebook. Which means it's bad. It randomly decides to sign me out, reload tabs, and/or clear my downloads folder. So I have to backup all my projects to Github daily or I risk losing my project. My friend @Ummmm_ok lost progress on like 3 games he'd been working on when his tabs reloaded and hadn't backed up in a while (he has the same situation as me).
It would be extremely nice (in my opinion) if the education edition worked a bit more like Scratch, where the projects are linked to an account and saved in the cloud. That way, it wouldn't be as much work to back it up all the time.
Perhaps there would just be a button in the top right corner with your username and profile picture. When you click it, it gives you a list of all carts saved on your account. Then you can click one to load it. It would autosave like every 30 seconds or so, or alternatively you'd have to manually save like it is currently.







i did a cover of starjump from Celeste for @ooooggll and thought i should put it here :)
i quite love love love starjump but couldn't do it justice (especially the baseline, anxiety parts) but whatever hope you like it.






Arrow keys - Move cursor
(X) - Confirm, pick up pieces, drop pieces
(O) - Cancel
Enter - Menu
Shape of Mind is a simple puzzle game similar to Solitaire card games. Connect shapes by dragging them on the board. Shapes of the same color won't connect. You can move strips of connected shapes by grabbing the top-most shape of a strip. Drop shapes onto the Dreamer to begin a Halo. Shapes in the Halo cannot be removed. Once a Halo is complete the shapes will disappear. Complete three Halos to clear all the shapes and win the game!










Feature Overview
BUNPACK() slice the value with bit width.
- by specifying the argument after [number w], a value of up to 32 bits can be sliced.
- set [number s] to a negative value to start the slicing from the decimal point bit.
- This function consumes 30 Token.
a,b=bunpack(0xf8,0,4,4) -- Value, First bit-shift, bit-width, ...[bit-width] ?a -- 8 (0x8) ?b -- 15 (0xf) |
This function is included in the KNUTIL library.
release note
stars={}
for s=1,10do
add(stars,{x=128,y=128,spd=rnd(3)})
end
for i in all(stars)do
i.x-=i.spd
pset(i.x,i.y,7)
end
hey! super quick and basic question, feel like ive definitely done this before but i am just not thinking hard enough rn but why isn't this working? no errors are being thrown so i feel like im definitely forgetting something super basic thats making it all break but i am still a beginner and can't seem to figure out what. ty for any help!

.png)
vector.p8
a simple and lightweight (in tokens) vector math library for PICO-8.
usage:
load #vector_p8
and save as such: vector.p8- remove all the demo code; it's in the second tab
#include
in any cart you want
functions within:
> NOTE:
> vectors are just normal Lua tables with x
and y
fields, so you can pass any table that contains x
and y
to any of the functions and they will work regardless.
creation and management
vector(x,y)
- the main function. x
and y
default to 0
v_polar(angle, length)
- makes a new vector using polar coordinates
v_rnd()
- returns a normalized vector with a random direction




I'm going to start with my general understanding and label questions [Q#] with the hope someone can fill in the blanks. Consider the discussion of 'cost' in terms of speed/cpu. I'm hoping there's a general concept I'm missing that will cleanup the flurry of questions around [Q2], regardless please bear with me:
General code is written topdown like the below where you define the function at the top and then you can simply call said function below that point to access the block inside. I don't fully understand the cost, in terms of lua itself, associated with defining 'function a()end' (the pico8 wiki has general pico8 cycle costs). My understanding though is the program won't look inside of the function 'until' I call it and so there is simply some generic predefined 'base cost'(cpu cycles) to defining a function and this cost is not affected by the number of parameters or whatever is inside the function....tldr it's always a flat cost each time the compiler/better-word runs down that part of the page and sees you want to define a function. So this usually amounts to the general idea of 'define the function once at the top of the code' and then call it as many times as u need where u need to after:


