Maxwell Flynn

also known as tinfoilboy

Go Back

vxl

GitHub

Written in C++ with graphics in OpenGL, this was one of my first game projects that I made from scratch that started to feel like a real game.

Originally written as a test of graphics, to learn more about OpenGL and rendering in general. I started with just block creation, trying to make the blocks that rendered have baked in AO and overall just look kind of nice. This ended up looking decent to me, so I continued with it for a good little bit of time.

Voxel pyramid

One of the earliest screenshots of the project I have, the simple voxel pyramid that I managed to get rendering with just simple colors.

Eventually, I implemented more of the AO idea I had for each vertex, and it definitely added more to the scene of the game. Also I had implemented perlin noise, thus adding more actual terrain to the game rather than just a pyramid. I had also been experimenting with water effects at this point through shaders.

Shaders were something of a really mystic concept to me. I never had really written any effects in a shader. In the following screenshot, the shader shows waves that were rendered with a vertex shader sine wave.

First scene

A really early scene of the game with a little pond like area.

I then spent a lot more time on the game, generating larger and higher areas to play with. The last screenshot had a very low block height due to the nature of the generator, I ended up increasing this which resulted in some much cooler looking areas. In addition, I played with the water a ton more. I added reflections too, with a pretty neat and surprisingly performant method to do so.

Voxel pyramid

A much more water-y scene in the game, containing reflections straight on the water.

These reflections were implemented with a simple framebuffer in OpenGL. Take the last scene for instance, I first render out a reflection of the non-water geometry, which in the eyes of the framebuffer, looks like this.

Reflection buffer

A simplified (and probably not totally correct) view from the framebuffer of the reflections.

Then, that scenery is rerendered, with the water being rendered in a seperate buffer with a seperate shader. This shader then takes in the reflection framebuffer as a texture, and then uses it with screenspace UV coordinates to show reflections on the water.

This method was surprisingly effecient for using two passes of the same geometry, and gave a phenomenal result for the reflection of the water.

I focused a major amount of energy on this water, I also made the water a tiny bit transparent. As well as faded the reflection a little bit, this gave more of a look of actual water, rather than just a mirror.

Non-mirror water

In this screenshot, the water is less opaque and with a less perfect reflection.

One of my next tasks for the game was to make the water look even less like a mirror. My thought to do this was to blur the reflection a little bit, as well as add a tiny wave effect on the reflection image, rather than the vertices of the water. This worked better than expected, and gave a more realistic look, having more of an actual water feel.

Blurry water

In this screenshot, the water has a distinct blur to it to make it seem more like actual water.

One of the last few developments involved softening and making the graphics a bit less gritty. To do this, I dropped the values of the AO down, and blurred the water even more. This created a more tranquil feeling to the game I feel.

Blurry water

A much more softened look to the game.

Not pictured, was that I created infinite terrain to the game, allowing for you to wander endlessly in any direction and explore. Though, there was no saving of worlds, so you couldn't explore forever.

I also had added Bullet physics to the engine, one of my first games to have actual working physics. In retrospect, this was a really fun project, and I still look back to it sometimes with happy thoughts.

A gif of my terrible platforming within the game.