i made a thing
I just wanted to write a brief summary about the project. Some of the things that I learned, as well as explain a little bit about how I made this.
Fun stats about the project:
-took me 2 months to make (only nights, and 3-4 days a week)
-I didn't model anything
-It is all Blueprint, not a single line of code was written
-there are 6 different car types, 13 different weapons,
-made in Unreal Engine 4.25 - Plugins used: Radial menu, Smooth Sync, Advanced Sessions
-the map is 4km x 4km, tiled landscape, using world composition tool in unreal engine
-everything is multiplayer replicated
-the animation state machine has: idle/locomotion, pistol, rifle, sword/bat, jump, crouch
So we had the first networked play through a while back on my YouTube channel and we had a lot of fun testing the game out. We got I think about 10 + players on the server at once. The livestream didn't get a bunch of people, and I definitely think we could have had probably an upwards of 30 players on the server. Up until this point I had never made anything crazy like this, and actually test it. As for actually hosting the server, I ran the server executable on AWS (on a XL ec2, a quad core, 16gb ram beast). The reason being was the fact that I was having issues with the way I programmed the AI spawning in (more on this later). Overall network latency wasn't that bad, and the ec2 was hosted in Ohio.
What I Did Wrong:
One of the big issues I had making this game was the overall performance. I used a blueprint building system that would automatically take modular building pieces to create skyscrapers. I did not merge these meshes to create LODs because of issues with the materials when they merged. Cleaning this up or figuring out a workaround to this would take longer than the time I wanted to spend on the project. So the main issue with performance has to do with the buildings not having LODs.
Another big design failure was my AI random outfit blueprint. I used a plugin called the Open world AI multiplayer plugin. Which handles automatically spawning and de-spawning AI when players get within a certain distance. This is all replicated and setup for multiplayer. The issue was the fact that I had the AI have random outfits that were fetched from data tables. While in practice this sounds fine, but in action it went horribly wrong. I had the AI pick random outfits on the construction script when spawning the AI and this caused terrible performance hitches on the server. And is significantly noticeable when you render in the AI. A better resolution to this is to either have children AI that have different outfits already setup, and maybe only customize a couple of things on spawn.
One issue I had was with the cars. I experienced a lot of de-sync with the cars. This I have yet to figure it out. The cars behavior colliding with players was not that big of an issue (can probably easily be fixed). The main issue was the fact that the cars would be de-sync'd after they render out someone's view. For example, when we were racing in the video, all the cars crashed up together, but on the driver's screens they were still driving on the road. On my screen I just saw a car crash. This issue could have possible ties to the world composition system. Either way I still need to figure this one out.
What I Would Have Done Differently:
I need to learn more to subclass blueprint logic. I ended up with a messy character class. I would have definitely looked more into merging big actors into one solid mesh. Like I said, I just had too many issues with the materials.
As for blueprint, there are a lot of parts I would have probably nativized into code. For example, the automatic firing logic should definitely be in c++ since it is running on a loop when the player holds the left mouse button down. That definitely was not cheap to run lmao.
When assigning the character clothing to the character. I used set skeletal mesh, and set master pose component. I don't think this is the best way to do clothing on characters. The way Epic has it setup in fortnite is they use the "copy pose" node to copy the pose from the base skeleton to clothing.
What I Learned:
I learned a lot of stuff from this project. I made multiplayer drivable cars with get-in and get-out animations. The cars also had destructible glass. Each one of them were custom rigged in blender too (so that I could have them all setup the same). They had open and close door, sounds, and also destruction particle fx.
I learned a bit about replication and multiplayer functions (however I am still a noob). I would like to in the future utilize the Gameplay Abilities System for client side prediction of things in the future.
Random thoughts:
So creating the custom outfits things was a lot of work. I had two base character models from Daz studio (a male and female model). They all had custom hair and clothing. I got all the outfits from Daz Studio store. They had to be rigged to the skeletons, and bones renamed to be imported to ue4 correctly. I also had to make sure that they didnt have a million polys. So sometimes i'd bake out the LOD in ue4, and then export that, reimport it as base LOD 0. Then i'd bake LODS on top of that. Each character had like probably 10-15 outfits? Then each outfit had different materials. They had shirts, pants, a couple of jackets, and shoes.
Overall this was a lot of work and what I like to call "asset management". I had never really done anything on this scale before. I also extracted hair meshes from old paragon characters. I would export the character mesh, and then import it to blender. Select the hair and delete everything else. Then import that as a static mesh, and attached it to a socket on the character. Only annoying part of that pipeline was the fact that the hair textures wouldn't let me export them out of the paragon project, SO I had to migrate them all to my cyberpunk project.
Summary:
I probably missed a lot of things in this random post of thoughts. Overall I tested a lot of things, and learned a bunch. Before I started this project, I was joking to myself thinking about "what if I made Cyberpunk?". And I told myself that I would never try it, because it's just too hard. Then for whatever reason, I decided to try it, and make it multiplayer replicated (which is much harder than just singleplayer). I am glad I did though, I learned a lot of things. It's always good to challenge yourself once and a while. While it might be cancer, you'll learn a lot of things.
A little tidbit about motivation; I lost motivation for the project probably 2 or 3 times during the development and didn't work probably for a strait week. It's hard to keep working on a project, especially if you lose that drive that you had when you first started it. This can be due to the fact that you are too ambitious on a certain project, and you have set the bar too high. I did this quiet a few times. If you find yourself in this spot, you really need to figure out what needs to get done, and scratch other things that are taking too long. Work on gameplay first, and everything else can follow. If you aren't a full time game dev (8 hrs a day to work on this), I wouldn't expect to make a game in a day. I would rather be in it for the "long run" and work on a couple of things every single day, Then you will look back to see you have accomplished a lot.
Hope this helps other devs.
Get Cyberjunk Online
Cyberjunk Online
Status | Released |
Author | SmartPoly |
Genre | Action, Role Playing |
Tags | Cyberpunk, Multiplayer, Third Person, Unreal Engine |
Leave a comment
Log in with itch.io to leave a comment.