Spring 2016 Semester Project
#####Try out the web version of the game: http://videogamedev.club/VacuumBuild/
5.3.1f1 is the version being used for this project. Get it with these links.
Unity can take a while to download, so pass the time by getting down the basics.
- Project Documentation:
- Project standards and programming conventions can be found at the end of this document.
-
GitHub Desktop (Recommended App)
There are many ways to contribute to the project, such as play-testing, contributing to the project’s source code, creating assets and art, and finding and reporting bugs.
-
To contribute to the project’s source code, create a fork, modify your fork, and submit a pull request. Things currently being worked on or needing attention can be found in the Issues section.
-
Creation of assets and art encompasses multiple things, including creation of 3D models, textures, sound effects, particle effects, interface elements, and animations. There are many free and paid utilities that may be used for producing each of these things. Below are some recommended apps that can be downloaded for free.
- For 3D models, SketchUp (Windows, Mac) or Blender (Windows, Mac, GNU/Linux)
- For creating textures, [Gimp (Windows, Mac, GNU/Linux)] (https://www.gimp.org/downloads/) or Pixelmator (Mac) (free for 30 days)
- For sound effects, Audacity (Windows, Mac, GNU/Linux) or GarageBand (Mac)
- Particle effects, interface elements, and animations can be created within Unity on Mac and Windows.
-
If you find a bug or problem, first go to the Issues section of the repository to check if the bug or problem has already been reported. If it has not already been reported, open a new issue and give a detailed explanation of the issue and any suggestions for a solution.
If you need any further assistance, contact ecd157@msstate.edu or post in the VGDC Telegram group.
Zenhub changes the format of the Issues section for a new way of organizing your issues and tracking stats. This extension is not required to be able to work on this project.
-
Add ZenHub here: https://zenhub.io/
-
After adding ZenHub, check out the new Issues and Boards page here: https://github.com/VideoGameDevClub/VacuumCleanSupreme/issues
This project utilizes the networking features of a Unity plugin you can find on their asset store called Photon. This plugin/service allows us to keep things simple by not having to set up our own server for listening and sending calls. This plugin also makes writing network code extremely simple.
I suggest creating an empty project on your machine and just going through their Marco Polo tutorial. This tutorial takes no longer than an hour, and afterwords you'll have a good idea of what's going on whenever you see/write networking code.
These are just a few standards that we would like contributions to follow for consistency throughout the project. When you submit a PR we will make sure your changes follow these standards and, if needed, recommend appropriate changes so that they do.
- All code written will be under the Scripts folder.
- Folders, file names, enums, and enum constants should be done in camel case beggining in a capital letter
- ex:
DemoAssets
- ex:
EnemyBehavior
- ex:
enum EnemyState { Searching, Pursuing, Attacking, Fleeing }
- ex:
- Function names are declared camel case and with starting letter lower case
- ex:
killSelf()
- ex:
- If an enum is made public it should be put in its own file that is named the enum
- ex:
public enum EnemyState
will be put inEnemyState.cs
, which only contains the enum decleration and using statements. - This is to make finding where the enum is declared easier, as well as an attempt at making merge conflicts easier.
- ex:
- When you plan to have a class extend from monobehavior (such as a class meant for controlling camera movement), end the name of the class in
Behavior
- ex:
CameraControlBehavior.cs
- ex:
- Document every class and function!
- To quickly add a summary to a class or function, move the cursor to above the declaration of a class slash function and enter '
///
'. This in both Mono and VS start a nice body for the description of the class / function.
- To quickly add a summary to a class or function, move the cursor to above the declaration of a class slash function and enter '
- 0 public variables. To get a variable's value or set it create the appropriate getter and setter methods (otherwise known as accessor and mutator methods).
- Namespace convention: Preface with VGDC, and every parent folder the script is contained in will come after. (Ignoring the Script folder)
- Ex: If script x is under Scripts > GameManagement, then the script's namespace will be
VGDC.GameManagement
- Ex. If script y is under Scripts > Characters > Player > Weapons, then the script's namespace will be
VGDC.Characters.Player.Weapons
- Ex: If script x is under Scripts > GameManagement, then the script's namespace will be
These are just suggestions that have made our time coding in Unity easier.
- When having a function being called inside of one of MonoBehavior's messages ( ex:
Update()
), then that function should end in that message's name.- This makes programming state machine's easier. The
Update()
contains a switch statement that calls the appropriate function based on the state. - ex: In
Flee
state,FleeUpdate()
is a method that is called inside of Update. - ex: In
Flee
state,FleeOnCollisionEnter()
is a method that is called inside of OnCollisionEnter
- This makes programming state machine's easier. The
- Initialize
Vector3
variables toVector3.zero;
- If you want to edit a script's variable in monobehavior add the
[SerializeField]
line above the variable decleration. - You should most likely be using a
CharacterController
rather than a rigid body for agent movement. - Don't use
Destroy( gameObject )
for removing the gameobject in the scene. If there comes a time that you need to remove a gameobject from the scene localize thatDestroy()
statement to its own method that can be called. Similar to destructors.