Helpful Snippets and functions for Pico8 and Pictron
Go to file
taxicomics 5a93079a8e
Create dialogue.lua
initial upload
2024-06-04 09:51:15 +02:00
lua_scripts Create dialogue.lua 2024-06-04 09:51:15 +02:00
LICENSE Initial commit 2024-05-27 15:25:50 +02:00 Update 2024-06-04 09:50:16 +02:00


This is a collection of solutions to common gamedev problems in Pico8. The solutions range from small to big. They are supposed to be easy to use to get you started right away. If you need more parameters feel free to modify the functions or have a look at other peoples work!

How to Use

Feel free to copy the contents of any of these files to your Pico8 project. I've written them with usability and readability in mind, they are NOT shrinked yet. If you decide to use and shrink 'em feel free to share those versions with me. Feel free to abbreviate the function names etc. (Especially if you're coding in-engine)


  • A two tone print function that prints text in multiple colors.


  • A function that helps you to develop good enemy behavior. It checks whether two points on a map can "see" each other based on the map data. It assumes flag 0 to be the collision layer.


  • A function to draw animated sprites without the need for an external animation variable or timer. Useful for things like animated logos, animated foliage or water. Things that always do the same thing regardless of their surroundings.


  • ChatGPT splurted out a Terrain function that I cleaned up a bit(lot). It smoothes random noise and generates nice terrains. I used it for my flooded caves clone, but maybe somebody else has a use for it, too. You can define it`s behavior in the last bit of the function, as an example I let it set pixel values on the sprite sheet. You could also set map tiles here. It is rather slow, but it can probably be enhanced by somebody smarter than me.


  • A minimal setup dialogue function for scrolling dialogues. Add new dialogue content with a single function and display text whenever there is text to display.

    untitled_1_1 untitled_1_0