Log In  
Follow
pootie
Follow

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.

Thanks

P#95240 2021-07-24 15:55 ( Edited 2021-07-24 15:55)

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?

Thanks.

P#80655 2020-08-11 23:02

Cart #kung_fu_demake-0 | 2020-07-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
19

A demake of Kung Fu for the NES. It was called "Kung Fu Master" in the arcades in the 80s.

P#79455 2020-07-16 21:32 ( Edited 2020-07-16 21:33)

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:

Entity Class:

  • 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.

Thanks.

P#78962 2020-07-06 00:14

Follow Lexaloffle:        
Generated 2021-10-23 21:46:25 | 0.068s | Q:11