Category: gamedev
-
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…
-
Switched to epoll, but need reliability!
When I started this project I thought I had a decent understanding of what I need (and I still kind of do). What I didn’t understand is how quickly I’d need to have certain systems implemented. Last time I posted I had authentication working, but the code wasn’t really “doing”…
-
MMORPG Server Emulators And Where To Find Them
It’s always good to see examples of MMO servers up close. Over the years I’ve tracked down quite a few emulators. While not an exact representation of what a production MMORPG server looks like, you can get a very good sense of the design patterns just by reviewing the reverse…
-
Architecture Improvements
Architecture changes Over on mastodon (you know, where all the cool people hang out), June from Redpoint Games reached out to me with an alternate and much better design for dealing with client encryption keys. By the way, check them out if you need matchmaking code, trust me that stuff…
-
Some client encryption design thoughts
My goal was to get libsodium integrated, but I quickly realized I need more systems. For one, I need an LRU cache for storing client keys. Our clients will need to prove they are legitimate before we enqueue their packets, the only way we can do this is if we…
-
40k packets
Simplifying the server code I wasn’t too happy with the results from the last post, also there’s a lot of magic going on with uvw/libuv. I’m not a fan of magic. So I ripped it all out and decided to go back to basics (sort of). I wanted to try…
-
Libuv, uvw, flecs oh my!
Adding in the glue I spent most of the weekend getting the project setup (remember it’s all open source!) , which means fighting with CMake. I also did a lot of reading of libuv vs boost asio for an event based networking system. I finally settled on uvw which is…
-
Environment Setup
I can not stress enough how important having a good environment setup is for me. Traditionally, I’m a Go developer so getting a similar setup working in C++ will help ease me in. I also use VSCode, so having something working there where I can have my tests and the…
-
So, you want to build an MMORPG Server
Even researching how to build an MMORPG server is a large undertaking. There are so many different architectures and designs, components and considerations to take, even before you start coding. It helps to have a high level understanding of what and why it is so complicated. Please keep in mind…
-
Building an MMORPG server
I’ve always wanted to build an MMO, for a few reasons. One is the sheer technical challenge. The scale, complexity, and number of unique and interesting problems that need to be solved. Two, I really enjoyed old school MMOs. I grew up playing games like everquest, ultima online, shadowbane, everquest2,…