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

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
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

  • rts_unit_spawners.7z
    3 MB · Views: 2,580
  • rts_unit_silky_movement.7z
    3 MB · Views: 2,905
  • rts_nonplayer.7z
    3 MB · Views: 2,565
Last edited:

seph ir oth

Mod'n Dat News Jon
Reaction score
262
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,633
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,462
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,633
Yeah, good point. But it's better than a network drive only.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top