Feature Overview
DBG()
Displays any timing value in real time.
- Executed with arguments, it stacks values for display.
- You need to specify 'd?' at the timing you want to display.
- When the stacked value display is complete, it is reset.
- This function consumes 71 Token.
function _update() dbg('Debug Test!',time()) end function _draw() dbg('d?') -- 'Debug Test! [time value]' end |
This function will be included in the next version(0.14.0) of KNUTIL library.
If you want to stop processing and investigate detailed values, consider DMP().
release note
I don't know what happened here. Pico-8 randomly crashed while making a game inside Voxatron. I will provide the Pico-8 log.txt here, but there doesn't seem to be anything useful. If this helps, the Pico-8 window was mostly inactive as I was more focused on fixing bugs in the game itself.
https://drive.google.com/file/d/1bSqA4TJfT0nd9yH3vvvyRLiR48wJdq5p/view?usp=sharing (Only @zep can access this.)



Feature Overview
AMID()
Returns the median of a given positive and negative number.
- It is used in controlling the camera and parameters that can swing either + or -.
- This function consumes 10 Token.
x,y=0,0 w,h=16,8 -- range of movement(*2+1) while 1 do cls(12) camera(-64,-64) rectfill(w,h,-w,-h,0) ?'⬆️⬇️⬅️➡️ key to move',-60,-60 x+=tonum(btn(1))-tonum(btn(0)) x=amid(w,x) y+=tonum(btn(3))-tonum(btn(2)) y=amid(h,y) pset(x,y,8) ?x..' '..y,-w,h+1,7 flip() end |
This function will be included in the next version(0.14.0) of KNUTIL library.
If you want to determine that two values are within range, consider INRNG().
Feature Overview
HTD()
Split a continuous string of hexadecimal numbers into a table.
- the number of supported delimited bits is 4,8,12,16 bits (1~4 nibbles).
- characters that cannot be converted to numbers are ignored.
- the result of the api's
tonum('0x'..v)
of the api.
- the result of the api's
- depending on the delimiter, a missing last character will result in a lower digit by the number of missing characters.
- This function consumes 30 Token.
local a=htd('12a30f',1) -- a={1,2,10,3,0,15} local b=htd('12a30f',3) -- b={297,783} |
Perhaps consider BUNPACK() if you want to separate NUMBER every few bits.




I'm new to PICO-8 here folks but absolutely hooked! I'm having a problem with my player shaking during movement as well as getting caught on my flagged sprites that the player collides with. I know some basics and have compiled this code by watching tutorials and scanning forums for code snippets but I think I am mixing some things that don't play well. I am really going for a smooth player movement vibe so I just added some acceleration rather than an abrupt "p.x+=1" movement style. It doesn't appear to show in my GIF but the player shakes violently during gameplay. Any ideas as to what could be causing this would be greatly appreciated!




yup, i decided to get lore put into my game, it is not complete yet but heres the description to start the lore before the game is done!:
Dive into the heart of the digital universe and embrace the role of Node 42, a digital storage unit with a destiny unlike any other. In "N O D E," a retro action-adventure game, you will embark on an epic journey to protect Nodekind from the malevolent threat of "The evil master"


ToriEngine - ECS Metroidvania Engine
I'm building an Entity-Component-System engine-thing to make platforming metroidvania games like Cave Story on Pico-8. I was initially building it for a Jam game, Tori Tower, but the engine fell out of scope x.x
I have run into some issues as I was building the code, and I'd really appreciate if anyone would like to help me here and there ^^
I'll start by explaining how the engine works, so it all becomes easier to digest later:
Architecture
An ECS (Entity-Component-System) is an architecture for games in which the World State is populated by Entities, which are simply containers (tables) who store values. These values are called Components, and each entity has its own set of components, which its own values assigned.
Entities hold no functions. The logic is handled by Systems, which are functions that make changes in the World State every frame. A system does so by filtering out the entities in the world who have components relevant to the system, and executes the function upon each entity selected.
Example: Moving system
A moving system moves every entity that is movable each frame.
So, the system _move
will filter out the world
table, so that it only selects the entities who have the move
and pos
component. Those components look a bit like this:
entity_that_moves={ pos = {x=30,y=64} --position component move = {vel_x=1,vel_y=0,max_vel_x=3,max_vel_y=2,acc_x=1, acc_y=3, friction=0.8} --movement component } |
Filtering out these systems, it'll run the logic for movement:
function(ent) ent.move.vel_x=mid(-ent.move.max_vel_x,ent.move.vel_x+ent.move.acc_x,ent.move.max_vel_x) ent.move.vel_y= --yadda yadda yadda you get the point end |
With that said, I'll explain how my engine is working.
The Core
The core is simple and compact, and credit goes to @selfsame for creating the system, and @alexr for building upon it:
https://www.lexaloffle.com/bbs/?tid=30039
-- basic function _has(e, ks) for n in all(ks) do if e[n]==nil then [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=132836#p) |
Feature Overview
ECPALT()
set transparency from palette table.
- Transparency is reset at each function execution.
- If the value of the "color id key" in the palette table is 0, the palette becomes transparent.
- The palette that was made black by
MKPAL()
can be used as transparent as it is. - The format is redundant due to the specification to match
MKPAL()
. - This function consumes 20 Token.
-- Make 6, 7, and 13 transparent. ecpalt({[6]=0,[7]=0,[13]=0}) spr(1,16,32,2,2) |
This function will be included in the next version(0.14.0) of KNUTIL library.
release note

Prepare for an exhilarating challenge in Firemageddon! Brace yourself as asteroids rain down from the heavens, threatening to reduce your city to ashes. It's a high-stakes battle where you're the hero, armed with the awesome power of water to extinguish the flames and save the day.
Embrace the thrill of blasting through wave after wave of fiery asteroids, each one a ticking time bomb. Your weapon? Water! Strategically douse the flames and rescue the city from its fiery fate. But that's not all – the adrenaline rush intensifies as you grab the rain powerup or wield the power jet water bottle to supercharge your abilities. Stay sharp, though, because every powerup comes with its own challenge, adding an extra layer of strategy to your firefighting frenzy.

Get ready for an adrenaline-pumping adventure in Zombie Shift! Step into the shoes of Rick, an intrepid undertaker on the graveyard night shift. But watch out, because things are about to get spooky. Meet Bob, the jolly but annoyingly hungry zombie, who's hatching plans to assemble his own zombie army!
Navigate the eerie cemetery as Rick, armed with nothing but your trusty spade. It's your mission to outwit Bob and put those newly risen zombies back to rest. Swing your spade with precision to lay them to rest, but remember, timing is key – swing too fast and they might shatter!
But that's not all, the graveyard's challenges are on the rise. As days go by, the cemetery becomes a battleground as waves of mischievous skeletons join Bob's cause. Fear not! With your spade in hand, you can whack those bony foes into pieces, or harness the power of the spade upgrade to launch a decisive long-distance attack.
Stay on your toes when Bob summons his speedy pal, Billy the ghost! This ethereal troublemaker is relentless and swift, but rumor has it that he's got a shocking weakness. Seek out the electrifying powerup to give Billy the shock of his afterlife and keep the chaos in check!
Keep in mind, Bob might be unkillable, but that won't stop you from putting up an epic fight! Use powerups to stun him temporarily while you continue your mission. Duck behind tombstones to escape his clutches, but remember – if he catches you, it's game over!
Get ready to bury yourself in hours of exhilarating gameplay with Zombie Shift. Are you up for the challenge of outwitting Bob, saving the graveyard, and having a blast while doing it? It's time to grab your spade and show these undead who's boss!



don't be penalized was created for the Pursuing Pixels Game Jam
https://itch.io/jam/pursuing-pixels-james-jam-game-gam-2/entries
90 seconds to make a max score... enjoy

Feature Overview
MKPAL()
Create a color swap table for use in PAL()
.
- This is useful for creating several color patterns.
- It is not an error if the number of elements in the swap table does not match.
- This function consumes 44 Token.
-- Color swap to darken "blue, white, and green". local p=mkpal({12,7,11},{13,6,3}) -- mkpal('c7b','d63') is also the same. pal(p) spr(1,16,32,2,2) |
This function will be included in the next version(0.14.0) of KNUTIL library.
release note
I want to automate calling the save @url
command so that I can get the https://www.pico-8-edu.com/ url for my cart programmatically.
Ideally I would be able to use a terminal command like
pico8 -export @url
which would output the url to stdout but that is not supported.
I noticed that the url query string matches the binary contents of a tiny rom export.
This would allow me to construct the url myself, but unfortunately
pico8 -export -t mycart.p8.rom
similarly does not work (the -t
flag is only supported when exporting from within the PICO-8 console)
Another possibility would be to parse the p8.png file for the compressed cart contents, but I'm not 100% sure that uses the same format as the tiny rom, and I would like to avoid it if possible.
Does anyone know if there is a way to do this?

