Lewd Kube

Home Updates RSS About

Menu Glitches

Written by B[] on 15/10/2019

Left: menu glitch, right: normal menu

Left: menu glitch, right: normal menu

A reasonable amount has happened since the last update and the game menus are starting to look more visually interesting.

To start with, there is now the ability to load images into the menus and have them auto-scaled by the rendering system. This is more complex than it sounds as the images come in all shapes and sizes. The system must figure out how to scale the image up or down in order to leave no "blank" spaces behind the image, at any reasonable resolution, without affecting the aspect ratio and without making the image blurry.

Splash screen that automatically transitions

Splash screen that automatically transitions

Next, we implemented a splash screen that automatically transitions to the main menu after a timeout. We envisage this feature to be useful for transitioning between cut scenes or temporary display notices.

After this we added the ability to "animate" the images based on time. Our first animation effect was simply to have a large image gently pan across the screen in the main menu. There was quite a few considerations and again this wasn't as simple as we first thought, as the calculations for panning has to be calculated in several offset and scale spaces.

We then implemented the "glitch" effect, which randomly offsets the colour channels (red, green, blue) in the horizontal axis. This wasn't too difficult to implement initially, but making the code efficient is quite difficult. In the end we merged the image scaling and cloning into a single operation, whilst addressing raw Java image data in order to achieve high read/write speed for pixel data. Unfortunately, much of this work is currently done on the CPU - we look towards offloading this processing onto the GPU in the future.

Stay tuned for future updates! Checkout our update on receiving notifications via RSS.

Copyright 2019