University Devlog 04-11-20
4th November 2020
UnityProcGen
Gameplay Programming
I've started getting underway with my GPROG coursework for which we will "create a gameplay demo focusing on two or three key features/mechanisms." My plan is to create a sailing treasure-hunting game demo, allowing me to focus on the following areas:- Procedural island generation using Perlin noise
- Gerstner wave simulation
- Ship physics and controls
- 2D treasure map generated from island heightmaps outlined with marching squares
I began with the procedural islands as I have experience with implementing the techniques in previous projects. I generated a Perlin noise heightmap, layering multiple octaves of differently scaled noise to achieve a weathered look to the terrain. I subtracted a circular gradient falloff map from this heightmap, and the result is a round-ish island with a high level of customisation. Sebastian Lague has an excellent explanation of the technique on his Youtube channel here. If I were to take this further I would use decimation to optimise the mesh and experiment with variable LODs, but for now this is beyond the scope of this project.
Something I've been putting particular effort into that I've often skipped over in previous projects is proper organisation of the Unity inspector. While this isn't part of my assessment, by grouping variables under headings and using the Range attribute I can understand the inspector much more clearly at a glance, which is especially important when so many values are exposed. I'll colour this mesh with Shader Graph by setting vertex colours depending on their height, and populate the island with trees and rocks - probably with more Perlin noise multiplied by the terrain noise within a certain height range. In my forest fire game below I place trees at regular intervals with a slight random offset which I think works well for a forest but would look odd for a desert island which would need sparse clumps of trees.
A full map will contain a handful of these islands spread out randomly but evenly using Mitchell's Best Candidate algorithm (the same technique I used in Etherium). While not particularly efficient I think it produces a good result for such a simple implementation.
Part of my prototype of a game about putting out forest fires with terrain generated using the same technique as outlined above, but with vertex colours and environment objects
Programming API
My growing interest in the field of technical art led me to choose the Houdini Object Model as my API for this module, with which I can use python scripting to build node graphs inside Houdini.My plan is to create a piece of procedural architecture, either by making buildings out of small prefab pieces or by generating a broader enviroment. Given time I'll then build this into a plugin use the Unreal API, possibly with some UI elements.
I've started by getting familiar with the scripting enviroment in Houdini and how to create/connect nodes, and I'll proceed by generating a simple building (a box with boolean cutouts for windows) that can be controlled via parameters. I expect this project will require a lot of iteration as I'm not too familiar with python or Houdini, but I'm hoping it'll give me a lot of transferrable skills that I can use in other tools, and possibly even a tech art specific portfolio piece!

