20150220

Unity3D - Swirl Demo

I'm working on a demo video, where I want to show how the lack of co-routine makes the web freeze up the game.  To do that, I just needed something smoothly moving around.

The code gives room for variation, to allow different angles, and the cubes use trail renderer.
using UnityEngine;
using System.Collections;

public class Orbit : MonoBehaviour {

 public GameObject Target;
 public Vector3 direction = Vector3.left;
 public float Speed = 0.1f;
 public bool Randomize = false;
 public float RandomizeMin = -0.5f;
 public float RandomizeMax = 0.5f;
 public float MaxDistance = 5;
 public float MinDistance = 1;
 
 void Update () {
  this.transform.LookAt(Target.transform);
  var shift = Vector3.zero;
  if (Randomize)
  {
   shift = new Vector3(Random.Range (RandomizeMin, RandomizeMax),
        Random.Range (RandomizeMin, RandomizeMax) * Time.deltaTime,
        Random.Range (RandomizeMin, RandomizeMax));
  }
  this.transform.Translate ((shift + direction) * Speed * Time.deltaTime);
  if (Vector3.Distance(Target.transform.position, transform.position) > MaxDistance)
  {
   Debug.Log ("To Far");
   this.transform.position = this.Target.transform.position + Vector3.ClampMagnitude(
    this.transform.position - this.Target.transform.position,
    this.MaxDistance);
  }
  if (Vector3.Distance(Target.transform.position, transform.position) < MinDistance)
  {
   Debug.Log ("To Close");
   this.transform.position = this.Target.transform.position + Vector3.ClampMagnitude(
    (this.transform.position - this.Target.transform.position) * 100,
    this.MinDistance);
  }
 }
}

20150208

Humming Bird AI


Hummingbird is an AI I've been working on that learns how to fly a ship on its own.  Starting with the engines, which try to determine a force to keep themselves afloat.  (at a particular altitude) Then it uses a stabilizer to manage the ship over all.  Then the stabilizer will reduce and strengthen the engines at various positions to tilt and move the ship to target locations.

Additionally, I felt inspired by http://BoxCar2D.com, which creates cars from random geometric shapes and attempts to drive them through random terrains.  Its travelling is simply based on spinning wheels that allow the vehicle to progress on a terrain.  A difference between our AI's, is that Box Car looks at the creation of the the vehicle, while Hummingbird looks at the control of the vehicle.  Here is an example of BoxCar2d:


I found Box Car almost mesmerizing, as you watch it randomly construct vehicles and try to get farther and farther with them.  I intend Hummingbird to also have this mesmerizing feel.  So far, its ship generation has been getting there, but it needs work still.

I've been working on raising community interest by running a kickstarter.  Keep in mind that this is still being shaped.  There are some basic pieces, but the end goal is not complete yet.  The kick starter has been 100% funded as of yet, and completes in 2 days from this posting.

https://www.kickstarter.com/projects/1667690760/creating-a-3d-flying-version-of-boxcar2d/



At present, one of the difficulties I'm facing is aligning the parts of the ships, so my next test scenes will be focused on improving the ship construction dynamics, so the ships are less of blobs, and begin taking on more meaningful shapes.


20141223

Unity AI Programming Essentials

This book shows how to quickly apply a variety of existing AI technologies for Unity, some free, some not, so you can make your games smarter from day 1.

But on a personal note:

I'm officially published!  This second book I've authored, (technically the third, my first was a novel that I never released) my first programming book on XNA is available freely online, and has not been professionally edited, but this one is published by Packt Publishing.

There were complications during the creation process, and I can only take claim for a few of the chapters.  The chapters I wrote were dealing with multiple pre-existing AI's, and while talking with some of the developers of them, I was pleased at how receptive they were to recommendations.  That however, created the issue that the code base would keep changing.  Keeping updated in the code was a real night mare.

But kudos to the AI developers for constantly improving and moving forward.  And kudos to Curtis Bennett, for grabbing the remnants of the book when I no longer had the time to work on it and finishing it.  I can't wait to read what he put into it.  :D

Published via Packt Publishing here:
https://www.packtpub.com/game-development/unity-ai-programming-essentials

Also available for purchase from Amazon:
http://www.amazon.com/Unity-Programming-Essentials-Curtis-Bennett/dp/1783553553

20141027

Website is Down!

LearnBuildPlay.com has gone down: (temporarily)
 - Emails still work
 - Working on a replacement posting, to be up in the next day or two.

Details:
My apologies, I just received an email from my (X) VM provider, SOMEE.com.  They had a hardware malfunction that completely destroyed all my data.  they say a RAID controller (at the hardware level) broke down, effectively destroying all data on all the Hard Drives under it.  However, I find this difficult to believe considering that a couple hours before that, they sent out an email claiming they were upgrading some software.  (not hardware)  It sounds more like they messed up on the software and accidentally did a complete re-install rather than an upgrade, or some other configuration mistake that wiped the original data.  It could also be exactly what they claim, but I no longer trust them.

Actions Taken:
I have cancelled my service with them.


Action Items:
1) Test a replacement site and post it to azure.
2) Repoint DNS and services to new IP.
ETA 2-3 days.