Hi Folks!

I hope you’re all doing well!! I’m doing pretty OK finally. I’ve seen some doctors and I’ve been able to get healthy and back to work and I’ve never been happier. I don’t want to talk about my personal stuff much, but I’m beyond thankful to be healthy again.

Now games!

Progress has been pretty steady with the game. Each one of these items is mentioned in no particular order and I’m probably missing a lot of new things because I have no idea what exact order I did them, but here is what I worked on off the top of my head:

Master Blueprint

I created a new master blueprint within the game world to control everything. It allowed the game’s terrain generator, rain, and water systems. This is later to update the world as needed.

To start, we added the functionality to determine the world size. In this case, once the player leaves the “world”, they will end the mission and navigate back to the lobby.

With this basic information, we start to take in account our world terrain generator, boat size, and general size of the player character. We’ll get to the world generator again later, but this was a bit more complicated than I hoped.

Wind

I’ve been hard to work trying to get the world working as it should and spent some time doing some tasks I’ve been putting off for a while. As a result, I haven’t added a wind system until now.

In general, wind isn’t too difficult. At a base level, it’s a direction an actor has and updates to tell the other actors what that “wind” direction is. The direction itself doesn’t do anything until we add it to other actors in the game world, so it’s a fairly simple implementation, assuming you want a constant wind direction.

Whenever you don’t use a constant direction, it becomes more difficult and needs more math. In this implementation, we start by randomly generation a starting direction. Then upon some randomly generated time, the wind updates and randomly sets a new direction within a set range from existing wind direction.

With this implementation, players won’t run into issues with the wind randomly switching entirely around (180 degrees) over an over again. Basically, the wind randomly chooses a new direction within 30-45 degrees from the existing wind direction.

Below is a sample of my debug wind direction actor, which updates it’s arrow to the the wind direction. In the release of the game, this will update much slower but for testing, this worked great to check functionality.

World Generation

I spent some more time learning procedural and dynamic mesh generation in Unreal, as I mentioned in my previous post. What I ultimately wanted was something to create dynamic meshes at runtime from a heightmap, noise, PCG, or something that’s easy to generate or work with. At a point, I was getting quite desperate, contemplating expensive landscape generation plugins on FAB or just making my own.

Using some plugins to learn, I learned how to generate dynamic and procedural terrain using heightmaps, which then can communicate back to the game and update based on player input in the lobby and some random noise. The logic was a bit funky and building the heightmaps were a little difficult, but I eventually got something to work.

With a little more work, I was able to get the generated island code loaded into the main game world. After some more tinkering, I learned how to manipulate and position the generated mesh. Then, I added some logic to randomly position, scale, and rotate the generated terrain’s mesh within the gameworld. This came with it’s own issues.

At this point, my generated meshes were one sided, meaning players can fall off and go under the island/landscape/world from the side. To fix this, I created a super basic base island to place the generated terrain upon.

Game island base (super simple mesh, WIP sorry) :

Using this method, I can reposition and manipulate the generated mesh and PCG without having to worry about all the math. I had some issues attaching and world and local positions, but it came together.

Now that the world is generated, this island then talks back to the Game Master to determine the world size. This size is generated based on the size of the island and some buffer water around the island.

Island Photos (please excuse the X crosshair 😀 )

I was also able to get PCG working on the generated terrain, as well as update the PCG from the island’s random position, rotation, and scale determined by the game master. This isn’t anything too nice or neat, but I was happy to get it working as a testing level so here’s a screen shot of whenever I got it to work for the first time:

I’ve been using the LandscapeMeshBuilder plugin as a base for my own custom terrain generation and it’s a great resource for what I’m doing. I tried out A LOT of landscape generation plugins and built my own from scratch, but I found LandscapeMeshBuilder to be the most helpful for my project. I was able to use what I learned building my own and then apply it to the MeshBuilder. But for most other projects, other engine landscape generators, or even Unreal’s built-in landscapes are probably better in most cases. This one just did that one specific thing I wanted.

We’ve had some really great progress with terrain generation. It was difficult but we’re almost there!

Water and Boats

I also worked on the water physics and boat within the game.

Starting with simple boat stuff, I added an anchor, a deposit chest, and a wind indicator. This messed with the physics of the boat and floating, but I eventually got it to work. They’re not much to look at so I don’t have any photos, but it’s coming together.

I don’t have much to show here right now since it’s currently being worked on, but I wanted to mention it.

As for water, long story short for progress, I’m running into issues with Unreal’s built in water computational shader. Basically, Unreal’s water uses fancy math to determine the position of waves and how that interacts with characters, but the look of the water and the water’s math is handled separately. This doesn’t work well with multiplayer. Additionally, the water material shader doesn’t update whenever the base water math changes, so if I ever want to change the wind direction or waves, it doesn’t update how they look or it fails to compile completely and be invisible. It’s a real weird problem but I’m getting there.

Backend

I also completed some backend work so the player character can talk to the gameplay world when loading into a new level. This was essentially passing the world generation information to the Gameworld whenever you select a level. I’ll probably have to revisit this whenever testing multiplayer, but it’s progress!!

Side Notes and Personal Bits

Beyond that, I’ve been taking an Unreal C++ course through Gamedev TV. I’ve had many headaches getting the compiler to work, but it’s a useful skill and something I’ll need sooner or later. I’ll be sure to take some screen shots and hopefully game links whenever I’m done.

I’m hoping to get some more work done over this week, but since it’s the holiday, who really knows. Most of my time will probably with the C++ course for a little bit, but hopefully I’ll have enough mental strength to work on the game a little bit. But I also wanted a little break so I don’t lose my mind, so a course has been a nice change. Now that I’m feeling better, development has been great and fast and I’m super happy with how things are coming together.

That’s enough of my rambling but…

LAST BUT MORE IMPORTANTLY……
Take care of yourself and make sure you eat and do something you enjoy this week. Hang in there. Life can be hard some times, but there’s people out there who love you and want to see the best for you. Nothing in life is perfect, so we don’t have to either. We’re all good enough. I believe in you. You got this.

If you read this far, thank you so much. I’ve been having a lot of fun making this project so I’m happy to share some of the love and hard work I’ve put into it.

Catch you on the high seas!

~ Mark
12/21/2024


Leave a Reply

Your email address will not be published. Required fields are marked *