I've run into the same thing on a couple of projects, so I'm wondering if I'm missing something in regards to map().
- sprites have flags marked 0-7
- the map command has the optional argument 'layer' that will display only sprites of a certain flag
- the default argument for layer is 0, which mean to show everything
- if I mark a sprite with flag 0, then using 0 as the argument will just show everything (which isn't what I want)
I think in the past I just didn't make use of flag 0 and it looks like that's what Zep did with Jelpi, but it seems odd that I can't (I think) use flag 0 as a layer argument.
So, I was in love with PICO-8 while making a game, but then I ran out of tokens. So, I tried a few techniques to optimize my code but it became clear that I wasn't going to be able to fit everything I had planned. So, I just posted the game with some significant content removed.
Some people have reported bugs here and there, but when I go to fix them I end up running out of tokens just to do my debugging (i.e.adding extra keyboard input for testing purposes).
I get, and enjoyed, the idea of having strict limitations, but hitting the token limit just ruined the experience for me. Even if I could just go outside of its limitations just for the testing process, that would be great. I know it's part of the charm of PICO-8, but the token limit (at least) has kinda killed the fun for me.
Does anyone else know of any tricks for this? Does anyone else feel the same way?
I'm loving PICO-8 with one exception: I'm not crazy about Lua. I've read the Lua documentation for OOP, but the table thing is so different and I can't find examples for what I'm trying to do.
I'm almost finished something I'm working on, but the larger the program gets the more I miss being able to separate the logic into objects (the way I'm used to anyway).
Long story short, I wanted to do the following:
- x, y, width, height, speed, etc
- function update()
- function draw()
Player Class(that inherits from the entity class):
- score, weapon, power, etc
- function update(overrides but calls super function from entity)
- function draw(same)
Enemy Class(that inherits from the entity class):
- extra variables
- overridden functions calling super functions Entity class
SpecialEnemy Class(that inherits from Enemy/and then from Entity obviously)
- extra variables
- overridden functions calling super functions from Enemy class
I hope that makes sense. It looks like Lua doesn't really have a natural way to do multiple inheritance. Anyway, does anyone have any tips for how to implement something like this? Right now, I everything is just procedural.