Search Unity

Tutorial: Building a Multiplayer FPS in Unity 3d

Discussion in 'Multiplayer' started by quill18, Dec 11, 2013.

  1. quill18

    quill18

    Joined:
    Feb 18, 2011
    Posts:
    7
    Heya Folks!

    I'm publishing a tutorial on how to build a multiplayer first-person shooter in Unity 3d. 10 episodes are already live, and several more should be available by the end of this week.

    Watch the first episode here: http://youtu.be/AIgwZK151-A

    What is covered:

    • Building a level in Blender 3d
    • Texturing and UV Mapping
    • First-person character controller
    • Photon Unity Networking, Cloud-based servers
    • Matchmaking, room-creation, and joining
    • Syncing character positions across the network
    • Mecanim-based character animation (Running, Strafing, Jumping)
    • Shooting, Taking Damage, and Dying
    • Using RPC calls to broadcast events across the network


    Coming soon:

    • Health Armor Pickups
    • Moving platforms and elevators
    • Teleporters
    • Three basic weapon types: Sniper Rifle, Machine Gun, Rocket Launcher
    • Multiple game modes: Deathmatch, Team Deathmatch, Capture the Flag
    • AI bot programming basics (Pathfind around the map, grab pickups, shoot enemies.)
    • Sounds (Including techniques for generating good sound effects using free tools)
    • Explosions! Projectiles! Particle effects!

    You can download all the project files from this site:

    http://quill18.com/unity_tutorials/

    If you have any questions, you can post here, comment on the videos, or email me at quill18@quill18.com

    -- quill18
     
    milox777 likes this.
  2. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Sweet, thanks man! I see lots of your tutorial videos that I want to check out already. ;)
     
  3. AlucardJay

    AlucardJay

    Joined:
    May 28, 2012
    Posts:
    328
    Ever since I discovered twitch and Quill18 at LD26, "Heya Folks" has become my favourite sentence, it's tutorial time!

    The FPS-GOTY (Shoot!) and Multiplayer Space tutorial taught me enough to make my own coop shooter (with my own rigidbody character controller), so thank you once again Quill18.

    Currently watching video 4, I thought I would bring to your attention a problem I found when using offline mode. One cannot use hashtables (which again was awesome to learn about). Now, I code in uJS, so maybe the problem is only there for me (as well as having to specifically reconfigure my PUN folders locations) but I thought it was worth bringing to your attention.

    Thanks for all the great videos and knowledge, you have really helped me a lot (as a mentor and inspiration). All the Best, Jay.

    Edit : Video 5, this is the issue I have using uJS and C# in the same project (I know, just use C# man! I can read both so one day...) : Special Folders and Script Compilation Order ; though I thought your method of finding uJS scripts was genius. Groovy!
     
    Last edited: Dec 12, 2013
  4. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    Nice one! The Unity networking is severely lacking from good tutorials.
     
  5. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    As far as I can see, they are using PUN and not Unity's networking
     
  6. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    If that can be mixed up, we accomplished our mission for sure :)

    quill18: Cool to see you continue your tutorial sessions. Nice work as always!
     
  7. applejuices

    applejuices

    Joined:
    Nov 20, 2013
    Posts:
    80
    I was soooo excited until the thing "we will use photon" I know you don't have to but, I really want to use what unity gives, nothing else,is there any way you can show us how to use regular networking with the unity stuff and build a masterserver on windows (or what ever you use), then connect to master server, and make it so external peeps connect to me?

    Otherwise, great tutorials
     
  8. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    True :D
     
  9. nastasache

    nastasache

    Joined:
    Jan 2, 2012
    Posts:
    74
    Hi applejuices,
    If you want to use only what Unity gives, this maybe will help you. But it's about Linux masterserver only.
     
  10. Siddown

    Siddown

    Joined:
    Jun 13, 2013
    Posts:
    45
    @quill18,

    This is such a great series, thanks very much for putting it out there. Highly recommended to anyone just because it's enjoyable to watch, but I do like how it's tailored to the beginner.
     
  11. quill18

    quill18

    Joined:
    Feb 18, 2011
    Posts:
    7
    @Siddown -- Thanks!
     
  12. Siddown

    Siddown

    Joined:
    Jun 13, 2013
    Posts:
    45
    Plus I sucked so badly at that map in the original UT. :)
     
  13. applejuices

    applejuices

    Joined:
    Nov 20, 2013
    Posts:
    80
    @Nasta,
    WHat the videos? anyways That will help, but what about using normal unities stuff then hooking it up to master server that I have on my own comp?
     
  14. Siddown

    Siddown

    Joined:
    Jun 13, 2013
    Posts:
    45
    @Quill18,

    I assume using a Terrain instead of the model and the Third Person Controller instead of the FPS Controller will work just the same, right? (Well, probably not the shooting since that might be a bit different anyway, but the movement, passing animations, etc.)
     
  15. quill18

    quill18

    Joined:
    Feb 18, 2011
    Posts:
    7
    Yup! It should be almost exactly the same.
     
  16. applejuices

    applejuices

    Joined:
    Nov 20, 2013
    Posts:
    80
  17. Siddown

    Siddown

    Joined:
    Jun 13, 2013
    Posts:
    45
    @quill18,

    Hey Quill, I just wanted your take on something.

    So I took your tutorial and changed it up a bit to use a third party controller, and so far that is working pretty well (I'm having a few problems with the mouse turn not working when there are two players, but nothing I can't figure out).

    I want to keep the game peer to peer for now (so no server), because it's just a fun little game at the moment. What I want to do down the road is spawn some NPCs, simplified bots for example (that move and attack players). I would assume that in this case we'd want to run those on the Master Client, right? I just can't see it working otherwise, especially when it comes to what client figures out the AI/Movement.

    But what about if a player has a minion/pet/companion/nuclear powered were-Llama? In that case, wouldn't I want the individual player to be "in charge" of that, or would you also do that from the master client?

    Thanks in advance.
     
  18. radar089

    radar089

    Joined:
    Jan 2, 2014
    Posts:
    216
    hey quill when do you think you will finish the tutorials?
     
  19. 3D Omelette Studio

    3D Omelette Studio

    Joined:
    Oct 1, 2013
    Posts:
    130
    good stuff, keep em coming.

    was wondering how you managing this part:
    --Matchmaking, room-creation, and joining --

    have you already covered this spec of the tut?

    are you going to base the matchmaking in relation of the players advancement ie: level or skills etc... to keep an even battle?

    any plans for when releasing this video tut. i am interested how you going to tackle this feature.

    regards
     
  20. sezbladex

    sezbladex

    Joined:
    Sep 15, 2013
    Posts:
    22
    hell yeea i am waiting new modes thanks for tutorials
     
  21. TTF

    TTF

    Joined:
    Dec 1, 2013
    Posts:
    19
    Your tuts helped me a lot.
    When do you plan to make number 14?
     
  22. wisien92

    wisien92

    Joined:
    Nov 16, 2012
    Posts:
    56
    Could you set the player name above player with 3dText ? i have many problems with that ....
     
  23. 121Gamers

    121Gamers

    Joined:
    Jan 7, 2014
    Posts:
    6
    Sweet Tutorials Player respawn on die should be add i think
     
  24. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Amazing tutorial. Learned SO much. Thank you Qwill