step 1: export a game as html (eg "export game.html" in console)
step 2: edit the html file (eg game.html)
add this inside "canvas{}":
canvas{ image-rendering: optimizeSpeed; ../.. border: 0px; --gray: grayscale(100%); --blue: sepia(100%)hue-rotate(180deg)saturate(200%); --amber: sepia(100%)saturate(200%); --green: sepia(100%)hue-rotate(90deg)saturate(200%); filter:var(--green); } |
set your preferred filter in filter:var()
step 3: profit!




more info on css filters:
https://www.w3schools.com/cssref/css3_pr_filter.asp
Survive as long as you can while you constantly grow longer! This is my first game. It started out as me following a tutorial (the tutorial game is here: https://www.lexaloffle.com/bbs/?tid=2501) but I quit halfway through to make it my own. I hope you like it. Also the graphics are not the best because I was being lazy.

For literally-years now I've had this comment at the top of my Kid Radd cart, right under the label comments:
--__ext__ --pal[1]=0x243566 --pal[6]=0xc0c2e3 --pal[12]=0x576dff --pal[14]=0xff5e98 |
Although more recently, Pico-8 has become able to properly handle standard Lua multi-line comments, so that could be changed to a cleaner block with a defined ending, like this:
--[[__ext__ pal[1]=0x243566 pal[6]=0xc0c2e3 pal[12]=0x576dff pal[14]=0xff5e98 ]] |
These comments are entirely unused, waiting for some kind of extension format to come along and read metadata to make modifications to the machine before the cart runs as normal. With the theory being that the block of comments could be "cut out" of the script and run as their own, separate, "configuration script" with reasonable ease, using an extension API of some sort. In this case, the configuration script expects to be given an array named "pal" (no relation to the Pico-8 command of the same name) which is pre-populated with Pico-8's default palette, and then internally gets read back to set the screen palette before the game script even begins.
However, if such extensions [i]were
This is a small (259 token) library for finding entities close to a point.
A bucket hash (also called a spatial or grid hash) breaks up space by a grid size, and maintains a sparse table of "buckets" representing a grid location. When entity membership in these buckets is updated, you can quickly
retrieve entities near a given point.
-- usage -- create a data 'store' {size=30,prop="pos"} -- store.prop should match your entities' position property name, -- which should be a 'point' value like {x=0,y=0} -- store.size should be tuned to the max neighbor distance you'll be finding -- periodically call bstore(store, entity) to update their bucket membership -- bget(store, point) returns stored entities from a 3x3 square of buckets around -- the given point, filter these by a distance function if you need more precision -- bdel(store, entity) to remove an entity -- remember you can maintain multiple stores based on the needs of your game! |






I had posted this in the work in progress category a bit ago. I have made some improvements and feel like I am at a place with it where it should be submitted to 'carts' proper (changes include updated boss 2 death sequence and a few tweaks to general gameplay that make things run smoother and have a more polished look).
Proxima-B is a space shooter featuring:
• Two distinct shooter levels
• Two boss fights
• A fun/atmospheric soundtrack
• Two powerups: spread shot and super shot (double damage and larger bullet)
• A platforming epilogue (Which exists mostly for storyline/gag purposes (in that level you can press up for a jet-pack effect, and X to open doors).
Screenshots (I left the boses out of the screenshots, to leave a bit of surprise):




Notes on this version: The game is meant to be fairly hard and quirky. I got feedback from friends and forum members dismayed at the lack of rapid fire while moving. I gave serious thought to switching it, but found the game to be WAAAY too easy with the inclusion of true rapid fire, so it has been left as is: you can hold fire to rapid fire while not moving but there is a bit of delay for it to kick in, so doing it while moving does not work and you will have to tap it out to fire while moving. In general, I suggest going for accuracy over bullet spam. Also: let things pass you. You advance by killing, but you don't need to kill everything. I took some advice from a forum poster that suggested (thanks for the advice!) that the game over sequence be shortened: you can now hit X immediately to continue, regardless of whether or not the end game animation has completed. Finally, Proxima-B is definitely easier and more fun with a USB controller plugged in.
Have fun and enjoy the game!


I'm trying to write a function to switch negative to positive and vise-versa. I've got:
foot=3 function switch(f) f*=-1 end |
when I call switch(foot) it returns the original value but if at the command prompt I type "foot*=-1 it preforms as expected.
Thanks for any help and sorry for these remedial questions.
--
-john






Goal
Spin a web, eat bugs, earn points, and have fun!
8 Legs to Love is separated into six levels of just over two minutes each. The goal of each level is to spin an elaborate web and use it to catch bugs. Each level poses a different challenge for building and maintaining a web, and introduces new and exotic types of bugs. Complete a playthrough and work towards a personal high score! Or just have good time, there's no pressure.
Controls
Arrow keys - move
Hold Z - spin web
--> then Tap Z - place web
Bugs
Fly (blue) - the most basic of bugs, +10 points
Happyfly (pink) - a bug that's having a good day, +20 points
Beetle (red) - chews through web, +30 points










When does -1 not equal -1? When -1 started out as the string "-1", of course!
Please examine this source code closely, then run it for a surprise fixed point math bug or sommat.
(If you are visiting this thread in the future, after zep has updated the web player, refer to the cartridge label for the original output.)
(I do not know if this is a duplicate symptom of another bug that has already been fixed in 0.1.11, sorry...)
-- start with a string. local m = "-1" -- m is a string. if m == "-1" then print("m is a string -1, to start") end -- coerce m into being a number. m = m*1 -- this is one method. m = m+0 -- this is another way. m = m/1 -- i guess you could do this too, but you probably shouldn't. -- why don't you just add tonumber() already. print([[m has been coerced into a number (but there's no way to be sure)]]) if m == -1 then -- this should be true. -- it would mean m is an -- ordinary number, valued -- at -1. print("m == -1") elseif m == "-1" then -- if coercion failed, -- then *this* should be true. print('m == "-1"') elseif m < 0 then -- neither of those are true, -- but m is still < 0 somehow?? print("m < 0, but not equal to -1") print("m prints as ["..m.."]") else -- wtf is m? print("???") end print(m.." + 1 is "..(m+1)) m = flr(m) if (m == -1) print("oh *now* it's -1. thanks flr.") |


My first game, I'm a programming novice.
Catch spaghetti in your bucket, or press z to open wide. Watch out for knives.
Based off an idea by J Kantz (http://inkmo.tumblr.com/post/157810719733/inkmo-i-mightve-started-something-catch-em)

I would like to create a function that would move one point in along a circle around another, but lack the math know how.
here's what I have cobbled together from examples elsewhere and a little help, hopefully at least my intentions are clear (the inc=increment would let me fiddle with how fast p2 travels)
point1={}
point1.x=68
point1.y=78
point2={}
point2.x=57
point2.y=43
function orbit(p1, p2, inc)
distance = sqrt((p1.x-p2.x)(p1.x-p2.x) + (p1.y-p2.y)(p1.y-p2.y))
ang= atan2(p2.y, p2.x) - atan2(p1.y, p2.x)
p2.x=(p1.x + distance cos(ang+inc))
p2.y=(p1.y + distance sin(ang+inc))
end
function _update()
orbit(point1, point2, .01)
end
function _draw()
line(point1.x, point1.y, point2.x, point2.y, 7)
end
--
-john



Isola is a board game (sometimes also known as Isolation or Solitude). After my last cart I decided I wanted to try a puzzle game or some kind of game that wasn't action oriented. After doing some research I found Isola, and it seemed like I could program an ai for it pretty easily. So I did. This was my first experience programming an ai that adapts to the player's moves. My previous game was a shooter with set motion and random starting points for enemies. It was an interesting experience. I think I'd like to try more complex move trees and point systems for a cart at some point.
The ai will not likely challenge anyone for long, but it will win games against casual players and should be a mild challenge for first timers with Isola.
The rules are included in the cart. Games tend to go pretty quickly. The two player mode uses only one key set and just swaps what piece that keyset controls. I can add alternate keys if people want.
This was a quick turnaround and I was well under the token and size limits, so I have not optimized the code much at all, but it should be mostly clear what is happening for anyone that is curious.
I hope y'all enjoy the game!
[i]Update 1: I fixed a situation in which the computer opponent would cheat. The only other change I may make would be to improve the ai's play when destroying tiles...but it performs alright at present, so I may just keep it as is.


