Adventures in GameDev with GameDevHQ! Day 20: It’s starting to feel like a real videogame!

Esteban Ibarra
4 min readApr 1, 2021
Hello from the future!

What a journey it’s been and we’re only halfway through but I’ve learned so much in such a short time and I honestly feel far more confident than I’ve ever been when it comes to programming in Unity! Let’s take a quick refresher over what we’ve learned:

The Unity Editor: We’ve learned The Scene and Game view, Hierarchy, Project, Inspector and Console windows as well as touched upon the Animation window for animating the powerup! We learned how to navigate around the scene view and manipulate objects. We also learned how to manipulate objects using the transform window in the inspector.

We created objects, materials, empties, and most importantly scripts!

In coding, we learned about Namespaces and the two default methods that come with every script thanks to the scripts inheritance of Monodevelop; Start and Update. Start is run before Update and is usually used to initialize variables and get routines and coroutines running. We also learned that Update runs 60fps.

We learned that GameObjects are transforms and transforms are GameObjects, and that any kind of interaction between GameObjects will always be exclusively through their transforms. If we want to control anything else, we’ll have to use GetComponent<>

We learned that Vector3 is Unitys way of keeping track of a GameObjects x,y,z coordinates and that we can modify these coordinates to move them through space.

Vector3 has shorthand codes like Vector3.left, Vector3.right, Vector3.up, and Vector3.down

Time.deltaTime is 1 second of realtime and if we want our objects to move smoothly, we multiply our transforms with this.

We learned about variables and that they can be both private and public, and the four most used types are int, float, bool and string.

We learned about user input. Getting horizontal and vertical axis via code for player control using Input.GetAxis, or checking for keypresses using GetKey or GetKeyDown.

We moved objects using transform.Translate and we checked whether the player moved towards the edge of the screen and prevented them from moving further using transform.position.

We learned about if/then/else statements to make decisions.

We learned how to research answers quickly when we needed new information.

We learned about prefabs, the lookdev view and instantiation, and Quaternion identity for an objects default rotation when instantiating.

We learned how to Destroy our GameObjects once they weren’t needed anymore and didn’t need Unity to keep track of them.

We created a player ship that could fire instantiated lasers that were destroyed when they went beyond the top of the screen.

We wrote a cooldown system that prevented players from spamming the fire button.

We created enemies that spawn randomly along the horizontal width of the screen, moved down, and teleported themselves to a new random location at the top.

We learned about Unitys physics system and its two components: Box Colliders and Rigidbodies.

We learned how to code interactions between box colliders using OnCollisionEnter and OnTriggerEnter

We used tags to help us differentiate what those colliders collided with.

We learned about scripts communicating with one another using GetComponent.

We wrote a spawn manager that instantiated enemies and powerups using Coroutines until the player died, when that happened, the player would notify the spawner that it died and the spawner would stop spawning gameObjects.

We learned about Coroutines and IEnumerators.

We learned about the safe use of while loops.

We learned how to parent objects dynamically in code into useful containers.

Finally, we learned some safe practices that prevent us breaking Unity when it comes to null objects.

Personally, I can’t wait to see what I’m going to learn next half of this course, I’ll be sure to share it with you here. Stay tuned!

--

--