[Unity 5.2 UNET] Real Time Strategy Multiplayer Network Sample Projects

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,259
Here is a list of Unity sample projects I provided that uses the new Unity Networking API for making a real time strategy game. They are all attached to this post. The maximum number of attachments is 6, so if this post exceeds 6 attachments, future posts will have a link to the next post with other samples attached.

In each of the projects, I have added comments in the C# script files to help you navigate around what the codes are meant to do. If you are still confused, post below, and I'll answer them as concise as possible.

The reason I didn't upload this to Unity Forums, is that I am rejected to upload the samples there. This is a better alternative. Uploading to Unity Asset Store is confusing for me, prefer not to do that and reduce visibility. Uploading to Github means there is less discussion of these sample projects, hindering improvements as well as other feedback that I can get.

rts_unit_spawners

This sample project only uses game objects to spawn other game objects for players to control. There are no other abilities that players can do.
  • Players joins a session and their units will spawn in.
  • Control the unit by left clicking on the floor to move them

rts_unit_silky_movement

This sample project uses NavMeshAgent as a middle-man for pathfinding calculation. What it does is let the clients (local and remote) do the calculations, and only transfer given destination points across the network, creating a silky smooth movement. In short, no stuttering movements because of NetworkTransform.
  • Controls are the same as above; left clicking on the floor moves the objects around.

rts_nonplayer

This sample project teaches how to spawn non-player game objects from other non-player game objects. Also known as "spawn chaining." This is also a technical sample project, where the end results seems trivial to do, but it takes lots of effort to work the details out.
  • Hold left mouse button and drag to make a box selection.
  • Right click on the floor to move the selected units.
  • Press S to spawn.
  • Stop the network connection to destroy spawned objects.


Keywords: RTS, Sample, Unity 5, UNET, multiplayer, network
 

Attachments

Last edited:

seph ir oth

Mod'n Dat News Jon
Staff member
Reaction score
253
Ooh, I'll hafta look at this, I always wanted to play around with RTS controls in Unity but never got around to it :)
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,259
How about you show us some pictures / videos?
Currently "bureaucrating" my way to get a recording software installed on the lab computers, so I can use their 512MB SSDs for my advantages on making videos.
 

Accname

2D-Graphics enthusiast
Reaction score
1,457
I dont think that is going to help you with videos. SSD's have slower write speeds then HDD's and 512MB is certainly not enough for a longer video with good quality.
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,259
Yeah, good point. But it's better than a network drive only.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • jonas jonas:
    Good to see you Varine!
  • The Helper The Helper:
    Happy Sunday!
    +1
  • V-SNES V-SNES:
    Happy Sunday!
    +1
  • ToshibaNuon ToshibaNuon:
    Happy sunday!
    +2
  • The Helper The Helper:
    And its Friday!
  • The Helper The Helper:
    Happy Saturday!
    +1
  • V-SNES V-SNES:
    Happy Saturday!
  • The Helper The Helper:
    Happy Monday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    Happy Friday!
    +1
  • tom_mai78101 tom_mai78101:
    Starting this upcoming Thursday, I will be in Japan for 10 days.
  • tom_mai78101 tom_mai78101:
    Thursday - Friday will be my Japan arrival flight. 9 days later, on a Sunday, will be my return departure flight.
    +2
  • The Helper The Helper:
    Hope you have safe travels my friend!
    +1
  • vypur85 vypur85:
    Wow spring time in Japan is awesome. Enjoy!
  • The Helper The Helper:
    Hopefully it will be more pleasure than work
  • vypur85 vypur85:
    Recently tried out ChatGPT about WE triggering. Wow it's capable of giving a somewhat legitimate response.
  • The Helper The Helper:
    I am sure it has read all the info on the forums here
  • The Helper The Helper:
    i think triggering is just scripting and chatgpt is real good at code
  • vypur85 vypur85:
    Yeah I suppose so. It's interesting how it can explain in so much detail.
  • vypur85 vypur85:
    But yet it won't work.
  • The Helper The Helper:
    it does a bad ass job doing excel vba code it has leveled me up at my job when I deal with excel that is for sure
  • vypur85 vypur85:
    Nice! I love Excel coding as well. Has always been using Google to help me. Maybe I'll use ChatGPT next time when I need it.
  • The Helper The Helper:
    yeah whatever it puts out even if it is not perfect I can fix it and the latest version of chatgpt can create websites from pictures it will not be long until it can do that with almost all the tools
    +1

    The Helper Discord

    Staff online

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top