I needed a way to display graphics without using sprites/ or tiles.
So I wrote a small python script that takes an 128x128 image, finds the best matching colors from either the normal or secret palette (or the best 16 colors of both) and stores that in a data string.
If there's interest I can share the python code - main reason I haven't done so is, that I haven't made he python script user friendly :)
No sprites used in this demo.
You can download the image -> string conversion tool and some example code here:
https://github.com/iSpellcaster/pico8rle








Hey all!
Here's a project I started about two years ago and just finally got around to finishing. It's a simple Shmup reminiscent of a Galaga or an Invaders, but with a few fun twists.
Featuring:
-Six enemy classes with unique weapons
-Randomized waves
-Shop system
-New in Version 1.1:
--Bossfights!
--Music
--Persistent Highscores
--General Bugfixes
If you want to download a standalone game, it can be found for free over at https://kepler-softworks.itch.io/gravitaz
I also have a short video talking about some parts of the code (enemy logic and the particle system) a bit over on my Youtube channel at https://www.youtube.com/watch?v=IVEEdj82Biw
Feel free to rip out the particle system and use it in your own projects, I really enjoyed using it, and I think with a bit of modification, it could be expanded upon for a lot of other things.
I hope you all enjoy this little game, I know I enjoyed making it, and let me know what your high scores are!
Edit Aug 4, 2022
Decided to come back to the game and try and improve it a bit. Still a few things I'm not super happy with, so there might be a version 1.3 eventually.
-New in Version 1.2:
--Better logo!
--New Space Dust!
--Stars are less distracting now!




Hey Team,
I'm new to Pico 8 as of about a month ago, and just made a super simple game as a joke for a friend. I exported the html and js and posted it on itch.io, but when I'm using Firefox, about 75% of the time the player seems to think that the pause button and the x button are being pressed constantly. It works great on Chrome, so it's something specific to how Firefox is interpreting the code. I would love some insight, if anyone has any ideas.
Here is a link to the game: https://keithamhere.itch.io/echonest-the-game?secret=LlU4RobXGkyakrhjhWze4J9wTQ
Thanks!


I wanted to create background images w/o having to use tiles/sprites for that.
So I'm wroting a small python script, that takes a 128x128 png, reduces it to the most commonly 16 used colors from the pico8 palette, does RLE encoding on them and outputs the values as a string.
This string can then be imported into pic8 and used to render your background image.

The python part is not yet perfect (I need to write the custom palette generation code), but if you limit it to one of the two pals, it kinda works.
End even when re-drawing the bg from the data every frame, it's kinda ok.
The encoder and the functions to use the result can now be found at: https://github.com/iSpellcaster/pico8rle
Here's the code of the latest version.
Includes base64 encoded of variable sized sprites than can be flipped. Should run after copy and paste, nothing else required.
To encode your own images, check the github link above.
function _init() state = "title" title = explode64(kanji_rle) batman= explode64(bat_rle) antiriad = explode64(antiriad_title_rle) ryu=explode64(ryu_rle) t=0 _draw = draw_title start_t = time() end function _update() t+=1 if btnp(❎) then if state == "title" then _draw= draw_batman setpal(bat_pal) state="batman" elseif state == "batman" then _draw= draw_antiriad state = "antiriad" start_t = time() pal2() else _draw= draw_title state = "title" start_t = time() pal() end end end function draw_title() local i,ofs,y ofs = flr((time()-start_t)*45) ofs2= flr((time()-start_t)*2) --rectfill(0,0,127,127,ofs2%4) cls() y = ofs%250-100 if y > -127 then spr_rle(title,(128-title [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=79494#p) |





Greetings Everyone!
I've been thinking to do a cool project for my school. I want to create a 128 x 128 LED wall display of 1 to 2 meters diagonally. I've been looking at DIY one with LED Strips or LED Matrix (ws2812b type). I think a raspberry pi can drive the display and also run the Pico-8 player software (only for playing, the editor is not needed). So far I have no idea how to do this. I know how to solder and wire the LED but they seem very expensive.
The idea is to have a giant screen outside for students to play. We can use a camera (maybe a raspberry pi 4 can also due the video AI analysis) to detect the student's movement as d-pad and buttons input. We can have a sort of QR code that will redirect students to a webpage for them to upload their game cartridges (will have to manually approve them to avoid strange things displaying on the screen publicly). This will promote students to start coding in order to play their games on the big screen.
I'm a 5th grade science and math teacher but I'm also an Electrical Engineer with a minor in robotics and automation.




I've just kinda been playing around and suddenly I felt like doing something with fractals. I saw a few Lindenmayer system tools posted on here, but they didn't quite have the features I wanted. (If you'd like more, you could suggest some too.)
The first line is the starting state, the second and third are replacement rules, the fourth is your palette of symbols plus a couple settings.
… is blank, ⬅️➡️ are rotation, ˇ∧웃 are variables that move the cursor forward, ●♥♪ are variables that don't.
O and X both work as confirm buttons, but also increment and decrement the iteration and angle numbers.
The pause menu lets you change the step length or cycle through a few presets.
Some things that might be useful.
Dark palette
Usage:
l: how strong the darkness effect should be
dpal={0,1,1,2,1,13,6,2,4,9,3,13,5,2,9} function dark(l) l=l or 0 if l>0 then for i=0,15 do col=dpal[i] or 0 for a=1,l-0.5 do col=dpal[col] end pal(i,col) end end end |

Circle map
Usage:
x,y: coordinates to draw the map
r: radius of the map to draw
function circmap(x,y,r) for y2=-r,r do x2=sqrt(abs(y2*y2-r*r)) tline(x-x2,y+y2,x+x2,y+y2,(x-x2)/8,(y+y2)/8) end end |

Can be used with dark palette to make a light:
[hidden]
-- circle map function function circmap(x,y,r) for y2=-r,r do x2=sqrt(abs(y2*y2-r*r)) tline(x-x2,y+y2,x+x2,y+y2,(x-x2)/8,(y+y2)/8) end end -- function to darken the palette function dark(l) l=l or 0 if l>0 then for i=0,15 do col=dpal[i] or 0 for a=1,l-0.5 do col=dpal[col] end pal(i,col) end end end function _init() -- dark palette dpal={0,1,1,2,1,13,6,2,4,9,3,13,5,2,9} t=0 x=64 y=64 r=32 end function _update() -- circle position and size x=64+sin(t/100)*32 y=64+cos(t/100)*32 r=32+sin(t/50)*16 -- timer and loop t+=1 end function _draw() cls() -- darkens the palette 2 times dark(2) -- draws map map() -- resets palette pal() -- draws circmap circmap(x,y,r) end |




Hey, I'm Triple.
This is my first Pico-8 cartridge! It was fun experimenting and creating it.
It's a clone of 'Ice Fishing' on Club Penguin.
In this game, you have to reel in 32 fish while avoiding sharks from eating your hook and crabs cutting your line.
You can also decide to save your final fish to catch Mullet, the larger fish.
I know the game is a bit rough around the edges. There is still so much more for me to learn and improve on. Constructive comments are appreciated!
-- Changes
I implemented some of the feedback into the game:
> Added some animations for reeling in the fishes.
> The fishes move a bit slower now
--
Thank you for the feedback, and thanks for playing my game!





Hi folks! First time posting, and first time making a cartridge! I got the Pico-8 editor as part of the itch.io "Racial Justice" bundle a couple months ago, and have always loved Mr. Do, so I made this little homage to it. Give it a whirl and let me know what you think!
also on itch.io
https://luvcraft.itch.io/drjo




EDIT: See the first reply below if you'd rather compile and use the native tool, which does seem more streamlined!
[hidden]Hi, friends!
I just put Pico-8 on my Raspberry Pi for the first time and ran into problems getting my USB gamepads to work. Unfortunately, there's no ARM build for the General Arcade SDL2 Gamepad Tool, and I didn't want to bother with compiling the native helper, so I had to take this manual route. This will only take you a couple minutes.
The final SDL string will look something like this:

First, let's get the GUID.
This issue in the GameControllerDB repo tells us a little bit about the GUID structure in SDL 2.0.5+. It varies between operating systems, and so if you copied it from a different OS to Raspbian, this might be the cause of your woes (as it was mine)!
Open a terminal and run:
$ cat /proc/bus/input/devices |
You should see your device listed in the output. We'll be concerned with the three circled values in the sysfs path, and also the version number above it. We'll come back to this output later for the name and input device path:

Convert the endianness of the three syspath IDs, and append the version. (Swap the first two characters with the last two and add four 0s). So for my gamepad:
- 0003 = 03000000
- 081f = 1f080000
- e401 = 01e40000
- 0110 = 10010000
and the end result: 030000001f08000001e4000010010000
I'm not sure if case matters here, but I went with all lowercase since I know it works.
I tried different names and SDL doesn't seem to care what you call the gamepad, but I went with the weirdo name I was provided, extra spaces and all:

Finally, let's get our mappings. Install jstest if you don't have it:
$ sudo apt update $ sudo apt install jstest |
And also refer to the Handler section in our original output to know which input device to pass to jstest.

For me, it's js0, so I'll pass /dev/input/js0 to jstest:
$ jstest --normal /dev/input/js0 |
The output looks like this, and is interactive. Each switch should flip when you push a button on the gamepad. Be sure to note the corresponding axis or button numbers.

Now that we know what button is what, we just need to add them to our config string. SDL assumes an Xbox-like gamepad layout. Together with the standard Pico-8 layout it will be mapped like this, but with the button numbers you collected from jstest:
- a: ❎
- b: 🅾️
- x: 🅾️
- y: ❎
- start: pause/options menu
- dpup: ⬆️
- dpdown: ⬇️
- dpleft: ⬅
- dpright: ➡
Finally, put it all together! Here's what mine looks like, with funky spaces in the name and all buttons mapped: (note how the axes are expressed as -a1, +a1, -a0, +a0)
030000001f08000001e4000010010000,USB gamepad ,a:b2,b:b1,x:b3,y:b0,back:b8,start:b9,leftshoulder:b4,rightshoulder:b5,dpup:-a1,dpdown:+a1,dpleft:-a0,dpright:+a0,lefttrigger:b6,righttrigger:b7, |
Drop that into your sdl_controllers.txt, and it should map successfully. Fire up Pico-8 in a separate terminal window, and then check the log. You should see something like this towards the end:

If it was unsuccessful, it will look like this:

Good luck! 😃




