First I load my image to a table,
final positions in x,y and random position in (a,b)
function load_image() --load the image me = {} for j=0,8 do row={} for i=0,8 do add(row,{ spr=j*16+i, x=i*8+30, y=j*8+20, a=rnd(150), b=130, }) end add(me, row) end end |
then I call a magnet() function to move a=>x and b=>y
function magnet() local step=1 for j=1,8 do for i=1,8 do local p = me[j][i] x= p.a y= p.b if p.a > p.x then p.a-=step end if p.a < p.x then p.a+=step end if p.b > p.y then p.b-=step [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=119089#p) |


I'm trying to make a version of Snake and I have two tables of tables I need values pared from and removed. the code:

Now I need to delete all of the matching values in ST and NST but both tables could be up to a length of 196 and this game uses update60(). Any advice would be greatly appreciated, thanks.





A little tile turning game about pipes
Made in 1024 compressed bytes for the #pico1k 2022 jam.
How to play
- Use arrows to navigate around the tiles.
- O and X rotate the selected tile anti-clockwise / clockwise.
- Connect the water to the red marker to refresh the board.
- There is horizontal and vertical screen wrapping.
- You get 1 point for every tile connected.
- Game over when flow can't continue.


Hello there!
I just purchased PICO-8 and would like to start using it. However, my ESC key does not seem to be working inside the PICO-8 application. Something similar happens for the newer versions of Minecraft, but I couldn't tell you why. Even across a different keyboard, this still happens.
I have a feeling this isn't going to be an easy fix, so if you want to add me on discord to help investigate this further, my account is Archonic#1070.
Cheers!




Hi,
I'm working on a collection of 'retro' 8x8 repeating patterns.
Since the fillp()
function only supports 4x4 px patterns, the nearest data format is using Custom Fonts (1bit per pixel, 8x8px).
I'm planning on something like this:
?"\^!5600⁸x⁸\0\0" -- 97 'a' stonewall poke(0x5600+(8* 97), 14, -- ▒███▒▒▒▒ 230, -- ▒██▒▒███ 240, -- ▒▒▒▒████ 102, -- ▒██▒▒██▒ 15, -- ████▒▒▒▒ 95, -- █████▒█▒ 206, -- ▒███▒▒██ 224 -- ▒▒▒▒▒███ ) -- 98 'b' picket poke(0x5600+(8* 98), 0, -- ▒▒▒▒▒▒▒▒ 34, -- ▒█▒▒▒█▒▒ 102, -- ▒██▒▒██▒ 255, -- ████████ 102, -- ▒██▒▒██▒ 102, -- ▒██▒▒██▒ 255, -- ████████ 102 -- ▒██▒▒██▒ -- ... ) |
and then to render the pattern,
print "\014aaabbb" print "\014aaabbb" -- etc. |
Request for feedback:
(esp. @Heracleum, @dw817) ~ Is this reasonable?
Is there a more appropriate data type / graphics method?
Many thanks,
Andrew



I guess, what I'm wondering about is twofold...
Do you think rollback netcode can be implemented in a cart without consuming a ton of it's resources... and do you think a cart with that level of netplay (within the remaining resources) has an audience it would appeal to? Granted, this is major feature-creep territory for any project scaled to P8 in the first place, but again, that's why it's a theoretical discussion...






I am doing a little project here and decided to show how the results are going.
The project will be called pico 4 and will run on pico 8. It will have an audio editor (16 audios, eaach one with a length of 8 notes, 16 notes and 16 volumes), a sprite editor (4 colors palette, 16 sprites, 4x4 pixels and a 32x32 screen), a map editor (32x32 tiles) and a code editor (256 tokens, each one fitting on exactly 1 byte). In the end you get 961 bytes in a cartridge and with a little 63 bytes of save (mainly for highscores) it results in 1 kilo byte cartidges.
The objective is to do a mini-console where you can do a minigame in les than 2 hours.
Will be possible to use it in any pico 8 port using of virtual keyboards and some type of external saving (thinking in some type of special qr code or something).
And every editor will be written on the bto language (successive letters of asm) the language I am ending now.
Here the first interpreter. (You need to put the code inside the cart code (last lines inside quotes) 'cause I didn't end the code editor yet lol)


A demake of the classic minesweeper.
The game cartridge is just 1024 bytes -- see https://gist.github.com/pancelor/a3aadc5e8cdf809cf0a4972ac9598433 for some lightly commented source code
RULES / CONTROLS:
- left click to reveal a tile
- if you hit a mine, you lose
- revealed tiles will show a number, telling how many of their 8 neighbors are mines
- right click to flag a tile
- reveal all non-mine tiles to win!
- click the smiley face to restart
TIPS
- left click + right click (simultaneous) to auto-reveal neighbors, if the number of nearby flags matches the number on the tile you clicked
- mines left and a timer are displayed in the top corners




I'm trying to make a block-coding program, but I need to store a reference to a variable. As in, whenever you try and get a value of something, it returns the variable. If there's no way to do this, then I have other ideas. Anyway, heres what I got:
block = { func = print params = { x, 63, 63, 7 } } |
However, it just assumes the current value of x
rather that storing a reference to it. How would I go about doing this?


Hi everyone
Having an issue with PICO-8 not starting on Raspberry Pi 3, clean install of Pi OS (64-bit) based on Debian Bullseye.
Followed this article:
https://magpi.raspberrypi.com/articles/pico-8-raspberry-pi-starter-guide
but after downloading and unzipping, nothing happens after running pico8 executable, using both options ("Execute" or "Execute in Terminal"). Also tried the same with earlier versions of PICO-8, but no luck.
Any ideas?

