General Big Projects Small Projects About Contact

Dalton City

The Goal

Recreating a board game with online multiplayer.

Challenges

Understanding networking in Unreal Engine.
Working with that networking.

The Concept

One of my favorite board games is "Dalton City" made by Telar Games back in 1997.
The reasons why I love it is because of it's unique mechanics.
Nearly everything is luck-based.
You can read about all the mechanics on the ReadMe on Github.

Because I can't find any info about Telar Games, nor the game itself, I feel like it's very close to becoming lost media in the next couple of years.
So to fix that, I plan to bring this to live in a digitalization of the original game.
It's easy to create a game in Unreal Engine with local multiplayer, but I want to be able to play this with friends who aren't in the same house as myself.
That's where the hardest part comes in: networking.

DaltonCity_Banner

Because when starting this project I didn't know anything about networking in Unreal Engine, it felt like a good way to actually start learning.
This does give a small problem: I wanted to start learning C++ in UE, but nearly all the documentation about networking is in Blueprint.

After considering just starting out in C++ and biting the bullet, I caved in and just used Blueprints to start off.
The plan now was to make a fully functional version in Blueprint, and later on remake it in C++.
Yes, the code might be harder to view and some people really hate Blueprinted games, but at least I would understand the concept of networking with a fully functional example.

The Code

As the code is mostly Blueprinted, I will try to summarize this shortly.

For the Lobby code, everything can work with default Session Blueprints in Unreal, yet I used the Advanced Sessions plugin so I could add more settings.
This allows me to cap the users to the amount of people in a lobby and kick any other people trying to join.
The only part that is different is the joining via IP, this is done via Console Command.
However I have noticed some bugs if you try to leave that session, but will test this more in the future.

For the Game code, the GameMode checks if the amount of players that join is equal to the amount of players that were in the lobby when the game started.
This is doable thanks to the Advanced Sessions plugin.
If the correct amount has been reached, we switch the Match State, which is stored in the Game State.
The players then decide where to place their pawn.
Once everyone has done that, the Game State switches to InGame, picking a starting player and starting the match.

When the match has started, the turn player will get the option to roll.
After rolling, the player will advance that amount of spaces.
Whatever tile they land on, this tile will execute their effects.
Currently this could either be; buying a Trade Tile, paying another player, receiving money from Ranch.

Whenever a player goes bankrupt, the server GameState gets notified.
It will check if all of the players except 1 are bankrupt, if so, the game will end.
The host will then get the option to go back to the Lobby.

The most difficult part of the game was to understand the difference between when a Server call needed to be done or when a call for Owning Client needed to be done.
Only the PlayerController has access to Server calls, so this complicates a lot of things.

DaltonCity_01

In Conclusion

This is my first big standalone project not for any course, or in a team.
Understanding the networking was a big challenge, yet after a lot of thinking I think that I finally get how it works.
The bigger downside would be that I have no clue on how to start on it with C++ code.

At the time of writing, the game has not fully been implemented yet!
I just wanted to have a stable base version out to create this page.
Later on, more images etc will be added to give a bit more flare to this page.
I do intend to keep working on this until it's completed.

Aside from that, it does feel nice to see a good and forgotten board game come back to life.
If you want to play it for yourself, feel free to check out the Github release, you can just click the button below.
Only if you want to play online multiplayer, not on your own LAN, you have to portforward port 7777 UDP.
Then create a game and give your IP address to someone you want to join.
Disclaimer: do not share your IP address with someone you don't trust!