Technical Documentation

Code Libraries Used:

  • UnityEngine.UI

  • TMPro

  • UnityEngine.EventSystems

  • CodeMonkey.Utils

  • DG.Tweening

  • System.Linq;

  • System.Net.Http

  • System.Threading.Tasks

  • FMod

Primary Algorithms:

  • The grabbing of the procedural star generation which uses rn.randint to select at random to a predefined range of the number of stars

Mechanic:

  • Players Click on the raycast GameObjects that we call star, which after clicking on two-star triggers the following behavior:

  • It self-reports the stars used to draw a line to a line renderer object that is only spawned in when two stars have been chosen by the player.

  • Within a frame, the line renderer will automatically adjust to the constraints of the line, its rigid body, and its capsule collider child to predefined and calculated lengths from the distance of the points for what a line should be in the context of our game. Based on the distance of the line, a value is generated which is added to the running tally if the line is used in a proper constellation.

  • There are constraints on if a successful line will stay in the world once created, and if the constraints are crossed the line gameObject to which the line renderer is attached will delete itself, adjust values, and built-in tracking lists accordingly.

  • The star selection raycast then keeps the previous star and then allows the player to draw the next line by just selecting a second star.

  • The stars that were used by a successfully made line become marked unusable which will make them unclickable and thus they are removed from play from that point onward.

Level:

  • The New Stars button will clear the star map that is currently in play and end the player's turn and begin the enemy's turn.

  • This resets all constellations and values and then also removes any obstacles. This also begins the enemy's turn, and they take their action before the new star map is put in place.

Artificial Intelligence and Other Autonomous/Procedural Systems:

  • Procedural Star Map Creation - New Star maps can be made at will

  • Procedural Enemy Selection - Enemies will be loaded at a directed random

  • Enemy AI - unique functionality depending on the enemy, as well as a generic attack

Infrastructure:

Game Cheats for Testing:

  • None at this time

Major Technical Questions Risks:

  • Can we do real constellations like most players are wanting?

  • How to make constellations feel more natural on the programming side, i.e how to implement smoother drawing, interpolation animation for a line appearing, and other juicy ideas?

  • Is the long-term game idea feasible for the current size of the programming team?

Code Syntax:

  • Variable created in a method: "GameObject _exampleVariable = exampleGameObject;"

          • Helpful for when a variable exists solely within a method call, and does not need to be persistent

  • Variable named in a script: "public GameObject exampleVariable;"

          • The standard variable naming convention for whatever class or if it's private or public

          • Syntactically both of these variables are following camelCase

  • Self-Referential variables: "public GameObject myVariable;"

          • The syntax to use for when a script holds the GameObject of itself, or is grabbing information from it's own defined class.

                • Example 2: "public BeeClass myBeeClass;", "public int dataVariable = myBeeClass.beeDataInt;" Now the myBeeClass which holds the variable BeeDataInt is usable within whatever script I have put these two lines just be referring to it as dataVariable. It does not update the information and thus should be used to reference starting values and conditions from either the start of the scene or when an object is instanced.

  • Tag Example: "ExampleObject"

          • Tags, in contrast to other variables, are always defined with Capitalization on the first letter of each word used to describe the tag in a clear descriptive yet efficient manner.

          • Tags do need to be just unique from one another and so you could have "Tag1" and "Tag2" as valid tags, but generally using at least one full word unique identifier is better in practice. So:

                • "Star" would be too generalized, but by using the tags "BaseStar" and "HealthStar" it's clear these two tags still are tags corresponding to stars but they have different inherent purposes that is clear within the tag itself.

  • All Variables should be named according to their function/purpose or to the class/datatype they belong to.

          • Ex: "private int countInt;"

          • Ex: "public Star startingStar;"

  • All scenes will have at least one Static script to be used to tie that scenes scripts together:

          • The name can depend on the context of the scene but for now, only two exist in the context of the game:

                • "global" which refers to the static script GlobalController. This can be used in any level scene to hold data, methods, or references to other non-static scripts so that other level scene scripts can ferry information to and fro to each-other's methods and variables.

                  • Referring to world controller in a script: "private GlobalController global;"

                  • This next line goes in start or awake to attribute the new private variable to the singular static script instance:

                  • "Global = GlobalController.Instance;"

                • "world" which refers to the static script WorldController is the over arching Overworld script which controls the functions of instancing new level scenes, changing scenes, and keeping track of upgrade data between failed runs, current runs, and more.

                  • Referring to world controller in a script: "private WorldController world;"

                  • This next line goes in start or awake to attribute the new private variable to the singular static script instance:

                  • "world = WorldController.Instance;"

  • Static Variables follow standard variable naming procedure, and don't have to be in the WorldController or GlobalController script, but are generally being updated by some non-objected oriented script.

                • StaticVariables is one such script meant to just hold the information of ever changing static variables within a level.

                  • Ex: "PlayerStats.playerHealth = 100;" updates the static variable but that isn't a static script.

Assumed Hardware Requirements (for now):

  • CPU - 2.0GHz

  • GPU - 1GB Video Memory

  • At least 2 GBs of ram

  • Windows 10 Home or Better