Unity uNet [ClientRpc] to Update Color of an Object

I have been hard at work on my game Sentry Wars, a VR RTS for HTC Vive.

I struggled for several days trying to figure out how to update the Color of a Network.Spawned object, but I finally got it to work. The trick is that you have to call a ClientRpc from the Server, pass the color as a parameter, and have the color set as a [SyncVar]:

Screen Shot 2016-04-08 at 7.06.11 PM

In this case, SetMeshRendererColor is called from another script which checks isServer before calling it. GetBuildingColor in my case is just checking which player owns the building, and sets thisBuildingColor accordingly. Worked like magic. Thanks to Miller Tinkerhess and Zack Rock for helping me understand Client/Server relationships.

In other news, Mykolas and I are hard at work on our book about Pathologic, we have recently received advice from Gabe Durham of Boss Fight books regarding steps in completing a book of this sort. We are still gathering notes, reading up on additional resources, and coming to basic conclusions about how we want to approach Pathologic’s game design analysis. Mykolas found this gem: Pathologic Games as Art Manifesto which goes to show just how deliberate Ice Pick Lodge’s artistic intentions were when beginning the production of Pathologic – we definitely plan on citing this in the introduction to our book.

Book Recommendation: “Road Side Picnic” by the Strugatsky Brothers, for anyone who wants to know about an author who had a tremendous influence on Russian Film and Video Games, especially STALKER the film and STALKER Shadow of Chernobyl.

 

carPG-13: NPC Metrics

User Story: As a player, I want each NPC car to react to every action I take in its proximity.

In carPG-13, NPC cars react to how you behave when you are around them. If you get too close to a car who likes his space, he will get upset at you and back up. He will also angerCounter++ his metrics. If he hits his angerThreshold, say 3, he will getAngry(). In the video below, I show the programming of a Mechanic NPC’s getAngry() function which triggers a machine gun turret to start firing at the player. Check it out:

 

Book Recommendation: “Inner Work” by Robert Johnson for anyone who wants to learn how to incorporate their dreams into their spiritual life and conscious self.

My New YouTube #gamedev Series

I have just started a new youtube series where I stream myself programming various game projects. For the next few months, I will be streaming the development of a Drone Simulator and the development of carPG-13.

My intention with these videos is to interact with other game developers and also reflect on my own game development process. Here is my first video:

In this video I build the basic components of a Drone Simulator. My gamedev videos will be long because I will often have to refactor and debug due to the lack of time I have in planning these videos – I am doing them on top of a full time job at a start-up. However, I will be sharing the source code for Drone Simulator which will help compensate for the lack of concision in my streams.

Book Recommendation: “The Stranger” by Albert Camus, for anyone looking for an introduction to existential fiction.

 

 

Unity3D: Creative Design Process

I recently developed a standardized design process for my team at BrainRush because we had so much design work that it needed to start being distributed to members that were not previously ordained as “designers”.

Screen Shot 2016-01-12 at 2.37.13 PM
A screenshot from one of our recent corporate games.

If you do not create a Design Document before implementing a design, you will find yourself conceptualizing solutions to problems while working rather than just quickly implementing items off of an already solved list. Determining development solutions on the fly can lead to lulls in attention of “what to do next” and make for a slower development process. Of course, a Design Document does not need to be followed in extreme detail, but it certainly serves to expedite the process of implementation and keep a nice record of work progress.

At BrainRush, we follow the Design Document template below to complete a design task: a creative task that a developer must complete before implementing a substantial feature into a game. Design Documents do not work for everyone, but in order for teams to share responsibility, trust one another’s design sensibilities, and maintain transparency of intention, it is always best to have a preconceived set of solutions and tasks before programming, modeling, and developing a feature.

Design Document Requirements:

  1. Written List of Core Design Elements
    1. All of the core pieces of programming functionality required for a design to work from start to finish
    2. All of the art assets that will be required for the design to be visually complete from start to finish
    3. All of the audio assets that will be required for the design to be aurally engaging from start to finish
  2. Synopsis
    1. A paragraph about how all of the programming, art, and audio will work together in the completed state of the design.
    2. A paragraph about major challenges or unknowns that will need to be confronted during the design process
    3. A paragraph about the goals behind the design and what the user will ideally experience with the completed version of the design
  3. Technical Design / Drawings / Flow Charts
    1. A technical design for a strictly programmatic design can be
      1. A highly detailed pseudo code word documents that outlines the functions and variables of each class
      2. A flowchart or diagram for the flow of input data, classes and their relationship to one another, and changes of state that may occur in the application.
    2. A level design, UI design, or 3D Art Design can be
      1. A hand or computer drawn sketch organizing the visual elements with text description of each element
      2. A series of images that represent the different visual states in which a design may appear and how they transition between one another
    3. NOTE: Hand drawn/written documents are encouraged and are to be photographed and uploaded to the design document in addition to written text of sections 1 and 2
  4. Submit the document for manager/peer review

 

Book Recommendation: “Drawing on the Right Side of the Brain” by Betty Edwards for anyone looking to improve their drawing and perception skills. This book provides foundational insight into how to interpret images you want to draw such that you can break them down into elements and procedures rather than feel overwhelmed by their complexity.

-Pablo Leon-Luna