Contents:
Unity Game Development Essentials

I was asked if I would give a book a look over – and given the topic, I couldn’t refuse. Unity Game Development Essentials, by Will Goldstone was released by Packt Publishing – and can be found just about anywhere. It has a cover price of $49.99 - you can get a slight deal if you grab it from here, but I would check amazon for pricing as they often drop quickly there.
Overview
The book is geared for those with essentially no Unity3D experience – but might be useful to some who are starting out and would like to learn a little bit more about some of the tools that are available. Don’t worry if you have no 3D experience, the book will walk you through the very basics – and honestly, not much programming experience is needed, as even the most basic concepts are covered in sections that use scripting – a good choice as many designer/developers find interest in such a user friendly product as Unity3D. Obviously, to make the most of the engine, you will want to beef up on those skills.
Unity Game Development Essentials (UGDE) covers a fairly broad number of topics, starting with basic 3D concepts and the Unity Editor. It moves into topics such as terrain, basic physics, and interacting with 3D elements in your world. Next, particles, audio, and GUI are covered, giving a pretty broad brush stroke of what is available in Unity3D. Each set of topics is divided into a small demo scenes, which can also be downloaded via a link found in the front of the book, and can be useful for following along with. You will quickly learn how components are used in Unity, and how you can script basic scenarios, which could be useful in the context of a larger game.
The book itself is nicely organized, and will look good on your bookshelf (for those that care about that kind of thing). It has a plethora of pictures and included (via download) project files that help you get on your way. Each section is dedicated to a specific topic, so it is easy to jump around to something that more specifically interests you, say, if you already know how to use an FPSWalker. It is a short book, as it only touches the basics of most of the features – coming in at about 280 pages (with relatively large font) – but I wouldn’t consider that a deterrent as the content is sound.
Pros
UGDE is a great book for those who are picking up Unity3D for the first time or coming from more of a design background. It provides clear, concise explanations of many of the topics you probably want to know when developing your own game. It walks you through the editor nicely, showing how the different panels and controls are used. Unity can be a bit of a tricky paradigm to figure out, especially if you come from a more OO world and aren’t use to the scripting nature of the engine. UGDE provides some clever projects for you to develop, however, and by the end of the book you should have a pretty good understanding of what you can do with Unity3D. My personal favorite chapter is the chapter dealing with interaction in your world. UGDE shows two approaches to opening doors with triggers/colliders, as well as an introduction into some basic animation. Ray colliders, for bullets, are covered, and even some animation control is sprinkled in. But there are some other fun worlds, where you can light your campfire, and throw coconuts at targets.
Cons
The only real shortcoming of the book is that I wish there was more! Unity3D is a very expansive engine, so while it is impossible to cover everything, there are a few things I wish were talked about a bit more. Shaders, for instance, are not discussed in any shape or form, despite being a very common 3D game element. A chapter on simple shader development (or even the included shaders), and a look at how they are used in Unity would be a very nice addition. Another area I felt could have used more pages was performance. Performance is a huge issue with game development, and there are many tips and tricks that would be nice for someone getting into Unity to know about. It would also have been nice if there was at least a small section dedicated to iPhone specific projects, and the asset server – but those might be more niche than was intended for this printing.
Overall
Despite not going into as much depth as I might like, if you are brand new to Unity3D, or 3d game programming in general – I would highly recommend this book. With a nice broad range of topics and a very easy-to-understand flow, I think it could really help someone starting out. If you have been using Unity for a while, and are hoping for some nice gems to help with your development, this probably isn’t the book for you. That said, I feel Will did a great job for artists and designers – who are the real target audience.
I haven’t covered hardly anything about Unity on my blog – but plan on it pretty soon – as it is something I have been working VERY extensively with lately. If you are interested in learning more – I would seriously consider picking up this book, then hopefully I can start picking up where it leaves off.
Happy coding!
Star Wars: Trench Run Released!

Infrared5 has released its biggest game to date! Hitting the AppStore today was Star Wars: Trench Run! If you haven’t heard about it, it is our newest release, put out by THQ, which sits you behind the wheel (?) of an XWing fighter as you make your run on the Death Star trench.
The game rocks, and I’m not just saying that because we made it. Imagine this: 3D flying action, controlled by tilt. Dogfighting over the death star surface with Yavin 4 coming into sight. For the whiley TIEs, you can slow down time with the force, giving you precise aiming to blow him out of space. Next, imagine heading to the trench, dodging cannon fire and catwalks, evading Darth, and eventually, taking your shot at the exhause port.
Phew.
To top it all off, there is an arcade mode which lets you dogfight or dodge obstacles in progressively harder levels – throw in a leaderboard and the fun never stops.
Okay, thats enough of a plug from me. Just go and get the game. It is fully licensed, so you get to experience all of the sights and sounds of the TRUE Stars Wars universe.
Get it HERE!
Papervision 3.0 GIT it now!

If you haven’t read the post over at the Papervision3D blog, you should head over and read it. We are really cranking on Papervision 3.0 – the new version for Flash Player 10. I think we have a great start, and best of all, it is on github so you can watch/contribute to the process! Head over to http://github.com/Papervision3D/Papervision3D where you can download the project in its current state, or git it so you can start participating.
This is my first time using git, and I must say that it has been very challenging to get started in. Thinking from a SVN standpoint was a big roadblock for me in truly understanding how (g)it works. Now that I am starting to really grasp how it works, as well as the commands to make it happen, I must say that I really like GIT! Managing code, especially between multiple branches is incredibly easy to do.
Anyways – enough about git – hopefully my blog will start to generate a few more posts now that the engine is picking up steam – but don’t hold me too it!
The Real Reason John Grden Hates Ewoks

Just in case you were wondering…
The Hunt For Gollum Released!

One film to rule them all!
Not really – but it is pretty cool. The Hunt For Gollum was released 2 days ago – it is a 40 minute film produced entirely by fans of the Lord of the Rings (who didn’t want to wait for the Hobbit release). I’m not a huge fan of the 3 movies that are already out – about 22 hours into the saga I was about ready to end my life (especially after the 32 fade outs at the end of the third). BUT, I thought this was cool given that the entire thing was done for under 3000.
The story follows Aragon’s creepy look-a-like as he hunts for Gollum who knows the location of the ring. It has pretty cheesy dialog / acting / audio – but they did a decent job on alot of the CG and make up. The characters are eerily reminisent of the actual characters in the movie – but all have a somewhat “herion addicted” look to them.
Anyways – worth a looksie if you are a fan of the trilogy.
Check it out here
Go to Flash on Tap FOR FREE!

No, I’m not kidding! Tickets have been donated by an anonymous benefactor for those who have recently lost their job. If you go and sign up know, you can get your ticket to Flash on Tap absolutely free. You can read more about this awesome offer here. There are a limited number of tickets, so be sure to go sign up now if you are interested! It is a great way to network and make some connections and skills that will help you out in the future.
Also, if you are still on the fence about attending Flash on Tap – you really don’t want to miss this one! Between the awesome workshops, comradory, and presentations, PLUS an awesome venue, this is a must-attend event. John and I are finishing up our workshop on Papervision3D – which will be covering everything from the bare basics to alot of the tips and tricks even seasoned users of the engine don’t know about – layers, shaders, tricks to avoid doing math, and more! There are some other great workshops on red5, animation, and even getting into iphone development. Check them all out here!
Hope to see you there!
Flash On Tap May 28th-30th

Flash on Tap is approaching! If you haven’t signed up yet – head on over to http://www.flashontap.com and register now for great pricing! If you aren’t familier with Flash on Tap – its a conference being held in Boston that is a combination of a beer and Flash. If you are interested in taking some workshops – check out the 1st day of the conference – featuring a good choice of all day workshops that should be very informative, and mostly a lot of fun. I am doing a conference with John Grden that day on the basics of Papervision3D. We will be covering everything from the basics of the coordinate system to increasing your FPS with layers. If you have ever wanted to get a good ground-up walk-through – this would be the time to get it!
There are going to be some awesome speakers – great company – beer if you like it - and me! I’ll also be presenting on Papervision3D – though I haven’t narrowed down my exact topic – I’m thinking something along the lines of extending Papervision – showing the basics of some of the cool things that have been done with the Papervision engine, including JigLib and Flar – along with some cool things you can do with the built in classes. If anyone has a better class idea – or if there is somethings specific you would really like me to cover – let me know!
Anyways – sign up now – it is going to be a lot of fun!
TextArea Images in AIR

Haven’t seen them? Apparently its because they don’t exist. According to this bug report it was a known issue but not corrected before the last version of AIR was released. I spent a good amount of time wondering what I was doing wrong before a friend did a search in the bugs list for me – and voila!
So, my first question: does anyone know a work-around for this issue? The comments recommend using the HTML component, but unfortunately I need a lot of the interactivity that the TextArea offers that the HTML component doesn’t have. If anyone has an idea let me know.
If anyone of you aren’t sure where to find bugs for the Flash player, you can find them at bugs.adobe.com. I use to never check the bugs list, as most of the problems are ran into when I was just getting into flash was user error – but now it seems that I probably need to spend more time at the bugs list before wasting hours of time late at night trying to figure out why my img tags disappeared.
Anyways – if anyone has an idea – shoot me an email or a comment! I’ll be your friend!
JigLib Bust a Cap In Papervision3D

I made my first JigLib Demo! Check it out.
If you don't know what JigLib is yet, you are really missing out. Its a great project I'm proud to be the on the team of. It is a 3D physics engine (currently only for Papervision3D, but has been ported to Sandy/Away). It is a port from the JigLib engine done in C. For more information on the project, check out the blog.
I don't really want to give a bottoms up rundown on how jiglib works, so I'm just going to point out a few things that will help you pull off effects like you see in this demo - both from the jiglib point of view, but also from a general pv3d and programming angle.
The Environment
This environment is actually very simple. I have a bitmap for the floor, a lamp model, and a bitmap for the cubes. I dynamically tint the cube materials to give it a little more depth and variety. One thing you will notice is that each cube, and each side of each cube, gets its own material. If you are wondering why, I did this to allow for the bullet holes to be drawn directly onto the material. I use a movie material so that it is easy to just add a bitmap into with a specific blend mode, and then forget it.
The environment for JigLib is very similar. Each cube is simply a "skin" for a class that represents a cube in JigLib. This class is called "JBox". You can think of a JBox as simply the "form" of a cube - it has position and rotation, which are transfered to the object that it is skinning. This it the general way that JigLib works. There are unique JigLib objects which use DisplayObject3D's in Papervision as a skin. All transforms done to the JigLib physics object is then reflected on the DisplayObject3D. JigLib has physics objects for Planes, Cubes (Box) and Spheres. It also includes logic to generate a car with wheels, using a special wheel class and an extension of the JBox class.
So, each cube is controlled by a JBox - and the floor is a JPlane for them to bounce on. There were some hit detection problems I was having with the plane, so I also added a JCube underneath the plane to give extra "floor" for the objects to run into. This is a hack fix, but it seems to help. Something else you can play with to help collision is the timing used by the physics engine. A lower speed will mean that things will move slower, and detect more collisions more accurately.
The Gun Shot
The gun shot is made up of a couple different parts. The gun itself actually "shoots" where it is looking - which is always 2000 in front of the barrel. The only time this is changed is when a hit is detected on a cube. When the mouse clicks on a cube, the target is changed to the exact coordinates of the hit.
The Hit
The actual hit is determined by the mouse click. Take a look at the following code:
Actionscript:
-
var hitPoint : Number3D = new Number3D(event.renderHitData.x, event.renderHitData.y, event.renderHitData.z);
-
-
var force:Number3D = new Number3D(hitPoint.x-camera.x, hitPoint.y-camera.y, hitPoint.z-camera.z);
-
force.normalize();
-
force.multiplyEq(6280);
-
var rb:RigidBody = skins[event.displayObject3D];
-
rb.AddWorldForce(new JNumber3D(force.x, force.y, force.z), new JNumber3D(hitPoint.x, hitPoint.y, hitPoint.z));
hitPoint records where the mouse was clicked in world space. Remember, this is only called when a cube is clicked. We then get the difference between that point and the camera, to get our "force" vector. To make it a constant strength, we simply normalize it (make it a length of 1), then multiply it by the force we want. We get our RigidBody from the dictionary I store the references in. Then, we use the function "AddWorldForce" - which takes two JNumber3Ds - the force vector, and the world hit point. This function will add the force to the object from world space - which saves us having to convert things into local coordinates.
The Bullet Trail
The bullet trail is a seperate class called LineOut. I called it LineOut since it fades itself out every frame. Once its invisible, it removes itself from the scene. To get the start and end points of the Line between the gun, I pass in two objects - the target that is positioned at the hit point, and the the muzzle flash that is positioned over the gun barrel. Before we can use the muzzle flash position, however, we need to update its world coordinates:
startPoint.world.calculateMultiply((startPoint.parent as DisplayObject3D).world, startPoint.transform);
Once the world matrix is updated with the current transform, we can use the world matrix to define the start point of the line. I use a segmented line because it looks better - but feel free to play with how many vertices are actually used.
The Bullet Hole
Since we used a seperate bitmap for each side of the cubes, we can alter them individually. This has more memory overhead, but I think it more than makes up for it by having bullet holes. The bullet hole position is determined, again, by the renderHitData that is passed when a cube is clicked. The U and V properties of the renderHitData tell us the "x" and "y" coordinates of the click on the material. Once we have that, we can simply add a bullet hole bitmap to our movie, and position it correctly: