AVI

My website code stuff


Project maintained by Locust0 Hosted on GitHub Pages — Theme by mattgraham

HOME


Aesthetics

July 22, 2019

I’ve been working for a while on the aesthetics of the game and specifically, how to improve them. I specifically implemented two ideas I had.

The First Idea - Material Encoding

I decided to encode the material of an object using that pixel’s alpha value. alpha % 16 results in 16 possible values for me to use. I use the upper 8 values of the 16 to encode the destructible versions of the lower 8 values. Below is a sample of what I created for water, leaves, and bricks. All materials currently act as a white overlay on top of the base color of the pixel

Image

The water is animated and was created using this tutorial:

https://www.youtube.com/watch?v=Vg0L9aCRWPE&t=524s

The leaves were created using voronoi cells boundaries as an overlay.

The bricks are the result of a repeating texture I created myself.

Image

What was Broken

The rewrite I had to do of all the code took a while but now enemies are working again! Bombs and magic were both broken and are still mostly broken. I’m not going to fix them because I want to fully design the magic system first. Then I will implement magic again. Because I’ve increasingly wanting to design the player to play as a druid (like the last game I worked on with Unreal), it makes way less sense for the player to use bombs.

Image


The Second Idea - Height Encoding

The other of the two ideas I had was to use the alpha value to encode the height of the pixels. I encode height using alpha / 16. In this way I can encode height, material, and destructible-ness using the alpha value of every pixel. Because of this method, there are 16 possible heights with the highest being shown below. Ground level is set at 6 and, for refrence, the river is set at 3.

Image


HOME