James Jarman's Devblog

ProcGen

Unreal Game Prototype

I stopped working on a Unity game prototype quite a while back for a game idea I really wanted to make. One of the reasons I stopped development was because I was becoming dissatisfied with the direction Unity was being taken in. I had always wanted to sink my teeth into an Unreal game project and develop those skills, and the pinch point was the Unity licensing debacle. After that I had decided I wouldn’t focus my energy on Unity anymore and any new personal projects I develop would be using the Unreal Engine. However, I’m not going to turn my back on over 10 years of Unity experience, that would be very shortsighted and naive. I still love the Unity Engine. It is incredibly easy to use, quick to prototype with and (as I would come to learn and understand) much easier to navigate than Unreal Engine.

Read more »

C++ Terrain Generation

Now that I have working hex terrain generation prototype working in Unreal’s Blueprint system, it is time to throw it all in the bin and start over in C++. Why you ask? For a few reasons I answer. I like the Blueprint system a lot and it does seem pretty fast but ultimately I’m looking to build an infinite procedural world using hex-based chunks. I’m certain Blueprints can do it… and I’m pretty sure C++ can do it a lot faster. Additionally I want as much control over the procedural generation of the mesh, the subdividing and calculation of the height data as I can get and C++ will guarantee this too. Besides, with the complexity of the system I’m sure a Blueprint to handle what I want to do will end up looking like a lot of spaghetti and difficult to maintain. It’ll be much easier to handle things like caching of vertices and meshes in code. So why Blueprints in the first place? Mostly quick prototyping, feeling out the style and deciding if Unreal was actually the engine to do this in rather than Unity (I had already started on this project in Unity but had abandoned it for hopefully greener pastures).

Read more »

World Position Aware Procgen

Before I can work on the Project Hex’s chunking system I need to ensure each of my hexagon terrain tiles generate height data topology that correctly matches up with its neighbours. The easiest way to do that is to base the Perlin noise calculation on world position, but its a little bit more complicated when dealing with scaling noise across different meshes. Regardless, it is still a function of world position but in my case I actually use a hex coordinate system (that will eventually be discussed in the Project Hex and so have to translate that into world position as well.

Read more »

Runtime Chunk Loading

Hex terrain runtime chunk loading is now in and working well. Still not optimised yet but at this terrain resolution its not even breaking a sweat which is nice. Everything coded in C++ for the raw power. Eventually I’ll thread the mesh generation. I think it’ll be needed once I start layering the noise to make more realistic terrain.

Read more »

Rock And Roll

Finally found some time to work on my personal project and have been putting rocks into the chunk generation only for some of them to appear like they’ve fallen over or even spawned completely upside down.

Please note there is zero code in there for any kind of rotation. I eventually want variation but I’m not there yet. Very bizarre!

Read more »

Working As Intended

I now have resource nodes (trees and rocks) spawning with the chunks. All looks perfectly normal, right? Cool. Task complete.

Read more »

What Is Project Hex?

Project Hex is the development code name for a personal gamedev project I’m creating in Unreal Engine. It’s a colourful lo-fi hex-based infinite procedurally generated terrain game. I have a pretty clear vision of what I want it to be in regards to genre and gameplay (and even have a few name ideas) but that’s all to come later on down the line. The ultimate goal of the project is pretty ambitious but the development will be separated into phases with each phase bringing in a core gameplay block that shouldn’t be too difficult to develop and launch by itself.

Read more »