6/26/14 Update

Things I did today:

  • Got the cacti to move!  Instead of dragging a prefab into the Unity scene, I needed to drag only the mesh.  This is because the prefab came in marked static and couldn’t be moved.
  • Changed values so that cacti only show up in the garden, in front of the indicator and avatar
  • Changed values so that cacti show up underneath the garden, so they can grow up into it
  • Added an ArrayList called growingFlowers and a GrowFlowers() function in gardenGameScript.  Once the user completes a position, flowers are added to the growingFlowers list.  GrowFlowers() is called each Update(), and loops through the growingFlowers list.  If a flower has reached the height of the garden, it is removed from the list.  Otherwise, it grows a small amount.
  • Commented a lot.  Hopefully my code is intelligible now.
Advertisements

6/24/14 Update

Things I did today:

  • Downloaded a bunch of free plant prefabs and decided that the cacti would be best for testing
  • Created an empty FlowerHolder GameObject and attached 20 cacti (6 different models randomly duplicated and distributed)
  • Created some variables that I’ll need in order to move flowers, such as the garden X, Y, and Z min and max positions, the maximum number of flowers that can be moved, and arrays of flower X and Z positions (which will be used to make sure flowers don’t overlap)
  • Created the MoveFlowers(int numberOfFlowers) method.  This will be called from FlowerGained() and will be in charge of moving flowers to the garden.  The parameter is the number of flowers to move.
  • Had trouble getting cacti to move when the user completed a position.  As it stands, some piece of the cactus is moving (maybe its transform?), but you can’t see it if you don’t have the cactus selected before you run the scene.  Maybe this is because each cactus is a prefab?  Not sure yet.  Moving works perfectly if you use a simple cube.
  • Next time, I’ll try to fix this issue and maybe get some flowers, rather than cacti

6/19/14 Update

Things I did today:

  • Got Dana’s model to update with the user’s position!  It turned out that all I had to do was drag the Dana prefab onto the “Engaged Users” section of the Zig Engage Single User Script, which is attached to the Zigfu subobject of the PoseModelCamera gameObject.
  • Got gesture recognition to work!  I had to change the gestureRecognitionThreshold in TranslationLayer because I had scaled up the models.  Something to note: whenever you change the default value of a variable in code, make sure to change it in the Unity Inspector as well.  If you don’t, the inspector value may (or may not) override the value you’ve specified, which is extremely frustrating to debug.
  • Changed the gestureHoldLength in TranslationLayer so that the poses don’t go so quickly.  It might also make sense to have the physical therapist be able to set this for each posture in the future.
  • Moved the GUIText objects around on the screen so they are in the correct locations.  This involved changing their X and Y values in the inspector.  The screen goes from (0, 0) in the bottom left corner to (1, 1) in the top right.
  • Updated score to reflect the poses that the user has completed correctly.  These increases in score will eventually be flowers in the garden.
  • Added a textTimer in TranslationLayer that counts down in TickEvent().  This handles text that should only stay on the screen for a certain amount of time, such as “File loaded successfully” of “Successful gesture.”
  • Basically made everything work except for flowers.  That’ll be next.

6/17/14 Update

Things I did today:

  • Got the loading of a file to work (I’m generally using latest.xml)
  • Got Carl to animate through all the poses in the loaded file
  • Tried for a very long time to get Dana’s position to reflect that of the user (unsuccessful so far, but I’ll keep trying). I think it may have something to do with the TranslationLayer, or possibly the ButtonScript.

6/12/14 Update

Things I did today:

  • Created a new Unity scene within the scope of Toby’s project, which will allow me to use prefabs that he created
  • Created and textured a new terrain, which includes a stream, mountains, and a place for a garden
  • Added a sunny skybox and directional light to the scene
  • Set up the Carl and Dana models so they show up on the screen when the scene begins
  • Set up the main camera so that it is pointing at the garden area with Carl and Dana above
    Added main menu and ingame GUI text that is similar to Toby’s (but didn’t get all of it working)
  • Ported Toby’s BDGameScript to a new file, gardenGameScript, which works for my game

It doesn’t run yet, but it’s getting there.

Introduction

Hello!  This summer, I’ll be continuing a research project started by a few others at Ithaca College.  The idea is to allow a physical therapist to record postures that he or she wants a client to perform, then pass those off to the client, who uses a Microsoft Kinect to capture him- or herself performing those motions.  When the client gets a posture correct, the program moves on to the next posture.

In addition, the researchers have been creating a series of minigames to make the experience more interesting for the user.  My contribution to this set will be a game that plants flowers in a garden based on how well the user performs the postures.  More postures correct means more flowers, and a more beautiful garden.

I’ll be documenting everything I do on this blog, but you can also access my work in Lab 304 of Williams Hall at Ithaca College.  It’ll be on the computer on the wall farthest from the door, on the rmb1952 account (ask Sharon for the password), in this location: Desktop/Unity_Research_Game/Assets/ZigFu/SampleScenes/Garden.unity.  You can find Toby March’s game in the same location, but with the filename BoulderDash.unity.

If you have any questions, you can contact me at rmb1952@rit.edu.