Deep Dive on Stickman3D
How it started
I always wanted to make a multiplayer fun game to play with friends but wanted to get unity experience first. After I made about 6 games it was finally time to go for it. I knew multiplayer is a pain before starting Watching some youtubers video's about but I wanted to learn it even if its painful. I can say that after 2 month of game development time in this game now I have a lot of knowledge about multiplayer and can work on it again whenever the time comes.
First, I had to choose which way I am going to implement multiplayer is it pun or unity mirror. After research it seems mirror it better for large scale multiplayer while pun is perfect for small lobbies games. So I choose PUN 2 because my game is a 4 players game and I Started working on the starting main menu UI first and make a lobby and players can join. Thankfully PUN 2 had easy way to implement this into unity and didn't take me a lot of time to do.
Then I started working on the actual game , there are 2 ways of doing this. Make the game first with everything working then implement multiplayer in it or do them both side by side and I choose the second option.
Since Character controller and animations collide with ragdoll / rigidbody I made the rigidbody sleep and only activate after I die.
It was tricky at first since my bullet wont effect ragdoll physics only after I die not on the initial bullet hit that kills me so I added a check to ragdoll first if the bullet damage will kill me then add the damage later .
Also another issue I faced because I am using character controller and not ragdoll I couldn't use force if the target is alive so I added this script to do force to character controller . For example I added a pushback from shotgun if you fire it.
Lastly I added the UI option for ingame for sensitivity and volume.
This Project took me 2 month to complete. A 4 player game with 15 levels between volcano theme and water theme. I am proud from what I have accomplished and learned a lot of things in these 2 months.
Nice post! This is a very nice thing that I will definitely come back to more times this year! Thanks for informative post.
ReplyDeletePlease join and have fun friv2021.games | Nitro Knight io game