Log In  

Cart #bharos_m_2minpicovania-5 | 2024-02-16 | Code ▽ | Embed ▽ | No License
8

2-minute picovania

This is a short little metroidvania, with several weapons, unlockable abilities (obviously), and character upgrades, packed into a small map.

hope you enjoy it - I sure enjoyed making it!

I am still learning pico-8 and there is so much more to learn. This cart taught me a ton, and especially the value of tokens. I ended up at 8175/8192 after cutting as much as I could, and skipping functionality I wanted to add. I realize that if I want to make bigger games, I have to be more aggressive with both serializing from strings, and also loading maps/logic from strings as well. Also, pixel art and music is incredibly difficult -_-

Update: Fixed a small bug that made the boss' HP bar go down too slow (only a visual bug, boss HP was working as intended).

P#141534 2024-02-16 12:38 ( Edited 2024-02-16 14:22)

Nice metroidvania. Took me way too long to figure out that hearts were mana potions and not health. That will teach me to read the in-game instructions before playing (who am I kidding, I'll never learn than ;p )

Regarding tokens, since your style of programming is object oriented, you could learn to (ab)use _env
https://www.lexaloffle.com/bbs/?tid=49047

If the price of readability is not too high to pay for you, there's also a lot to gain by abusing how LUA treats booleans :
NIL is false, false is false, and EVERYTHING ELSE is true, including {}, 0, ""...
Consequences :

  • any missing property in an object can be used as already assigned to false (beware typos)
  • A function that doesn't return anything can be considered to return false since accessing the non existing return value will get you NIL.
  • A function that returns an object (even {}) can be considered to return true.

Example :

  function rs:draw()
        if abs(self.mx-player.mx) < 10 and abs(self.my-player.my) < 10 then
            create_object(self.id, self.fid, self.mx, self.my)
         return false
        end
        return true
    end

Could become

  function rs:draw()
        return not(
               abs(self.mx-player.mx) < 10 and
               abs(self.my-player.my) < 10 and 
               create_object(self.id, self.fid, self.mx, self.my))
    end

Here I'm (ab)using the returned object as a true value.
For that function, _env would save you even more ( self. everywhere)

If after that you still want more data, look for multi-cart game examples, and if it's more code you are after, check (parens-8)
https://www.lexaloffle.com/bbs/?pid=135521
That turns your token hungry LUA into plain strings of Lisp code to be interpreted. (significant CPU tradeoff, so keep CPU heavy parts that runs every frame as LUA).

P#141722 2024-02-21 08:11

Nice short metroidvania. Took some time to figure out how to survive in this game but after I did that, I could complete this short game, with 92% completion.

P#141998 2024-02-26 13:21

Thanks for the tips RealShadowCaster, _env was really interesting, I can see it making some things a lot easier. Read the post and it gave me some ideas already!

But I also see just having to be a lot more careful with tokens in general. Opt out of some object-oriented stuff, use more serialisation, and just be smarter with my code.

And thanks for playing Bloodbane! :) I bet you missed the health pot (you have to backtrack to where you found the slide, after finding the super jump)

P#142266 2024-03-01 16:14

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-19 07:59:56 | 0.012s | Q:17