Super 3D Retro

May 2017

This blog is also available in français.

One day in may of my first year in Ireland I started to think about 3D engines, not about collisions but about displaying (very simple wireframe) 3D graphics. I had no idea how to efficiently put textures other than plain colors on the polygons or how to do lighting but I had studied 3D vector math in school and I remembered that it wasn't that much more complex than the 2D vector math I was already doing when making games.

So instead of going to the internet to read up on the subject I tried to make a little game with retro wireframe 3D graphics from scratch, and because I was already in love with the concept of the web at the time I was going to do all of that in JS and draw it to a canvas.

As you can expect it didn't work perfectly and I eventually abandonned it when I realised that to make it work I would have to rewrite basically everything because of a fundamental mistake I made. It actually renders the objects properly but because I didn't know about projection matrices the edges of the screen are bent like through a fish eye lens.

But appart from that problem with the camera it turned out that very basic 3D graphics are actually not that hard. It gets exponentially harder the more features you need to support (like textures, illumination, smoothing...) but I learned a lot and had a lot of fun rolling my own renderer. I think I wrote my own vector math functions too.

The prototype is still up here. Here is the github repo.

Home