Currently, there are two ways to access pico8 memory: peek/poke[2/4] and @/%/$
The @/%/$ operators look a bit weird but are faster and better overall.
However, I think their main drawback is that they don't replace the need for poke, causing code that uses them to necessarily be quite inconsistent, imbalanced and weird whenever it needs to combine peeks with pokes.
I wanted to check how hard it would be to add the ability to poke into @/%/$, so I created the following fork of z8lua that implements it:
https://github.com/thisismypassport/z8lua
Here's how it works:
-- simple poke @0x1000 = 0x1 ?@0x1000 -- outputs 1 -- use of $ as both peek and poke (copying 4 bytes of memory) $0x8000 = $0 -- multiple assignment @1,%2,$4 = 1,2,4 ?@1 -- outputs 1 ?%2 -- outputs 2 ?$4 -- outputs 4 -- compound assignment - worked automatically @1 += 0x80 ?@1 -- outputs 129 (since previously was 1) -- poke metatables meta = setmetatable({}, { [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=134944#p) |
Straight out of the Bamboo Forest!
Meet PIZZA PANDA, a fluffy little fast-driving bear, as he beeps, bounces, and barrels his way through 20+ levels in search of the lost pizza slices. He'll have to zigzag through city streets to beat the clock, delivering the freshly reconstructed pizzas straight into the mouths of hungry citizens.
But that's not all! Puzzling hats, helpless rats, and meddlesome cats also await PIZZA PANDA and his trusty red automobile. It's non-stop action all the way to the top of the winner's podium!
Controls
- Jump: 🅾️
- Honk/Start Level: ❎
- Move Left/Right: ⬅️/➡️
(open the pause menu to restart a level or return to the overworld)
Level 3: Hoverbikes
This endless runner (endless driver?, endless hoverer?) game is my tribute to the infamous turbo tunnel level in the classic game Battletoads. I actually made a very similar game about a decade ago, but a friend of mine showed me the PICO-8 engine and challenged me to recreate the game in it, so here it is!
Controls
- Hold UP or DOWN to move to the top or bottom lanes, and release these buttons to return to the center lane.
- Press X / [x] to jump. (Also to select items in the menu)
- Press O /[z] to return to the menu when prompted, or to advance through the How To Play tutorial.
Credits
Level 3: Hoverbikes
Inspired by battletoads by Rare
1k Jam Entry 2023
Flappy bird 1K
This Game was made for the 1K Jam 2023, it was really fun to to compress and write the code.
You probably dont need any explanation on how to play flappy bird but here they are:
- jump with X
- toggle menu with C
- you wont die when falling out, instead you will just fall from the top
post you highscore in the comments :)
So, I recently built myself a physical PICO-8 console that hangs on the wall. It switches to a screensaver mode when it's not in use, and switches to splore to play games when someone connects a joystick:
(ignore the flickering, that's just the refresh rate)
I had the idea to periodically display a weather dashboard in between the different screensaver carts it cycles through when it's not being used. So, I went searching the BBS for options, only to find none exist. When I began exploring why, I quickly learned that interacting with APIs is impossible directly, and that I would need to feed PICO-8 the weather data at runtime. For my purposes, that's actually not a problem at all, since I can set up a cron job to refresh the data in a text file, and then just feed the updated file into the cart each time it runs.
The problem really is, I'm not a lua dev. I know this about myself. I'm not good at it, and I'm not patient enough to become good at it. The moment I encounter the need for an array, my brain fuzzes over and I move on. So, I'd love to collaborate! I have the basic building blocks of what I have in mind ready to go. I have example code to work from to get data from text file into the cart. I have the weather data API and sample calls I can make. I also have an example of the dashboard visuals I'm aiming for: https://github.com/lmarzen/esp32-weather-epd
Hello,
I adapted the famous Commodore 64 BASIC one-liner "10 PRINT CHR$(205.5+RND(1)); : GOTO 10" to the PICO-8 as a first learning experience. There are code snippets as comment available that you can copy to the prompt in interactive mode or run the program as you would normally and change the pattern in the pause menu. There is also a short blog entry available at my website, where I provide a link to the website hosting a free PDF version of an interesting book published by Nick Montfort et al. about this originally single line of code.
Have fun!
Michael
This thread is for ideas for my game.
The main character is a lil bird that changes color but I don't know what color he should turn with 1 dash and then again with 2 dashes.
This game is a Celeste type mod.
I don't know if he should have a scarf that changes color or if his body should so I need ideas.
Controls
cursor / dpad - move the reticle around the play area
z / O - hold and press a direction to shift rows and columns of tiles
x / X - after the timer reaches zero press to start again
About
This is my second entry into the #pico1k 2023 jam. This is a "match 6" puzzle game where you try and clear as many lines as you can in 100 seconds. Featuring hand coded sprites inspired by Columns on Sega Megadrive/Genesis and a smooth addictive control style.
hello everyone, I'm Osis, and I'm new to Pico 8 as well as coding, but when I found some pixel art of some Risk of Rain characters with the Pico 8 palette and most of them being 8 x 8 (a link to their work https://www.reddit.com/r/pico8/comments/mw40ui/risk_of_rain_1_characters_in_pico8_style/ ) I thought that it might be fun to try and make a game, which I have done most of it, the problem is I have a set of animations that should be playing when the player shoots, which at one point worked, however, it now no longer does I have tried going over it many times and still can't find what might be wrong
controls:
Jet pack is Up
Place Turret Is Down
Left Is left
Right Is Right
Z Is Shoot
any help with this problem or anything else you can spot in my code would be very helpful,
here is the problem code:
--
if shooting2 == true and mag >= 1 then
s_timer+=1 --shooting timer
if d == 2.8 and pushing == 0 then
if (s_timer < 4) plr.s=5 spr(6,plr.x+8,plr.y) -- this is here as one spr is more the 8x8
Follow me? See if you can keep up with this sequencing game of colors and sound. How much memory can you store? Share your scores in the comments!
CONTROLS
X = Start/restart the game
UP ARROW = top square
DOWN ARROW = bottom square
LEFT ARROW = left square
RIGHT ARROW = right square
Z = center square
This game was made for the 2023 PICO-1K Game Jam, where the goal is to create a PICO-8 game in under 1KB of compressed memory.
This is a function that draws a book with some custom content to the screen. My inspiration was morrowind and its plethora of books. All this function needs to work is an external,global page
variable.
How to use:
- copy this function to your code
- declare a global
page
variable (that starts at -1, which is the cover page) - keep in mind that it resets
camera()
to print the book on screen regardless of the camera offset, so use it after you already printed you game with desired offset - add your book as a pair of title and a long content string like this:
{"Title","Super long and cool content"},
to the books table
My submission for code guessing round #43. It's a visualisation of a spirograph with adjustable parameters:
- R1: radius of the blue, centered circle
- R2: radius of the white, rolling circle
- D: length of the drawing rod coming from the rolling circle