Category: gamedev
-
Area of Interest Part 2
In the last post I hinted that the AoI system will probably span a few posts. While I had the initial design and built the sensors in Jolt Samples, I quickly noticed a problem, my character wasn’t triggering the sensor volumes. Pairing Jolt’s CharacterVirtual with a Rigid Body It turns…
-
Area of Interest Initial Design Idea
Now that my physics engine is in place and I can move the primary character around, I need to start sending positional information to all connected clients. To do this, I need to have a system that knows which characters are near each other and who should be able to…
-
Some bugs and how I fixed them
Half Capsule Problem I left off last post where I finally fixed collision, but my character’s collision capsule appeared to be half inside of the mesh. This took me a good long while to figure out and finally with help from the author of Jolt he cracked what I was…
-
The journey to get Jolt’s Character to not fall to it’s doom
After, 2 weeks of intense debugging I finally have Jolt’s Character class working in my game! Picking up where I left off last, my character had an unfortunate feature of falling through the world. I was convinced this was a problem with how I was loading my FBX landscape mesh.…
-
Debugging JoltPhysics in UE5
I have been struggling with getting JoltPhysics to play nicely in my code. What seems to work just fine in the JoltPhysic’s samples, utterly fails when I try to play inside the Unreal Editor. This post is a quick update on how I’m going to start debugging Jolt from inside…
-
Loading FBX models into JoltPhysic’s Samples
I realize it’s been a long time since I posted, but I assure you I’m still working on this almost every free chance I get. It’s been rather slow going because I’m not really familiar with physics or loading meshes manually. I’ve been reading over the Jolt Physics docs and…
-
Understanding Basic Trigonometry to Calculate Movement for Server & Clients
One thing I probably should have done before I even started working on networking movement was to really understand and replicate how movement even works in my own code. I should warn the reader(s) that I actually am TERRIBLE at math. So even calculating the most basic things are usually…
-
Custom Movement, Inputs, and Compression
Input Today’s topic will be about how I plan on transmitting input/movement data to the server. Before we dive in, let’s discuss some constraints we have and some fundamentals. At first I was planning on sending a series of ‘actions’ and magnitudes. Where magnitudes would be the amount of yaw…
-
UDP Reliability Part 4 (Resending)
This will be my last post on UDP Reliability for a while, even though it technically is incomplete. Honestly, I’ve done enough work on it that I need to move onto something else to keep my interest in this project up! I left off where I wanted the game system(s)…
-
Using Valgrind to Find and Fix Memory Leaks
I’ll admit, I’m still very new to C++, even though I’ve worked on and off with it over many years. It’s different when you are sitting down and writing a large scale program than just writing small tools or reviewing other peoples tools/code. I wanted to make sure after I…
-
std::function, Lambda and Testing
While I begin to wrap up porting reliable.io from C to C++ for my PMO library, I wanted to touch on a quick testing technique I’ve used in Go for quite some time, which I realized I can also use in C++. Go interface{}, Mock Functions and Tests In Go…
-
UDP Reliability Part 3 (Reliable Endpoints to PMO)
While translating reliable.io’s endpoints to C++ I quickly came to the realization that I will need to properly implement the messaging system. Right now it’s kind of spread out all over the place (in the socket thread, the main loop, and inside of flecs systems). To make the system cleaner…
-
UDP Reliability Part 2 (Porting reliable.io)
Welcome to the second part of getting UDP reliability into my engine. Now with connections complete, I need a way of tracking sequence ids between packets and store histories and all that jazz, but it turns out someone already did the hard work for me!. Of course I am talking…
-
UDP Reliability Part 1 (Connections)
I’ve started working on the reliability layer of PMO. Good place to start is with the concept of “connections”. Since we are dealing with UDP, this isn’t really a thing, as each packet is independent. I plan on building the entire reliability layer inside of flecs’ systems, queries and observers.…
-
How (Third Person) Movement Works in UE5
Before I rip out the movement code for the UE5 Pawn, I want to make sure I understand how everything works. Movement has a lot of implications for collision and general physics systems so knowing what happens after you send an input is critical. I need to make sure my…
-
Floating points, Movement, and Quantization
Now that my library works in UE5, and I can communicate over the UDP socket to my server, it’s time to take a look at getting objects moving. As a refresher, clients send only their inputs and some additional metadata to the server. It’s usually a Really Bad Idea to…
-
DLLs, Memory, and You
Before we get into the topic of DLLs and memory, I just want to comment that after two weeks I am finally unstuck. This was mostly due to Sander (the flecs maintainer) fixing an issue I identified. As you can see from that issue, I tried many different methods and…
-
RIO then IOCP then just plain old Winsock2
Wow windows networking is.. not straight forward. For those of you who have never had the “joy” of working with them, I recommend you keep it that way. For Windows I only really need the client netcode to work, which means I don’t really need high performance socket handling code.…
-
Building PMO In UE5
I knew going in that it would be painful to build the PMO library into UE5. Once again I found myself in linker hell. But before we get to the problems, let’s look at what I’m trying to do here. I need my client library to be completely independent of…
-
MSVC Compilation Funtimes
Good grief has it been a rough few days. My last post was talking about how I got encryption working. After which I decided to try to get the client-side part of the code working in Unreal Engine/Windows. Little did I realize the nightmare that is porting to MSVC. The…
-
Finally, encrypted communications!
Phew, it’s been quite a week trying to get server/client communications working. I now have a much better understanding of FlatBuffers. An added bonus is that certain aspects of modern C++ are starting to make sense now. Before we dive into how I’m structuring my messages, let’s look at the…
-
Switching to FlatBuffers
The past day or two I’ve been struggling to update my crypto code to use Cap’N’Proto (capnp) and I’ve decided I don’t like the API at all. You have to translate your messages using streams and writers and a bunch of other janky stuff. I need to do something a…
-
Cap’N’Proto Serialization in C++
As I was building some game packet structs I finally came to the realization that, wait a second I don’t need to be doing this… at all. The plan all along was to serialize all the game netcode data anyways, so I might as well adopt a serialization package now?…
-
Groking Flecs
Now that I’ve decided to use Flecs to handle my reliability layer, it was time to wire up the server code and start getting acclimated with how flecs works. One of the things I always struggle with when starting to work with a new language or framework is figuring how…