Working on a little well known arcade dungeon crawler port for Pico-8.
Done:
- Draw a dungeon that can wrap if needed
- Draw the player sprites
- Collisions with walls
ToDo:
- Player info overlay
- Keys and doors
- Food
- Potions
- Mobs
- Mob Generators
- Level loading
- (external) Mapeditor that can generate a map text string
- ...
This is my second time doing something larger in Lua, before that i only did small scripts in it for ComputerCraft, stuff under 5 lines and such.
Regarding the drawing mechanism, i can imagine that it is cheaper with Pico-8 to simply draw the game four times than calculating wrapping the camera in Lua for the map and all objects, so for now i go with that. It is cheaper in regards of tokens too. ;)
Any suggestions on what i got so far? :)
Unless you're doing it for a reason I haven't thought of, I believe you're drawing 4x as much map as you need to. (not the 4x drawing, but the screen being 16x16 tiles vs. your 32x32 calls)
Set mapwrap_x and/or mapwrap_y to true to see why i do this. And maybe punch a hole into the border of the map.
The original game wrapped the map around to make it appear bigger and as i want to do the same i need this little trick. Everything i don't need to do in Lua but can somehow delegate to the underlying C framework is great. ;)
tyroney: I think he's trying to make that much data persistent at a time; the visible 16x16, with a surrounding border of 8x8 (drawn or not).
[Please log in to post a comment]