Lam Cao's Blog

A Journey in Game Dev


Month: January 2019

Safe Zone – our game made at Global Jam 2019


I and my 2 other friends decided to participate in the Global Game Jam this year. And here is our game – Safe Zone.

The title explains what home means to us. After dealing with all the ‘bad things’ out there, we just want to go home because it’s the only place we truly feel safe and comfortable. Unfortunately, we just can’t stay at home forever; we got to get out and work (find something to eat) to survive. And that’s the background of our game.

Here is the time line.

  • Friday night: we simply discussed and came up with a good pitch, then set up a project repo. We returned home at 10 everyone went to sleep. Unlike many other teams who instantly started working on their project, we decided to jsut chill and not to stress it.
  • Saturday: We worked remotely for the first half of the day, and in person for the other half. The collaboration went pretty well (no merge conflicts!). We managed to get all the mechanics done and had the first playable version 0.1 by 6 pm. We mostly hung out with other teams for the rest of the day and each went home by 11 pm.
  • Sunday: We met up and continued to improve the game. We animated characters, added music, reworked the map, implemented a new AI. At 5 pm we demo-ed with the 4th build – version 0.4.

This is the first game for 2 of our friends and the second 3D game for me (my side projects I’ve worked on so far are all 2D). We scoped the project quite well this time, which allowed us to finish without having too much stress. Personally, I was also able to explore some Unity’s features I had never used before such as Character Controller, Cinemachine’s extensions and Navigation. They are amazing. We easily won the “Game using AI” prize.

Considering that each of us still had 6-8 hours to sleep each day I think I will call it a success!

[Unity Tips] Did you know that you can have multiple inspectors at the same time?

I often have to switch to the debug view of the inspector to check out backing fields and other hidden stuff. I find it very helpful to just have both views at the same time.

  • Click on the tiny hamburger button on the top right corner.
  • Choose “Add Tabs”
  • Choose “Inspector”
  • Repeat as many times as you like.

How to use Lerp right.

Lerp, or linear interpolation, is a super useful function we all love. However, I often see devs use it in some weird way. I feel like they never bothered to read the documentation. Well, these devs probably didn’t. Here is an example of how not to use Lerp right.

transform.position = Vector3.Lerp(transform.position, endPoint, Time.deltaTime * speed);

I have seen it in random online tutorials, on Unity Answers and StackOverflow. If you know how it works, then you know the code example above makes no sense! Let’s discuss why.