Stone Shire in Unreal Engine 5

Read More

For the past few months, I’ve been messing around with Unreal Engine 5 since it has become a hot commodity. Unity is fine, but I’m more at home around C++. Not to mention, I like more of the low level access you can get from Unreal vs Unity where they locked out a lot. I’ve been “porting” Stone Shire to Unreal as an exercise to practice with the engine. It has been a wild journey so far, but I’ve gotten the basics of it set up with proper code organization and actor usage. Procedural generation makes use of the the UProceduralMeshComponent class, which has been very helpful.

One big obstacle I’ve had to overcome is that the cartesian coordinate system in Unreal is far different from Unity. In Unity, Y is up and down. In Unreal, Z is up and down. In addition, the texture coordinate system has the origin in the upper left instead of the bottom left. This has made me have to change around a lot of how I organized my vertices and uvs, but I managed to fix it after an hour.

As Tim Sweeney from Epic Games said:

In any case, I have the game practically running. But now I still need to add more of the basics from my Unity project: generating a world procedurally, editing and putting down cubes, and all the other fun stuff in a Minecraft-like game. I will say one thing: the first-person module that comes with Unreal is far more friendly than the basic one in Unity. I love all the little details like the automatic sloping effects of the physics engine, so you can go up and down threshold of heights a lot better. I know this is in Unity in some form, but it’s “smoother” in Unreal Engine 5.

Hello World version of Stone Shire

Stone Shire Water Physics

Read More

Water simulation takes its cue from Minecraft and Dwarf Fortress in our voxel Nintendo game, Stone Shire. Instead of acting like real water in terms of flow, water level, and all that jazz, it simplifies the process into cellular automaton. When moving horizontally, it spreads until it eventually “runs out of flow”, and ends. However, if it falls over an edge, its flow is reset until it hits the next flat surface, which then it repeats. Simple yet simulates the flowing of water. I still give Notch props for coming up with such an effective method of 3d water simulation. We don’t go as detailed as making a pressure system like Dwarf Fortress has, but that may be in the future. For now, we’re more focused on making the cpu processes as efficient as possible, especially when monsters and animals are added next.

Below are the test videos of the water we currently have working. The first video showcases an earlier development, and the second shows it more refined and similar to how Minecraft does its water. We have yet to add deformation to the mesh so it looks like tilting sloping water rather than a step of cube-sized water blocks, but that is coming soon in a future patch.