Friday, October 29, 2010

WP7 Development Tips Super Article

I have been away from .NET development for a few months since I started to develop games with the Unity3D engine. However I try to keep up to date by reading articles and implementing small prototypes once in a while.
PDC 2010 started today and surfing the web for comments, articles and online webcasts I found this article with great development tips for the Windows Phone 7. The tips are focused on performance for Silverlight apps running on the phone and this is one of the most complete and detailed articles I have come across.
Make sure to check it out and use it. I love the first part describing how being flexible regarding design patters is a must for performance optimization. We (software architects) tend to over engineer applications just to adder to design patterns and sometimes we sacrifice performance just to keep the pattern architecture, when in reality performance will be much more appreciated by your users.
Cheers!
-arbbot

Wednesday, October 27, 2010

Retrieving Facebook Profile Picture as an HTML Texture in Unity3D

HTMLTexture

Lately I have been reading a lot of posts and information about Facebook + Unity3D integration and I wanted to share my thoughts and a little sample to help the community bit.
I think that this topic gets more confusing because there are different types of Facebook integration depending on what you want to achieve. Here's my take on different Facebook integration approaches:
Web Basic Integration
This is basically just embedding your hosted Unity3D web player into a Facebook canvas. This type of integration is the most simple of all because is basically just embedding your Unity3D web player into a Facebook page so people can play it right there. For this you will need to have your Unity3D web player already hosted and running somewhere with public access. The steps are super simple:
1- Go to Facebook Developers
2- Setup a new application
3- Fill the Canvas Page text field with your desired app name
4- Fill the Canvas URL text field with the URL of your unity web player
Once you do that, you are done and you app will be already running in Facebook.

Desktop Basic Integration
With desktop applications it gets more tricky because Facebook OAuth 2.0 protocol forces you to redirect the user to Facebook to allow access to your application, and then you need to get the response and request the authentication content. This process is more advanced and the experience is kind of broken since the user has to leave the unity app to grant access using the Browser.
Alternatively you can do just a basic integration, which is retrieving public Facebook information based on the Facebook username. For this you don't need to implement the authentication since you just need to call the Facebook public API services and render the results. This is not actually a real integration, but it will enable you to retrieve and render some basic Facebook information in your unity app without a lot of work.
This is the actual integration sample I have created. It is a very simple application with only one script that requests the user for the Facebook username, and then uses it to retrieve the user's profile picture and render it as a Texture on a GameObject.
This is just the basic stuff to get you started, but is well documented and very simple so it should help you get started. You can get the sample here.
Facebook Advanced Integration - Web and Desktop
This is the real thing. For web players it will be easier and the experience will be better cause the user will be already using a browser, and you can use JavaScript functions in the web player HTML (check the Unity docs) page to get manage the authentication of the app easily and pass the required information back to unity without issues. There are several third party solutions and I can recommend DimeRocker which is the platform we have been using for Mystery Invaders.
If you are deploying your application using the Web Player, you need to basically use JavaScript and the Unity WWW class to authenticate and then connect to the Facebook Graph API to get and post the information you need.
For desktop application the difference will reside on the Authentication process, which you will need to bridge between a web page and the desktop application. I'll be working on samples about this topic and hopefully posting something back to the community to help others get on track.
Happy Facebook integration!
-arbbot

Tuesday, October 12, 2010

“Mystery Invaders” Unity3D Game

MysteryInvaders

I wanted to share some big news around my latest work.

“Mystery Invaders” is a space invaders like game, but with a camera angle/perspective twist that makes it much more interesting and fun to play. It has a solid game play, high polished 3D models, a wide arrange of power ups and weapons to fight your enemies and really cool movement and particle effects. The game was produced by MysteryD which is the company I work for at the moment. You can also check MysteryD´s Facebook page.

This is my first official and public game where I performed as Game Designer along with a very talented and very good friend Adrian Poveda, who did all the Art Direction and most of the design work. I was also responsible for the Game Direction and I did 100% of the coding in combination with the levels design, particle effects, lighting and pretty much everything that is not a 3D model or a design asset.
The game was implemented using the Unity3D engine and coded 100% in C# using best practices and naming conventions that I applies from my interactive application development experience.

We are currently using DimeRocker as the social platform, which makes Facebook deployment very transparent, relieving us from the web integration and crazy constant Facebook API changes maintenance.
This is not my first game at all, I have been working with Unity3D engine for the past six months and we have some other games and demos under development, and prior to that I was already prototyping simple games with XNA, Silverlight, XNA Touch and iPhone. Nevertheless, this is the first official and public release that shows my work in the game development industry.

I invite you all to play the game and leave your feedback. The great thing about having the game on Facebook is that social feedback is a lot faster and more helpful, so go ahead and “stop the invasion” !!!

Cheers!

Saturday, October 2, 2010

Unity 3 has been released

Unity3
 

A few days ago Unity 3 was finally released. The new version comes with powerful new features including audio enhancements, assets visual management, great new particle systems specially for water effects, the awesome Beast light mapping, lens effects and volumetric lighting and source level debugging tools.
I have been playing with pre-release versions of Unity 3, but I’m glad that is finally out with all the web player deployment features in place. Unity is one of the most powerful, robust and user friendly game engines and I can see the great future of the tool, the company and its team.
Congratulations to Unity3D for the new version !!!

Cheers!