Tuesday, September 21, 2010

Windows Phone 7 Training Kit

Very quickly, go ahead and take a look at the Windows Phone 7 training kit. A few days ago I shared the article announcing the final dev tools, but now I'm pleased to share the training kit info. It will help you cover the basics and even build a small game for your phone. I have to jump on that myself, but meanwhile, I hope you get the tools and the material so you can cover the basics. There are several links to Channel9 training videos and a very comprehensive list of useful information.


Wednesday, September 15, 2010

Unity3D Engine Safe on Apple’s new iOS 4.0

Great news….no wait, amazing news I just got form the Unity3D CEO David Helgason. Apple has lifted their restrictions surrounding development tools, which I believe is the right choice. As Helgason says, after all you could create and build really crappy apps with just xCode, and I truly believe that you can actually create incredible apps with Unity3D.
I have been working with Unity3D engine for about six months now, on a very fast and intense learning process to the point that I’m actually able to apply my interactive application development knowledge to Unity3D game development, which basically means reusable code, structured and easy to read and maintain scripts, loosely-couple game states and modules and most of all, the most fun I have had coding.
Apple, you made my day !!!!

One OS to rule them all

I’m enjoying my independence holyday here in Costa Rica, but I wanted to share this quick article about Parallels running now even on the iPad. I find it very amazing and many Windows users will be super excited about the possibility to run Windows on the iPad. In my case, this will give me tools for creating windows touch enabled applications  that can run on the iPad/iPhone. Obviously if you are a Mac user you won’t be interested, you will be probably even crying already, but for the rest, this is great news. Check it out

Sunday, September 12, 2010

Recommended Unity3D Learning Path

Here’s a quick guide on my recommended Unity3D learning path. The idea is to guide people willing to learn how to create, develop and deploy Unity3D games.

  1. First Things First: Learning the Unity3D Basics.
  2. Unity3D Engine: Show me some videos.
  3. Game Development: Step by step tutorials.
  4. Networking: What is Unity3D Networking about.

If you take your time and complete the tutorials linked about you will have all the basic knowledge you need to start creating games in Unity3D.

In my opinion, the Uni3D engine is one of the most easy to learn, intuitive and robust tool I have had the pleasure to work with in my 7+ years of experience in the software development industry.

If you are hungry for more, make sure to check the following resources:

  1. Unity3D User Manual
  2. Unity3D Reference Manual
  3. Unity3D Scripting Reference
  4. Unity3D Resources and Example Projects
  5. Unity3D Wiki
  6. M2H Examples and Tutorials

And make sure to get involved in the Unity3D Engine Community:

  1. Unity3D Answers
  2. Unity3D Forums

Hope this helps you to get started and have fun with game development.


Thursday, September 9, 2010

Rotating your Character in Unity3D

To keep up with my “starting simple Unity3D series”, I want to share a code snipped on how you can rotate your characters or objects by code in a Unity3D game or application.
This method is one of the most common things you will need to do, specially if you are programming your NPCs. The code is my own version of many approaches I have seen on the tutorials and forums, and I believe is quite standard. 
The reason I wanted to post it here is because I added a lot of comments and some official documentation. Hopefully if will help you to understand better the mechanics of movement in the 3D space, and as a plus is already in C#, which lacks some visibility in the tutorials and forum answers.

// Rotates the character (Y axis only) to face the given position 
void RotateTowards(Vector3 position)
    // Get the direction between the given 
    // position and the current character's position
    Vector3 direction = position - transform.position;
    // Get rid of the Y axis variations
    direction.y = 0.0f;
    // Check if the character's rotation is 
    // already facing the given position. Include a little damping.
    if (direction.magnitude < 0.1f)
    // If not, it means we have to rotate the character 
    // over its Y axis to face the given position
    // To rotate our character, we need to use a smooth transition
    // between the current rotation and the target rotation

    // Use Quaternion.Slerp() to smoothly rotate the character.
    // Transform.rotation: The rotation of the transform 
    // in world space stored as a Quaternion.
    // Quaternion: Quaternions are used to represent rotations.
    // Quaternion: They are compact, don't suffer from gimbal 
    // lock and can easily be interpolated. 
    // Quaternion: Unity internally uses Quaternions to 
    // represent all rotations.
    // Quaternion.Slerp: Interpolates rotation between 
    // the rotations of from and to.
    // Quaternion.Slerp: Choose from and to not to be the 
    // same as the object you attach this script to.
    // Quaternion.LookRotation: Creates a rotation that 
    // looks along forward with the the head upwards along upwards
    // Quaternion.LookRotation: Logs an error if the forward 
    // direction is zero
    // Also we will use the character's rotation speed 
    // to ratate the character smoothly over time
    // We multiply the rotation speed by the Time.deltaTime 
    // to make the rotation by seconds, and not by frames
    transform.rotation = Quaternion.Slerp(transform.rotation,
            rotateSpeed * Time.deltaTime);
    // Now we need to get rid of the rotations on the X
    // and Z axis, because the character should only be able
    // to rotate over its Y axis. To do this we need to modify 
    // the transform's Euler Angles

    // Transform.eulerAngles: The rotation as Euler angles in 
    // degrees.
    // Transform.eulerAngles: The x, y, and z angles 
    // represent a rotation z degrees around the z axis, 
    // Transform.eulerAngles: x degrees around the x axis, 
    // and y degrees around the y axis (in that order).
    // Transform.eulerAngles: Only use this variable to read 
    // and set the angles to absolute values. 
    // Transform.eulerAngles: Don't increment them, 
    // as it will fail when the angle exceeds 360 degrees. 
    // Transform.eulerAngles: Use Transform.Rotate instead
    transform.eulerAngles = new Vector3(0, 
                                    transform.eulerAngles.y, 0); 

Wednesday, September 8, 2010

Simple Prototype: HTML to/from Unity3D


Today I made a quick prototype about how you can make Unity3D communicate back and forth with a web page. I based the prototype on the Unity3D documentation about the topic.

I’ll do another post with the details of the implementation and the modifications I did on the C# code to follow some best practices and naming conventions that hopefully will help you to avoid confusion and lack of maintainability in the long term.
For now, you can check the prototype here.

- arbbot

Sunday, September 5, 2010

Music in My Tech World


Very quickly, I wanted to start combining all my activities which I share with my software professional career.

Along with software and game development, I have been always involved in art activities, from writing poetry and short tales, to miniature painting and music.

One of my current art projects is my music band, which is called “Tercer Mono” (Third Monkey in English). I’m the co-founder and bass player of this instrumental band. We play a mix of funky groovy bases with alternative rock riffs. Check out our band bio, videos, songs and events at:

YouTube Channel
Facebook Page
MySpace Page
Reverb Nation Profile


Windows Phone 7 Jumpstart

Just wanted to share this very useful post from Mike Ormond’s with links to several Windows Phone 7 Jumpstart Training articles. Make sure to check them out !!!


What I have been doing?

It has been five months since I started to learn Game Development with the Unity3D engine at MysteryD. I had previously played a little with Microsoft’s XNA Framework to create Zune HD and XBox Live simple games and also experimented with translations to iPhone using the open source XNA Touch framework + Mono develop, but Unity3D is definitely a major step into the game development and interaction industry.
Now, creating a game is a huge deal. It does not only involve a lot of high end coding, including a lot of advanced math calculations and artificial intelligence behaviors, but also includes user experience, user interface, design, 3D modeling, music composition, sound effects, visual illusions, distribution, analytics and probably a hundred more things. All these factors make the experience a lot richer than just building an e-commerce site or a messaging desktop application.
However the amount of work and dedication has been keeping me a little away from my digital social life (facebook, twitter, blogger, etc) but I’m trying my best to keep the blog active and my social network sites a little alive. I’ll try to start posting Unity3D prototypes and demos here, or where I can, and also combine interactive application development (which has been the focus for this blog) and gaming development topics in the same source. I should maybe even start mixing my music and arts topics and news in this very same blog, at least I think it will make it more fun.
So, that being said, let me share a couple of interesting articles I found regarding web interactive development. Yes, you know what I’m talking about, Browsers + HTML5 + CSS3 and what are Silverlight and Flash saying about it.
First I found this interesting article from TechChurch talking about how the HTML5 standard can trigger a new browser war, where we could end up replicating the browser wars of the 90’s. Pretty much having one standard and several different implementations depending on the browser.
If you are a Silverlight developer or like to keep an eye on this technology, make sure to check out this article from Brad Becker, the Director of Product Management, Developer Platforms at Microsoft. The article is obviously a Microsoft’s point of view on their on product, but the article touches really good points and seems very objective in my opinion.
And last, just a tiny update from Engadget regarding the long waiting (at least for us, .NET developers) Windows Phone 7 mobile handset.
By the way, I’m more active now in the Unity3D communities (my username is “arbbot”), so if you want to get in touch there, or join the discussions check out these pages:  Unity3D Forums and Unity3D Answers