Log In  

Cart #31913 | 2016-10-27 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

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? :)

P#31914 2016-10-27 17:11 ( Edited 2016-11-10 14:53)

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)

P#31920 2016-10-27 19:31 ( Edited 2016-10-27 23:31)

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. ;)

P#31922 2016-10-27 19:48 ( Edited 2016-10-27 23:48)

Getting a collision bug when I approach a wall edge-on:

P#31951 2016-10-28 08:18 ( Edited 2016-10-28 12:18)

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

P#32376 2016-11-10 09:53 ( Edited 2016-11-10 14:53)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-19 07:37:09 | 0.019s | Q:16