Retro-dev-spective


While the game itself isn't very good, what went on behind the scenes is fairly interesting, I think.

First, Neemit uses LOVR, which is basically Love2D but for VR. You can use it to develop non-VR applications, as well, but I found that this isn't quite as pain-free as it sounds, since the PC you are running it on needs to be essentially "VR-ready", that is, have Windows 10 installed and updated up through the Fall 2019 update. (This isn't as common as it sounds for people who _don't_ play VR). 

The non-VR version uses a specially compiled version of LOVR from source that disables keyboard and mouse input. One of the annoying parts about LOVR is that these inputs are hardcoded for mirroring/testing purposes, but that means it throws off any manual input you code yourself. Eventually the lovr-keyboard and lovr-mouse modules should be included by default, and users can then just code overrides - I hope!

Then, it looks like a GL buffer sync issue cropped up on both my Linux laptop (which uses integrated GPU) and M2's Win10 PC with an AMD card - fellow LOVR dev Josip has been maintaining a branch of LOVR that fixes this bug, because it was presumed to only affect a small percentage of hardware, but may its more than  thought. The Intel/AMD patch version should fix this if you get graphical anomalies.

LOVR is an excellent framework that pushed me into learning shaders. Shaders is how modern graphics coding is done - it makes a lot of sense once you dive in . (Contact me for some introductory tutorial and book info, I have several). Most graphics hardware nowadays operates on the principle of vertex > fragment rendering - draw the lines, then color between them.  Using this knowledge, I wrote a few shaders that cut precious computation resources but provide nice visual effects. The result is a platforming game that runs at max framerate, even on the Go -- heck, it doesn't even run half bad on my crappy intel laptop. 

For instance, the gem's fragment shader does no computation, just returns transparent green. The effect is not complex, but effective. Hundreds of gems can be rendered with hardly any impact.

The normal fragment shader takes the emissive texture from the model and applies ambient and diffuse lighting to it; normalized to one of four values - 0, 0.33, 0.67, 1.0. This gives the almost-cell shaded effect. The reason why I chose 4 values is because that is how the RGB scheme of the EGA palette, which I used to design the graphics, is organized. The result is, in theory, an imperfect EGA shading. 

I suffer from regular migraines, so I lose a couple days during any jam. The way I managed to create and test play a (big?) level in less than an hour is by hacking in a quick level editor mode. It's just an alternate player mode that lets you fly freely, and use the G and T keys to place gems and platforms. When you quit, the app prints all the level data in Lua format, to copy into a text editor and reimport at run time. Very effective, but placing things accurately isn't easy - I will probably add a way to manually throw gems in an arc from point x to y, for instance, on a later project.

Music was made with prototracker-opll, and is a legit chiptune. I could play it on my MSX2 hardware. I made it in 20 minutes while falling asleep.

Sound is bfxr nonsense or protoracker. I can't do sound :(

Models were made and UV'd in Blender, textures made in GIMP (strict EGA palette), and are 32x32 pixels or something. 

Total list of tools used:
VS Code, Blender, Audacity, prototracker-opll, bfxr, GIMP, LOVR

Stuff I wanted to add:
Shooty mechanics
Randomly generated enemy sprite graphics
A bunch of levels
Actual music
Bubbles that come up and you bounce off them for a boost, but they pop

Biggest lesson learned:
Porting to a variety of VR platforms is a PAIN IN THE BUTT

Files

Lil Neemit! - Oculus Quest 5.5 MB
Sep 17, 2020

Get Lil Neemit!

Leave a comment

Log in with itch.io to leave a comment.