3c5b9d3232 | ||
---|---|---|
lua_scripts | ||
LICENSE | ||
README.md |
README.md
Pico8-and-Picotron-Snippets
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)
Contents:
-
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.