Wednesday, January 26, 2011

Demo Day

Each semester, USC hosts a Demo Day where Computer Science Games students present their game projects to professionals in the industry. In December 2010, I presented The Bridge on behalf of my team. The media coverage has just been released, which you can check out here:

http://viterbi.usc.edu/news/news/2010/gamepipe-lab-hosts.htm



The picture of me in the article is nothing short of ridiculous. :P

Monday, January 24, 2011

Microsoft Word Makes Me Sad


I have a love/hate relationship with Microsoft Word. I trust it to get my work done securely and professionally, but my day-to-day experience with the product is often plain frustrating.

Take for example, this outline I began putting together in Microsoft Word 2008 for Mac


I have pasted a URL, and want to make it a hyperlink. How can I do that?



Ah yes, there it is, in this huge menu. Let's select the Hyperlink option.



Whoa, a huge popup with tons of information I don't want to read. Let's press ok and see if it works...



It looks like the URL became a hyperlink, but it also screwed up my bullet point formatting.

:(
 

Monday, December 13, 2010

Vector Math

I ran into a fun  problem while working on The Bridge today:



In my process of refactoring the ship engine, I added a rotational thruster to turn the ship. When the player issues a Turn Clockwise command, the Navigator AI will apply the rotational thruster to the ship until it reaches the desired velocity.

Here are the properties I worked with:
  • A target yaw, pitch, and roll to rotate to, in terms of angular velocity
  • Current angular velocity of the ship
  • Angular acceleration of the ship's engines

Each of these I represented as a Vector3 in XNA
  • Vector3 targetAngularVelocity;
  • Vector3 currentAngularVelocity;
  • ship.engines.angularThrust

I figured that the most logical way to approach this was to adjust angularThrust every frame in an Update loop. The challenge was figuring out what acceleration was appropriate, when only given currentAngularVelocity and targetAngularVelocity.

My first attempt involved finding a midpoint vector with a simple LERP:
ship.engines.angularThrust = Vector3.Lerp(currentAngularVelocity, targetAngularVelocity, strength) * time;
This works when going from not rotating at all, to rotating in some direction. However, it fails miserably if the ship is already moving in some capacity. I ended up spinning the player's ship phenomenally fast.



Clearly, a midpoint isn't good enough, I need something a bit more relative.

Thankfully, a simple Vector Math trick works nicely:
ship.engines.angularThrust = (targetAngularVelocity - currentAngularVelocity) * strength * time;
Subtracting targetAngularVelocity from currentAngularVelocity will give me a new Vector that points from currentAngularVelocity  to targetAngularVelocity . Then all I need to do is shrink the strength of the vector down to a reasonable acceleration, and I'm done.


And thanks to the miracles of Vector Math, this will work in any direction, under any circumstance. 


Sunday, November 07, 2010

Typical Day

I have a daily habit of scanning through kotaku.com and gizmodo.com. As I read through article headlines, I open the articles in new tabs for later reading. Here's a sample of what that looks like:


I find it a good way to keep up to speed with current trends in the game and gadget industries, and also find lots of cool pictures.

Sometimes I will watch a video as I read through web articles. Generally I'll watch at a TED conference or two since I find them pretty enriching. The window resizing features in Windows 7 are particularly useful here:



Have a favorite news website to procrastinate on? Leave a comment below.

Wednesday, October 27, 2010

The Bridge

This semester, I am the Technical Lead of a super-cool Science Fiction game called The Bridge.


In the game, you command starship entirely with voice control.

Here are some of the innovate things the game has going for it:

  • Speech Recognition as a seamless part of gameplay
    • The player can say things like:
      • "Weapons, fire missiles at enemy ship alpha"
      • "Navigator, engage defense orbit"
  • Dynamic Story Engine
    • Every actor in the game is an Entity
    • Entities have Relationships with other Entities
    • Relationships evolve throughout gameplay
    • Result: fully procedural storytelling
  • Emotional Voice Recognition
    • The player's tone is interpreted by the game
    • This affects crew loyalty towards the player



Of course, that's only the beginning.



For more information, check out the game's website:
commandthebridge.com



- Greg

Friday, September 17, 2010

Flash Sound Tutorial

I made a tutorial for using Sound Objects in Flash.





The tutorial covers a few tricks I use, including:
  • Object Dictionaries
  • Creating Asset Instances in the Flash IDE
  • Importing Sound Assets
  • Creating Sound Objects in ActionScript
  • Using Sound Objects
    • Play, Stop, and Change Volume
You can download the tutorial here:

The tutorial includes a Complete copy of the code, and a Skeleton copy for you to practice writing yourself. You will need Flash CS4 or later.



Surprisingly, creating a robust Sound Engine only requires about 60 lines of code.

Hope it's useful,
- Greg