Hi everyone, I'm ReplayCoding.
The PICO-8 community has helped me a LOT learning PICO-8, so I thought I would give something back. So, I wrote the PICO-8 advanced manual! It contains my findings about PICO-8 internals and stuff like that... I hope you enjoy it!
Link: https://www.lexaloffle.com/bbs/files/28213/PICO-8_ADVANCED.zip
zep, please let txt files get uploaded :(



Advanced indeed !
This information is certainly of use to me.
All those lovely tasty little BYTES all laid out in memory pointers and descriptions. Good work and research here, Replaycoding.
... ???
You are a ROCKET SCIENTIST ! You have a command here I find MOST useful. Here is the code I wrote around it.
-- the power of holdframe! hf=0 -- hold frame on or off repeat if (hf==1) holdframe() for i=0,127 do for j=0,127 do pset(j,i,rnd(15)+1) end end flip() until forever |
I KNEW this could be done. I knew there was no way the system could not merely wait until I wanted to update the screen myself. This opens up tremendous possibilities.
Here's a star ⭐
and your document will definitely be read cover to cover.
Very well exceptionally done !



Thank you so much 😊 !!!!!!!!!! I'm really glad that you found something in it useful! ⭐
By the way, I found out about the snippet.php url from you post about it! So here's a star :)
🌟



By star it means the icon at the top-right-hand corner. These are denotations of excellence in coding and information.
You also have an option for 60fps using FLIP() so even better !
What is snippet.php ?



Changing the palette in the .dat file is an interesting idea. I dunno if it's in the spirit of pico-8 to talk about this kind of thing, but it's actually possible to customize colors 1-15 in exported HTML/JS carts by searching for and replacing this string in the .js file:
29,43,83,126,37,83,0,135,81,171,82,54,95,87,79,194,195,199,255,241,232,255,0,77,255,163,0,255,236,39,0,228,54,41,173,255,131,118,156,255,119,168,255,204,170, |
with the RGB values of your choice. The RGB for color 0 (which is just 0,0,0) isn't adjacent to this block, so I have no idea if it's possible to change that.



Oh yeah, that snippet thingie. I posted about that somewheres.



Oh, and by the way, you can also do the palette change in the data.pod file of binary exported carts. The javascript engine is actually pushing that data as a list of integers to the data.pod file.



Just finished reading your article. Hungry for more !
I didn't see this in there so will ask.
How do you do effects and stuff in your HTML to, for instance, create a clickable set of keys, add dither effect to output, striped CRT display, etc. ?



hmm...
- Making a clickable set of keys can be done having an event on each button that sets the appropriate bit in the pico8_buttons variable.
- For the CRT effect, you would have to apply some kind of filter to the canvas. Take a look at https://www.zachstronaut.com/posts/2012/08/17/webgl-fake-crt-html5.html
- I don't understand what you mean by the dithering effect. Do you mean something like https://en.wikipedia.org/wiki/Dither? If so, check out https://ipenburg.home.xs4all.nl/atkinsome/



Has someone made a HTML template with the (O) (X) (Up) (Down) (Left) (Right) (Pause) buttons already in place ?
My problem is I know zero to nothing about Javascript or HTML.
Thanks for letting me know what is available.



If there's information in here that's not in the wiki, please feel free to add it. If you need assistance finding places to put things, just let me know.
[Please log in to post a comment]