Paper Boy Progress Report #1

This week marks a big change to the project started last weekend, see the previous post for more details on where we left off. Short recap, last week I got a bicycle to move forward across a blank plane. Along with this I created a goal for the user to throw an object into an orb, which triggered the goal to be moved.

Additions This Week

  • Added house meshes
  • Added road meshes
  • Added spawning system for roads and houses
  • Goals now
    • Fade in and out to better indicate as a goal
    • Go transparent when struck
    • Have different colors for different point counts
      • Red – 3 points
      • Yellow – 2 points
      • Green – 1 point

Lessons Learned

Building on this mechanic I learned a couple lessons about Unity’s execution flow and how things are spawned into the world.

  1. If there is an error in the console, don’t assume the things you see on screen are unrelated
    • I had errors in the console, but assumed the execution was only halted for part of game setup. Because of these assumptions I spent a lot of time debugging my logic when the problem was the script had halted at the location of the error preventing the logic I was debugging from ever being executed.
  2. Meshes and Renderers are tricky, don’t assume their coordinates or their bounding box coordinates are what you expect.
    • I wanted to spawn houses based on the left and right sides of the house on the X axis, I assumed I could get these positions by cycling through each meshes renderer and getting the left most x boundary. This turned out to be way difficult because coordinates are with respect to some origin, I still don’t fully understand why I couldn’t get this to work
    • I ended up using empty’s as children to the parent empty to mark left and right positions of the object.

Demo

There are clearly still some mesh and collision box issues but I am very happy with the progression here.

Next weekend I would like to add some sound to the game and do a better job of hiding the empty void surrounding the player with fog or something. Along, with this I would like to add a feature to have all of the goals for a house to be disabled when one of them is disabled from a hit.

Thank you for reading! See you next week!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.