function wait()
repeat
flip()
until btnp(4)
end
function count()
cls()
for i=1,3 do
print(i)
end
end
i=6
count()
wait()
print("")
print(i)
print("")
wait()
for i=1,3 do
print(i)
end
wait()
print("")
print(i)
print("done!")
repeat
flip()
until forever
|
By looking at this code you would think the end result would be 4 each time, both in the function and in the main program as most programming languages would return that value. But this is not the case with PICO-8. Instead the result will be what you defined globally, in this case 6.
So it's important to remember that the index variable in ANY FOR/END statements, either directly in your main code or in a function - will ALWAYS be local to the loop.
So you need NEVER define LOCAL variables in a function that will only be used in FOR/END statements. Good to know.
As shown in the picture above, the "from" variable is being considered a function at some time during execution. Problem is: there's nowhere in the program that I can turn that variable into a function, because it is a local variable (and the only place the 2nd argument is ever assigned is in the function itself):
function unpack(list,from,to) from,to=from or 1,to or #list if from<=to then return list[from],unpack(list,from+1,to) end end |
function to_tab_unp(tab) return unpack(str_to_table(tab)) end |
The weirdest thing is that I call the line "in cr_char line 5 (tab 2)" every time I create a character. In this particular instance I'm recreating battles to get until I get one with a formation that fits the difficulty level I want. So it's like 1/10000 of cases generates that error. But the table being unpacked is always the same:
to_tab_unp(",{,{,{,{,,f,{,,,{,{,,,{,{,{,{,{,,,,")
[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=66865#p) |
While I have seen the ATARI 2600 do this several times to save on space, it's a shame that PICO-8 does not have a scaling function for the default 3x5 font. In the original Haunted House or "Mildew's Manor" game, I made use of this double-size method in the menu.
Here now you can have it to use in your own code. See demo enclosed.
HOPE THIS HELPS !
Hi! I'd love to hear any feedback on my work in progress top-down golf game Picogolf Endless, thanks for reading/playing!
Since it is work in progress it is just one course at the moment (procedural generation to come) but most of the physics are in place (wind is shown by the arrow top centre)
Controls
LEFT/RIGHT - aim
X - hold for more shot power
LEFT/RIGHT while power meter is moving - spin
Planned features
- Procedural generation
- Online multiplayer using GPIO/JS
- Complete the tree tiles / move on from these placeholders
- Particles and polish
- Music and more complete sfx
Thanks again :)
I just finished creating a tutorial for making a top-down adventure game in PICO-8. It's 10 relatively short videos (45 minutes for all 10 videos). You don't need any prior experience with PICO-8 to do the tutorial. I have done this tutorial with many, many kids and the games they create with it are always inspiring.
UPDATE 8/25: I've added a bonus step that allows you to add text to your game! :D
UPDATE 8/27: I added another bonus step that allows you have as many types of tiles as you want. You could use them for treasure, special keys to specific doors, teleporters, quest items, anything you want! 🗝️📜
You can find it on itch.io and on YouTube:
https://www.youtube.com/playlist?list=PLdLmU93eWisKpyk1WZywUSYAq5dkCPFIv
https://mboffin.itch.io/pico-8-top-down-adventure-game-tutorial
If you have any questions or need any help, feel free to let me know. I hope you enjoy it! :)
My Happy Challah Days entry for the 2018 PICO-8 Advent Calendar was created using this tutorial as the base code. (I added extra features for the jam, like dialog boxes, quests, and a larger inventory, but its foundation is this tutorial.)
 (1).gif)
While I don't think PICO-8 has any appreciable VSYNC ability, you can indeed make use of this rare command to stop the screen from tearing when updating massive pixels as seen here:
If the HoldFrame flag is off, in immediate mode (and possibly not from a browser execution) my screen gets a wiggly line about 3/4 of the way down the screen when doing this update.
If you invoke the seldom used command HOLDFRAME() however, you can prevent against this for games played as an EXE or in immediate mode. Check the source for details.
HOPE THIS HELPS !
Hello, welcome to my first ever video game, it called cone bomber, you gotta dodge the cones while bombing the hill.
Why is there infinite construction cones randomly placed on this never ending road? I don't know but please you must dodge them please do not fall over omg.
Have fun playing my little game, it really hard and not that rewarding. What score did you get???

I forgot I had this!
Here's a faux 3D of Yoshi's Island for the SNES.
Instead of making a 3D engine, I've defined sprites within a cylinder's (angle, distance from center, and height) and made it revolve all together.
It was a fun experience and a different way of making 3D.
MAKING YOUR OWN!
This cartridge comes with an editor to make your own revolving scenario. Do this:
- Download the cartridge
- Wherever you intend to run it, create a file called yoshis_island.p8l, and write on it preloaded_objects={}
- To activate edit mode, change l.30 on the cartridge from prod = true to prod = false
(optional) - Change the sprites to the ones you want and update their coordinates in the ss object un l.32-53

Futari Nezumi
This is our entry for Low Rez Jam 2019, a puzzle game featuring mice and geese!
Featuring Puzzle and Travel from Gruber's Pico-8 Tunes Volume 1. Also available on Itch.io.
Pixels, Design and SFX by Nette
Story
Once, there was a peaceful town of mice. Every year, the geese migrate through and cause a whole mess of things, but then they leave. This time, Mouse Central Intelligence learned that the geese plan to migrate in for KEEPS. So it's up to special agents Minx and Fufu to infiltrate the geese's industrial complex, capture the executive migration orders, and swap them out for the dummy ones that will send them to Antarctica instead.

PIco3e is a 3D collision engine written in PICO-8! As far with the alpha release, what it does is...
This was the alpha version, in wireframe. It does work with arbitrary rotated bodies and solve the forces correctly. It took me about 3 weeks of learning & coding, and below is the demo cart I've been using it for proof of work.
Implemented features from reference project qu3e:
- 3D Oriented Bounding Box (OBB) collision detection and resolution
- Discrete collision detection
- Collision test via the Separating Axis Theorem
- Collision manifold generation via face-to-face method and the sutherland clipping
Token usage: 2873 (with current scene). Thus space is sufficient for some game logic. Unfortunately cpu usage is a bit high, with collision between each 2 bodies takes 5% cpu in 30 fps and doubled in 60 fps. Therefore it's assumed optimal number of bodies is <= 4.






0 comments









