I've been using Love2D for a year now, and it's a great game engine that's easy to use, fast, and has a highly active community. However, I found its lack of 3D features frustrating. I decided to create a simple, minimalist 3D rendering module to allow for three dimensional coordinates in Love2D.

What it does

LoveSurface allows you to create colored surfaces in the 3D coordinate plane. These can be used to construct complex 3D shapes with ease without a significant drop in performance.

How I built it

I first needed to determine how to render objects in the distance. I decided to simply shrink them and move them towards the origin, creating the illusion of depth. Next, I created a 2D texture than accepted a third coordinate; I applied the previously mentioned illusion of depth to this texture and multiplied it by the third coordinate, creating a basic three dimensional coordinate system. Afterwards, I just smoothed out the rough edges and built off this base.

Challenges I ran into

Many of the calculations required to properly display the surfaces were highly complex and involved long series of mathematical operations. Resolving errors that arose from mistakes in calculation was very difficult and took quite a while to do.

Accomplishments that I'm proud of

I'm proud of the fact that I finished this program within the deadline, as I doubted I'd be able to create such a large module within the span of one day. This was my first time participating in a Hackathon, so I'm glad I was able to succeed.

What I learned

I learned about the inner workings of Love2D's graphics module and how exactly draw operations occur. I also learned about the importance of polar and rectangular coordinates and how they integrate with trigonometry. This increased my spatial and visual abilities, which can be applied to a variety of future projects.

What's next for LoveSurface

In the future, I may be able to implement a dynamically rotating camera and multicolored polygons, which would open up the massive world of 3D game development to me. This project may eventually become fully featured 3D game engine.

Built With

Share this project: