Continuous Learner #5

Discovering Windows Phone 7 #3 – Displaying a 3D Model with XNA

image Following the example on msdn (http://msdn.microsoft.com/en-us/library/bb197293.aspx) I created a Phone Application with XNA that display a rotating 3D ship.

This took me about 10 seconds, and it was pretty easy to do, but what about creating my own 3D model? Looks like XNA support just Autodesk FBX as 3D model (let me know if I’m wrong), and the simplest tool I know to design 3D objects, Google SketchUp (http://sketchup.google.com/) does not support it. I binged on google and googled on bing, but I could not find a free software to convert COLLADA .dae files (the only format you can export to using the free SketchUp) to Autodesk .fbx.

There should be a free FBX Converter tool (http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&id=6839916) but I could not find the correct link to download it.

In the end, I installed Google SketchUp Pro 7 Beta, created my model and converted into a nice and supported fbx file.

You can download the project from here (http://cid-a117aa5e007a0648.skydrive.live.com/self.aspx/Windows%20Mobile%207%20Examples/WindowsPhone3DGame.rar) and see a screenshot of SketchUp and my phone app below.

image

Discovering Windows Phone 7 #2 – The AccelerometerSensor

Microsoft.Devices.Sensors.Sensor.AccelerometerSensor implement is a physic device that measure force applied on the 3 axes of your device over time.

image

As explained here http://live.visitmix.com/MIX10/Sessions/CL16, if the device is sitting on the desk with the screen upside, the force will be –1 gravity on Z, if it’s sitting in portrait orientation the force will be –1G on Y, if it’s sitting in Landscape mode the force will be –1 on X.

Unfortunately the Emulator does not support yet the AccelerometerSensor, and unfortunately we do not have a Windows Phone yet.

Thanks to Pete Blois and his Labyrinth Sample for Windows Phone (http://blois.us/blog/2010/03/labyrinth-sample-for-windows-phone.html) there’s a simple way to test your app and use your mouse to apply G forces on X and Z.
He created a clever AccelerometerProxy that use the mouse movement to generate fake forces that you can use on your app.

The proxy also include a cleverer AccelerometerEventArgs that replace the original AccelerometerReadingAsyncEventArgs. With the original one, to get the X and Y forces you had to type e.Value.Value.X, while on the AccelerometerEventArgs you can simply use e.X and e.Z.

Here (http://cid-a117aa5e007a0648.skydrive.live.com/self.aspx/Windows%20Mobile%207%20Examples/WindowsPhoneAccelerometerApplication.zip) you can download my working example of the “One Button” example demoed in the CL16 session using the fake accelerometer.

To test it, click the button, then click somewhere else on the emulator screen and drag the mouse.

Discovering Windows Phone 7 #1

I’m starting to learn about XAN 4 for Windows Mobile 7, and going through all the examples from the MIX10.
The example I’m showing tonight comes from Shawn Hargreaves Blog (http://blogs.msdn.com/shawnhar/archive/2007/06/08/displaying-the-framerate.aspx) and It’s an example of how to create a Frame Rate counter component. I heard about this on this on the session CL19 (DEVELOPMENT AND DEBUGGING TOOLS FOR BUILDING XNA GAMES FOR WINDOWS PHONE – http://live.visitmix.com/MIX10/Sessions/CL19).

At first I had some problems with this specific line of code:

_font = Game.Content.Load<SpriteFont>(“Arial”);

The runtime was throwing a File Not Found exception.
I was initially adding the Arial.spritefont manually to the WindowsPhoneGame project, but digging the XNA Forums (http://forums.xna.com/forums/) I figured out that that resource needed to be added to the WindowsPhoneGameContent project instead of the Game project.

In the end, here it’s my FPS counter

image

Continuous Learner #4

Continuous Learner #3

AppFabric
http://microsoftpdc.com/Sessions/FT26
http://msdn.microsoft.com/en-gb/windowsserver/ee695849.aspx

Highscalability
HOW MYSPACE TESTED THEIR LIVE SITE WITH 1 MILLION CONCURRENT USERS: http://highscalability.com/blog/2010/3/4/how-myspace-tested-their-live-site-with-1-million-concurrent.html
Scaling Out Facebook: http://www.facebook.com/note.php?note_id=23844338919&id=9445547199&index=0
Understanding the Real-Time Web for Web Developers: http://www.25hoursaday.com/weblog/2010/02/15/UnderstandingTheRealTimeWebForWebDevelopers.aspx
http://www.infoq.com/presentations/The-State-and-Future-of-JavaScript
http://www.infoq.com/presentations/From-Concept-to-Product-Backlog
http://adamyan.blogspot.com/2010/02/aspnet-mvc-2-localization-complete.html
http://blogs.msdn.com/devkeydet/archive/2010/02/09/screencast-managing-browser-history-using-client-script-without-scriptmanager.aspx

Android
Motorola Droid vs Nexus One: Multitouch Test: http://www.youtube.com/watch?v=qzhUzq6bTPg
Android Developer: http://developer.android.com/index.html

Flash vs HTML5
http://techcrunch.com/2010/02/10/hulu-ipad/
http://techcrunch.com/2010/02/05/the-future-of-web-content-html5-flash-mobile-apps/

Hack and Spy
http://cryptome.org/
http://www.youtube.com/my_speed

Cool stuff
Microsoft Pivot: http://channel9.msdn.com/posts/LarryLarsen/The-Tech-Behind-The-Hard-Rock-Cafe/
Mousepaths: http://blog.iso50.com/2010/02/15/mousepaths-hiroyuki-hamada/

F#
LAgent: an agent framework in: http://code.msdn.microsoft.com/LAgent

Ted Talks
Bill Gates on energy: Innovating to zero!: http://www.ted.com/talks/bill_gates.html
James Cameron: Before Avatar … a curious boy: http://www.ted.com/talks/james_cameron_before_avatar_a_curious_boy.html
Blaise Aguera y Arcas demos augmented-reality maps: http://www.ted.com/talks/blaise_aguera.html

Events
Agenda for Microsoft Architect Insight Conference 2010: http://msdn.microsoft.com/en-gb/architecture/ee959262.aspx
TechDays: http://www.microsoft.com/uk/techdays/