Feature Overview
EXRECT() creates a rectangle object with extended functionality.
- The created rectangle object can be drawn and its inclusions and overlaps can be checked.
- Drawing and update functions return their own objects, so they can be written in succession.
- This function consumes 396 Token.(include comb() and cat() functions)

r = exrect('10 80 16 24') -- generate a rectangle object from a string. x:10, y:10, width:16, height:24 r.rf(6).rs(7) -- draw "r" with rectfill, and then draw it again with rect. [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=128952#p) |


LAWNMOWING MAYHEM 3.0.0
In this game, you need to cut your grass, and QUICK!
Avoid mowing over the flowers, get all the grass, and get the highest score possible!
If you run out of time, you lose.
Controls and scoring information are in the game, but here are the controls and scoring information anyway ;)
Controls:
Up/Down/Left/Right: Move
X: Turn around
O: Turn lawn mower on and off
Scoring:
Mow tall grass: +10
Mow already cut grass: -5
Mow flowers: -20
Remaining time gets added to score at end.
Rocks:
If you put your mower on rocks without turning it of, it's game over!
Water:
You can't walk on water, but if you try to push your mower into the water, its also game over!



function _init() chosen = 1 cls() end function _update() cls() if chosen==16 then print("no-scope mode activated! 🅾️", 12, 1, 11) else if chosen>9 then print("novelty crosshair " .. tostr(chosen) .. " ⬆️/⬇️/🅾️", 1, 1, 10) else print("crosshair " .. tostr(chosen) .. " ⬆️/⬇️/🅾️", 1, 1, 6) end end spr((chosen - 1), 60, 60) if btnp(⬆️) then chosen += 1 end if btnp(⬇️) then chosen -= 1 end if chosen>16 then chosen = 16 end if chosen<1 then chosen = 1 end end end |
With this code, I'm receiving an error at line 23:
SYNTAX ERROR LINE 23 (TAB 0) IF CHOSEN<1 THEN CHOSEN = 1 END <EOF> EXPECTED NEAR END |
Isn't the END
the EOF?
Note: Edited due to a misspelling. Original:
SYNTAX ERROR LINE 23 (TAB 0) IF CHOSEN<1 THEN CHOSEN = 1 END <EOF> EXPECTED NEAR END |


<- and -> to move
Z to jump
X to interact
The long awaited sequel to Among Us... Among Us 2: Rise of the Attack of the Imposter with a Vengeance: 2: The Second One!!
You find yourself on a spaceship full of your fellow crewmates. The Among Us lobbyists require you to complete 7 tasks before you can enter the meeting room. Management suspects somebody is an imposter, sent here to kill us and prevent us from doing tasks! How will we make enough profit to impress our shareholders with an imposter among us?!?!?! Jump your way through difficult platforming challenges to claim your task dog-tags and prove to Big Among Us that you have what it takes to climb the corporate ladder!


pixil_massacre
My First Game! Just a fun little arcade game where you can level up your weapons and shoot the escaping prisoners before they get out.
Controls
X to shoot and O to throw grenades
Enter and Exit the shop with X in the bottom right
Items in the shop cost kills
Each enemy that leaves the screen loses one life until you lose


Cloud generator 1
Procedural cloud generator using a lot of circles and fill patterns.
I tried to comment the code as well as possible and make it as readable as I could.
It's not a very complicated piece of code, but I know by now that trying to decipher someone else's code isn't always easy.
room for improvement
- Not all generated clouds look great
- If you start playing around with the arguments in the function, it can be tricky to get it to look the way you want.
- There is also no easy way to change the colors of the clouds.
- The circles get smaller the higher up on the screen, but this is based on the absolute y-coordinate of each circle. This means that if you put your clouds lower on screen with the "topy" argument, the radius off all circles gets bigger. The fact that one argument affects multiple things makes the look of the clouds harder to control.
- The darker and lighter colors are randomly picked, it would be nicer if the base of the cloud was always a little darker then the top of the cloud
- It could use some more vertical randomness, now it is like a single roll of evenly thick cloud and it gets worse when you increase the density.
Implementing these improvements would probably cost more tokens though.
Pico Valley!
I love that cozy games are finally getting big, and one of my favorite cozy games is,without a doubt, Stardew Valley. I played Harvest Moon growing up and enjoyed it a lot, but when somebody told me about Stardew Valley my mind was just blown. This is why I decided to make a Stardew Valley demake that i could have played growing up.
Update:18.11.23
I hate reading old code. Well at least I can be sure I got better since April :D Let's go.
- added the ability to play the brilliant Journey Of The Prairie King Demake which was quite the undertaking. A lot of things needed to work together in order to return the player to the original game with all of the progress saved. Read more about it on the Journey Of The Prairie King page.


.jpg)





A slow but token-efficient sort:
-- 35-token bubblesort, by pancelor function sort(arr) for i=1,#arr do for j=i,#arr do if arr[j] < arr[i] then add(arr,deli(arr,j),i) --slow swap end end end end |
I did a brief speed analysis and this function seems reasonable to use for arrays up to around 50 or 100 elements, depending on how much CPU you have available to burn.
speed analysis:
[hidden]
I did some minimal testing, using this code:
cls() function _draw() arr={ --20,5,8,3,7,4,1,9,2,-30, --20,5,8,3,7,4,1,9,2,-30, --20,5,8,3,7,4,1,9,2,-30, --20,5,8,3,7,4,1,9,2,-30, 20,5,8,3,7,4,1,9,2,-30, } sort(arr) end |
By commenting out lines of the array, I changed it's length. Here's how much CPU the function spent, as a percentage of a single 30fps frame (measured with the ctrl-p monitor, on pico8 0.2.5g)
The "best case cpu" was calculated by defining arr
outside of _draw
, so that the array was already sorted after the first frame
Array length | Typical cpu (30fps) | Best case cpu (30fps) |
---|---|---|
10 | 0% | 0% |
20 | 1% | 1% |
50 | 5% | 4% |
100 | 21% | 15% |
200 | 81% | 58% |
300 | 181% | 130% |
400 | 321% | 231% |
I believe this algorithm is O(n^3): O(n^2) for the two loops, and an additional O(n) b/c the swap step uses add
and deli
, which shift around the array elements. But the chart seems to indicate that doubling the length will quadruple the cpu cost (instead of octupling it) so maybe it's only O(n^2) somehow? It doesn't much matter, since you don't want to use this for large arrays anyway, but maybe add/deli are cheaper than I would expect.


Hello world!
I'd like to share my first game and first post here with the Pico 8 community. Neon Saucer is a vertically scrolling endless runner where you pilot a color-switching UFO up through Neon City. Match your color with gems to collect them, match your color with enemies to smash them. As you get higher, your ship goes faster, and you'll need to deal with trickier enemies and obstacles.
In short: Move fast and break stuff.

Postgame scoring is tracked for total height, total gems, successful enemy hits, and best banked combo. A combo of consecutive enemy smashes builds beneath your ship. The bottom of the screen shows the combo timer which is refilled with each successful enemy hit or gem pickup. A combo is lost if you hit a non-matching gem or the sides of the screen. A combo is completed once the timer runs out, or the player slows down. Completed combos award bonus gems for the amount of the combo, plus additional bonuses for every 10.









When you move the mouse cursor in the Sprite Editor the status bar at the bottom shows the X and Y coordinate in the spritesheet. It would be a help if this also showed the Width and Height of a selection if you have something selected. I often want to measure the size of things in the sprite sheet and the selection tool is usually the way to do it in other programs.






