Log In  

I have decided to make public my "game template" for the PICO-8. This is my starting point when I want to make a game.

It has a state machine, some utility functions (very basic) and an example of metatable usage (objects in Lua) with the Entity metatable. It includes a colision function (rectangles colision) for that Entity but it can be adapted to whatever you need.

I know there is another repository with something similar but I wanted to do my own mostly to learn and because everybody code differently.

You can get my template in this github repository

I hope this is helpful :)

P#31117 2016-10-17 13:33 ( Edited 2016-10-22 03:10)

Neat.. In your mod_zero function... is there a problem with PICO-8 Lua's % operator?

P#31123 2016-10-17 17:37 ( Edited 2016-10-17 21:37)
:: misato

Oh I thought it didn't existed in PICO-8! I'm fairly new to Lua too so I did this to learn also. Thanks for pointing that out. That function can be changed then 😊

P#31124 2016-10-17 18:08 ( Edited 2016-10-17 22:08)

Nice. Maybe this can develop into a "living document" with more useful code-snippets that are used often for games. It is also a little bit the lua-philosophy. At lua-users they also host lots of snippets.

http://lua-users.org/wiki/LuaDirectory

P#31222 2016-10-19 08:45 ( Edited 2016-10-19 12:45)

Hey misato thanks for this! I was just about to do something similar. Really helpful to see this way of representing entities in Lua for me.

Thanks again, and love the avatar!

P#31437 2016-10-21 23:10 ( Edited 2016-10-22 03:10)

[Please log in to post a comment]

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-09-23 02:34 | 0.013s | 2097k | Q:17