Playdate Mode7 library

Hi everyone!

I'm the developer of P-Racing and I've just released a library to recreate the "Mode 7" graphics in your game as well.

demo

Features:

  • C and Lua support
  • Simplified Lua setup
  • Camera(s) with adjustable position, angle, tilt, FOV
  • Customizable sprites
  • Support to multiple displays (splitscreen)

GitHub link: GitHub - risolvipro/playdate-mode7: A Mode 7 library for Playdate.

31 Likes

Very cool (game AND library)! Thanks!

1 Like

Thanks for making this! Implemented it in my project and it's been very fun to tool around with. I have a question: does mode7.sprite subclass or just wrap playdate.graphics.sprite?

1 Like

Hi! No, it doesn't, I just used the same name.

1 Like

Appreciate you getting back to me! I was hoping to use playdate.graphic.sprite's collisions, but that's off the table I guess! If you have any ideas about the best way to implement collision in a mode7 style game world, would love to hear it!

Thanks for the cool library! Though I tried loading up the project, I'm not sure what's going on as a Lua noobie and encountered the following error:

14:30:17: Loading: Failed
Load failed, error: mode7.lua:14: attempt to index a nil value (global 'mode7')
stack traceback:
mode7.lua:14: in main chunk
stack traceback:
[C]: in function 'import'
main.lua:2: in main chunk

Hi, please make sure to copy the precompiled binaries from platforms/macos or platforms/windows into the Source folder of your project. Also, copy the mode7.lua file into the Source folder.

1 Like

Yup that worked! I should have paid closer attention to the Lua library instructions. Thanks!