Game Development | Start Of Multiplayer

in Game Development2 months ago

manyclients.jpg

For the last several weeks I have spent the bulk of my game development time in one of my test playgrounds. I have a lot of new things I needed to learn from scratch and test out. Instead of trying to do that in my main project and risk messing stuff up. I’d rather do it in something I can always wipe and start again.

I have come to a rather large stage in my game development journey that I knew would be a struggle long before I got here. To be able to achieve the goals I want for this game involves understanding, implementing, and running servers and players instances.

startofmultiplayer.png

While the above screenshot looks quite simple with it being in the standard Unreal Engine 4 (UE4) third person starting zone. All those added blocks while quite ordinary looking do quite a lot.
server spawn loot.png

All of the blocks have their functionality set up to execute on the server. Not something I have done before and requires thinking about things a bit differently. UE4 through their replicates system does make it a bit simpler in trying to understand things. Once you understand what you need to set as run on the server or run on client or multicast.

I have a few testing blocks set up for loot. Both in loot dropping once something has been destroyed like an enemy. Along with items on the ground for a player to pick up. The cool thing once I got it right picking up loot on one client broadcasts that it has been looted and is no longer shown on all the other client pawns.

Certain things needed to be replicated on the player itself. So when you move around say holding a sword others see you moving around holding a sword. That will be further expanded out to spells and combat ability’s as I slowly work on things.

shop.png

There is also now a very basic shop set up where players can sell items to that shop and another player can buy that item from it. While it’s not exactly a player auction house as you would expect it. The first interaction at least creates a basic player market. For now, all items have a set price.

All of this of course requires rebuilding everything to work in this manner. A lot of the former stuff I did worked just not that well and for single-player only. They're still a lot left to work on and integrate better on my test project. Once it's all up and running it will be time to transfer it over to my main project and get it working over there.

Many things are still quite in their early stages with me being at it for a couple of weeks now at this stage of development. There is also an endless amount of stuff I need to learn, test, and fail at before getting it somewhat right.

client death.png

There at least have been some funny moments when doing things like testing player death and having all the clients die. I might have tested this a few times.

Beyond this point, there still so much to look into and learn. In the next couple of months, I’ll more than likely be looking at server hosting options. There are a couple of places out there that at least offer for game developers limited free trials of their different services.

It’s quite the hail storm out there in even trying to understand what I actually need. While there is some documentation out there it’s more geared for advanced developers who have a clue what they are doing in the first place. Which I’m quite far away from being.

There have also been some interesting developments over the past few months. The latest UE4 versions have a lot of game compiling options for different platforms removed. This had led many to speculate what that could mean.

Interestingly enough many have suggested that UE4 or rather UE5 (Unreal Engine 5) could have a focus on using the cloud and Pixel Streaming. This would remove the requirement to have so many different compiling options for different platforms. This to me sounds like quite an interesting thing to look into as it would also resolve a lot of issues I’ll be running into one day.

Even more interesting UE4 has recently provided a Pixel Steaming demo for developers to test around with. You also had Microsoft a few months back release a UE4 demo called Project Anywhere.

Final Thoughts

3 cilents.png

I have not looked into too much detail for using the cloud or Pixel Steaming yet. It seems as I try and get my feet wet for multiplayer functionality some possible major changes are going on with games, servers, distribution, and players. Seems the list of things I need to look into and learn is never-ending. Either way, I’m slowly moving forward on things.

Other Posts:

Information

Screenshots were taken and content was written by @Enjar. Screenshots are from Unreal Engine 4.

Game roadmap.

Sort:  

Nice job, keep up the good work.

Even though game development is a complicated endeavor , just in the last 10-15 years it has become significantly easier to create games and I think it will continue to get easier, especially with tools like unreal engine, unity and many more

I can only imagen how large of a team it would have taken to pull off what I’m trying to do 10 years ago. I don’t think I would have stood a chance trying to do it solo.

Props for adding multiplayer! I imagine working on it is not a simple copy and paste of the singleplayer. I would love to dig into the multiplayer side of things(even a highscore ladder) but for now I have not even the slightest idea 😅

I got little bits here or there of MP. This is just really the first few steps. I’m quite far from having a server set up with players logging in and all that jaz.

Yeah I imagine a completely new challenge. Not the case soon but if you need some playtester I'm up for it ;)

Thanks, @enjar!

Have a great week :)

You too!