I recently wrote the following routine to scale text:
--scales some text, used for title function scale_text(text,tlx,tly,sx,sy,col) print(text,0,0,col) for y=0,7 do for x=0,#text*8-1 do local col=pget(x,y) if col!=0 then local nx=x*sx+tlx local ny=y*sy+tly rectfill(nx,ny,nx+sx,ny+sy,col) end end end print(text,0,0,0) end |
However it depends on first printing the text to the screen.
I was trying to think of ways I could enable scaled text printing while other things are going on. Right now I just keep a black strip at the top of the screen of my current game so that I can scale text whenever I would like.
One idea I had was to create a table outside of Pico-8 that matches the Pico-8 font, and each row would be a single byte where every bit is a pixel, 8 bytes each for all characters in the font, then look up the correct bit when scaling each character, instead. Problem with that is the space it could use up, I guess.
I was kinda hoping the font would be in some kind of pseudo "system ROM" readable using PEEK, but I didn't see this listed in the memory map.
Another idea I had was to print every character, read the pixels and keep the data in a table. It'd be a sort of ugly "blip" of text right as the game starts up, though, but it might be so fast nobody would notice...






Inspired by the true-life events of my good friend Ryan. My first game ever; I am not a programmer and taught myself what I could of PICO-8, making this whole thing up as I went along, so I'm sure the code is very inefficient and a mess, sorry! It's a simple game and is mostly a lifetime of inside jokes, but to the general public: I hope you enjoy it anyway!
Update 07/17/2017: Made a small change that draws a shadow under the first food item, which slides under the plate. It used to not have a shadow at all, and no one probably even noticed but it started to bother me!! I also made the secret a little less tedious to find...
Update 07/29/2017: I improved the food sprites, head animations, some code (some), and changed the ending big time, which I was never really satisfied with! Has anyone beaten the game yet?






Just got pico-8 yesterday! Had much fun messing around, this is the result.
It's a demonstration on the infallibility of gravity, I think... Oh, and particle physics. No, not that kind.
♪Infocommercial Jingle♪
Do you feel like there's something missing in your life?
Have you felt your heart shatter into a million pieces when your sweetheart found their sweetheart that's just not you?
Well, feel no more! With Beating Heart™ you too may find something to love.
Press c to pump the Beating Heart™. The more you pump, the faster it beats!
Features automatic heart rate slowing over time!
Requires 4AA batteries, computer sold separately.
WARNING, BEATING HEART(TM) IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND AS A MISGUIDED ATTEMPT TO WEIGHT LOSS.
IN NO EVENT SHALL ANYONE BUT THE USER BE LIABLE FOR ANY HEARTACHE, MUTILATION, DEATH, HEARTACHE, BURNT TOAST OR OTHER AILMENTS, WHETHER IN AN ACTION OF DEPRESSION, IRRATIONAL OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH ATTEMPTS TO LOVE THE BEATING HEART(TM) OR THE USE OR OTHER DEALINGS WITH THE BEATING HEART(TM). THE BEATING HEART(TM) IS NOT SENTIENT AND CANNOT THREATEN TO STAB THE USER.
My second game! It's a virtual pet/clicker type game. Take care of your pet slimes! Feed them delicious bowls of rice! Watch them get bigger! Let them make money for you! Get more slimes! Watch them hop around! Watch them stick to walls! Buy bigger areas for your slimes to play in! Watch them hop around some more! Endless fun!
Controls:
Use the arrow keys to move the camera in larger areas and navigate the shop. Press Z to open or close the shop. Press X to get coins or buy something in the shop.
Tips:
Coin production increases every time a slime eats. Coin production increases even more if the slime gets bigger after eating.




This was fun to make. I added a bunch of juicy stuff I usually do in Unity just for fun. The code is heavily commented and more verbose than it necessarily needs to be, because I wanted to make it easy to pull apart for people less familiar with making stuff in PICO-8. I'll keep adding stuff over time, but figured I'd release it as it is so far.
My highest score so far is 232. What's yours?
UPDATE: Added a possibility of slimes dropping a heart if you blow them up.




NOTE: There's nothing to "play" in this cart! It's all in the cart's code!
I remember reading a thread a while back about the idea of having the manual for PICO-8 available in the console itself, maybe in cart form. I plan on getting a PocketC.H.I.P. and I really want to have the whole API reference available to me right from inside PICO-8. So I decided to just put it all in a cart to always have a reference with me.
I made a lot of use of Neko250's awesome API cheatsheet, which is why he's credited as well as zep. I'm sure there are probably typos to correct and maybe an error here and there, so let me know if you see anything needing fixing. I'll try to keep it up to date. In the meantime, feel free to use it yourself.


Just a silly little toy that I cobbled together over the last few hours.
Somewhat inspired by today's Castlevania streams during SGDQ and the DVD logo screensavers of old.
Additionally, it's the first time I used any shape more complex than circles or rectangles.
There obviously still is a lot of room for improvement, but I'm quite pleased with my first foray into maths in my projects.
A non-interactive view of a scene. It's roughly based on something I saw a few days ago, which reminded me of Virginia.
Some features:
- Infinite random props
- "Immediate mode" rendering - no spawning/deleting/pooling props
- Smooth LOD on tree leaves (more leaves on nearby trees)
Source code is commented, but the least-intuitive part of it (infinitely looping random objects) isn't really explained in there, because it would be a huge comment. Instead, here we go:
First, think of the casino signs with a ring of lights around them. When they light up one at a time in sequence, it can appear like a "single light" is "moving around" the sign, even though it's really different lights which are blinking at choreographed times. Our trees in this demo work similarly, but we can also move the positions of the lights separately from changing their states. Also, instead of on-or-off, each tree is given a persistent random seed.
Other than that, it's all pretty normal, I think?
I noticed while writing some debug code that
printh("string", true) |
crashes Pico8 0.1.10c on Windows.
While the code is, of course, blatantly incorrect, this should probably throw an error, not crash Pico8. Some quick testing reveals the same is true when calling it with a false, table, nil or any variable that is nil.