Log In  

I don't know if this exists, but I think it would be cool to have a thread of Stuff You Might Not Have Figured Out From Just Messing Around Making Things.

Here's two to start with, from a musician perspective:

  1. If you can, leave SFX 00 through 07 empty. It will help with adding music later - be that you adding music or because those slots can be used for custom SFX instruments that give a lot of character and flavor to compositions.

  2. Decide how many channels to reserve for music. The 4 SFX channels of PICO-8 have to be used by both music and sound effects, and both music and sound effects benefit from having more channels - so think about which is more important to you, and which sound effects can interrupt each other. You can also, if some sound effects are only played sparsely (maybe you have a clicky sound while navigating menus!), try having one channel of music that is interrupted briefly by the sparse effect and then resumes.
P#132103 2023-07-18 15:57


Adding a few small things from my experience:

  • Creative uses of split() can be used to store huge amounts of data in a single string. It can even be flexibly structure if you use split() multiple times. For example, if your background needs a bunch of circfills, you can store then in a string separated by commas, split the string at the start of the game, then just loop through the resulting table.

  • print() and printh() are the quintessential debugging tools in pretty much any game engine. If something is going wrong, it's probably a good idea to set a global to some important variable and draw it to screen at the end of your _draw().

  • _update and _draw are just global names checked by the engine and can have their values changed at any time, as long as the value for each are functions. Instead of a game state number and a big long set of if blocks, you can just change the current game loop. (Note: some minifiers don't seem to realize this and will fail to take it into account)

  • unpack() can be used to convert tables into sequences of parameters. for example, rect(unpack({0,0,127,127,7})) is a valid way to draw an outline around the screen. How to use depends on game structure and other tricks being used. I'm just mentioning it because the only spot in the manual that mentions it is the changelog.
P#132105 2023-07-18 16:34

[Please log in to post a comment]