Hello all. I'm having a bit of a brain-fart here as I can't work out how to do a 'Press any key to continue' routine!
In my old ZXSpectrum or BlitzBasic days it used to be along the lines of...
10 if inkey$<>"" then goto 10
or
while
if not keypressed('esc') ...etc.
wend
I know we have limited BTNs but I can't figure out how to do it neatly. I can do it using a load of GOTOs and separate functions, but it's unnecessarily complicated and there must be a simpler way!
Any help?
Noob.



Is it just me or do you get a buggy mouse when you go HERE:
https://www.lexaloffle.com/bbs/?cat=7
And then click on any mouse-driven game from the icons appearing to the left ?
These 2 recent games have my mouse hiccup and not work properly for the carts:
Pseudo 3D (60 FPS)
The End is Nigh! Introducing "Got-Ya!" - A Pico-8 Gacha Game
I think it's buggy no matter what cart is tried as long as it uses the mouse. Not the fault of the programmers.
Are you getting the same thing I am ? And remember ... it's only buggy if you run them from the website:

This is my entry in the Pico-8 Advent Calendar for 2018, a jam organized by Bigaston.
Winter Golf is a short golf game for snowy-minded individuals. Each time you collect a snowflake, your snowball gets larger and larger. Grab all the snowflakes in a course to unlock the goal! There are five courses total.
Press left and right to aim, hold and release O (or, on a keyboard, Z) to take a shot, or hold X to restart the current course.
There's a special surprise at the end...but you'll have to figure out how to get to it!
(little note: this thread originally contained a placeholder cartridge, so there are some comments about that original cart - for context, it was a drawing of an orange.)










UPDATE 10/24 - Up to 56 cards, along with new secrets:
[NOTE: 34 and 55 are /only/ obtainable by finding secrets in other 'games'..]
Also, streaks should no longer reset at midnight so yay.
UPDATE 10/09 - 2 more monster-iffic cards!
UPDATE 10/08 - Another day, another 2 cards :) These feature The Conductor - Electric Ghost. It also brings the total card count up to 50!
UPDATE 10/07 - 2 MORE cards, this time featuring Della Muerte - Undead Mahou Shoujo!
UPDATE 10/06 - 2 more cards, this time of the lupine persuasion. Try to uncover Felicia - Furred But Fashionable
UPDATE: 10/05 - Some graphics tweaks to make portraits look nicer! And yet more cards -- These 2 feature Cecilia - Weird Detective!





Hi,
for anyone interested I made a Google Analytics integration for pico 8. Just add water and some code and you can track what's going on in your games (HTML export). Here is a short demo video: https://twitter.com/mtths_flk/status/1045647528811798528
You can find the code and all details on github:
https://github.com/mtthsflk/pico8-google-analytics
As of now, the code just needs 144 tokens - so, it might be a useful addition for many PICO-8 carts.
Let me know what you think.
Best,
M.
PS: Thanks to @nucleartide for doing similar stuff with segment.io.
My goal was to make something meaningful because that's the direction I want my work to take in the future. The result is very experimental, super short and quite imperfect. But I do like it, and I hope you do too! :)
Controls:
- Use the arrow keys on a keyboard or the left joystick on a controller to move the selected hand.
- Move it to the highlighted spot on the screen.
- Embrace whatever is in front of you.
[b]Play more of my games!
Follow me on Twitter!
Read about my indiedev adventure!











Hey! Are you like me and terribly inept at making music?! Well fear no more! I've developed a tool so that you can write code that writes music!
It's based off of the nodejs scribbletune library, but instead of generating midi files, it pops the music directly into pico-8's sfx memory. I made this because I'm not too talented when it comes to music, and this helps me test and try out an insane amount of rhythms and effects far quicker than I can with pico-8's sfx editor. It may not give you the full flexibilty that the sfx editor gives you when it comes to getting certain effects that you may see in your typical gruber video, but of course you can go over them once you pump out a nice rhythm and sound.
This is a cart meant to be used as a tool to create music tracks! Load it up locally, save a copy to edit and check out the code. It's got documentation on how to use it, and if you like what you create, simply bring up the menu and hit save. The saved sfx will be directly on the cart for you to copy over into your own projects.
As proof to its usefulness, the music that plays on the cart is created with the code in the cart, and it took me about 3 minutes to throw together with no actual musical skills.
TO LOAD THIS CART in Pico-8, in immediate mode type:
load #pc |
UPDATED: 12-28-19
Saving all SRAM now. CSTORE() RELOAD()
Despite the setback of not being able to retain all the sprite images with 8192-bytes of data (the full-screen), you can certainly save 4096-bytes and still retain a good 128 of 8x8 pixels sprite data.
In this program, press LEFT to clear the screen.
RIGHT to add a random colored circle in the recorded screen area.
UP to confirm the sprite area is not overwritten (top 128 sprites).
(O) to save off that screen area.
(X) to load it back. Try rebooting and loading only to confirm it is recorded.
A fully working and useful example of this method can be found HERE:
https://www.lexaloffle.com/bbs/?tid=31950
What follows is an exploration into CSTORE and, as of this thread, does not reveal any code that can be implemented for immediate and accurate use.
(09-27-18) TODAY I'll be working on proving it works with more than one cart.
Right. Well after fighting with CSTORE() and RELOAD() for exporting to BIN (Windows EXE), I have some very good news indeed.
It can be done, and this includes saving 8192-bytes of Online data.
When you are ready to create your EXE or export to HTML, use NO NAME at all when you make use of CSTORE and RELOAD, thus:
cstore(0,24576,8192)
and
reload(24576,0,8192)
If you'll look inside:
C:\Users\(yourname)\AppData\Roaming\pico-8\cstore\ |

As you know, Pico-8 is capable of creating an executable from any cart via:
export (cartname).bin |
What you DIDN'T know is that you are put ... well ... I'm not sure exactly where. Try out this program to see for yourself:
t=dir() cls() for i in all(t) do print(i) end |
Now convert that to EXE. Then run the EXE. Notice the directory.

Just where the heck are we ??


So I'm relatively new to coding, so I thought Pico-8 would be good to fiddle around with.
So after playing a few games and messing with a few of the demo's code, I found a problem.
Sometimes, in the bounce demo which I modified, when you bounce the velocity y of the ball
would suddenly stay at 0 mid-air. I don't know why can anyone help?

-- bouncy ball demo -- by zep -- modified by help_plz size = 10 ballx = 64 bally = 80 floor_y = 100 bounce_per_sec = 0 -- starting velocity velx =0 vely =0 frame=0 lag=0 offset=3 bounce=false collision=false function _draw() cls(1) map(0,0,0,100,16,1) print("press ❎ to bump", 32,10, 6) --rectfill(0,floor_y,2227,127,8) --circfill(ballx,bally,size,clr) if vely < 5.5 and vely > -4 then lag=vely end spr(1,ballx-offset-velx, bally-4-lag) spr(17,ballx-10,bally-10,2.75,2.75) print("x:"..ballx, 20,26) print("y:"..bally, 20,32) print("b_p/s"..bounce_per_sec, 20,38) print("vx:"..velx, 20,44) print("vy:"..vely, 20,50) print("col:"..(collision and 'true' or 'false'),20,56) --print("cx:"..camerax, 20+ballx,56,1) --print("cy:"..cameray, 20+ballx,62) end function _update60() offset=4 collision=false if bally < 0 then cameray=flr(bally)-64-flr(vely) end if bally > 10 then cameray=0 end camera(camerax, cameray) frame+=1 if frame==60 then bounce_per_sec = 0 end if frame==60 then frame = 0 end if ballx+velx < 0+size or ballx+velx > 128-size then -- bounce on side! sfx(1) velx *= -0.8 else ballx += velx end --==================-- -- move ball up/down if bally+vely >= floor_y-size then -- bounce on floor bounce_per_sec+=1 vely = vely * -0.8 collision = true sfx(0) else bally += vely end --so the ball doesn't bounce forever, and instead stops if bounce_per_sec >= 5.5 then vely = 0 end -- gravity if vely > 0 or vely < 0 then vely += 0.2 end --====================-- if btn(0) then offset=8 end if btn(1) then offset=-1 end if (btnp(5)) then vely = 5 sfx(2) if btn(0) then velx=-4 end if btn(1) then velx=4 end end end |
I am working on a node based particle effect editor, and things are starting to come together. There is still a lot missing to use this to make sensible effects, but I thought I'd share it early to get feedback. Thanks to @Goldfsh who has helped me out with some painful HTML.

The idea is to have an editor that allows you to be very flexible with particle generation (for example, chaining and layering particle effects) without having to write code. Green sockets pass numbers, while Purple sockets get "Triggered". For example, the emitter node will trigger at the given interval. You can then chain this to a Linear Emitter node, that will trigger CNT times, at different offsets. You can then feed this into a particle system to actually generate particles with speed, weight, lifetimes. ANother example would be to take a sine wave generator, scale it with MultAdd, but use a MouseInput to trigger the particle systems. You can then use the Die output of particle generators to add more particles when the first set dies. There is currently a very limited set of nodes. Future plans include many more nodes (math nodes, event handling nodes, and of course particle system types), more controls (for example, loading sprites from HTML into pico, palette, bezier curve editors). And of course a way to generate efficient pico8 code out of the graph.
