- Reaction score
- 1,843
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.
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.
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.
Keywords: RTS, Sample, Unity 5, UNET, multiplayer, network
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: