MAX Racer Remote Device Controller in AIR for Android
November 25th, 2010
Quick heads-up my friends. When we first demoed MAX Racer, we have previewed initial support for USB Steering Wheel, etc. This support is a sneak peek feature in Flash Player, not available right now.
This really needs you have one of these devices at home. So we were thinking about more lightweight way of controlling the game and device or mobile phone is ideal for this.
I’ve built a little app in Flex Mobile “Hero” for AIR for Android, that controls the game by sending accelerometer, speed info, brake and so on using local P2P connection over WIFI.
Check the video how it works:
Read the rest of this entry »
P2P Gaming Libs from my MAX 2010 session
November 24th, 2010
Update 3/18/2011: Source-code is available here: https://github.com/tomkrcha/RealtimeGameLib
Update 11/28/2010: Library now accepts variable group name, so you can create more instances. Download updated library below. Example: var game:P2PGame = new P2PGame(serverAddress,groupName);
Lot of you guys are asking for libs I’ve used in my Adobe MAX 2010 session Building P2P Multiplayer Games.
It’s still work in progress, but you can basically grab SWC libraries here with example.
I don’t want to publish source now as it needs several changes, refactor, comments, etc. But source-code should be available soon
This library has been used for MAX Racer without no change. So it’s kickass tested stuff! But not completely finished and documented yet. So this is the disclaimer, I do not provide any guarantees.
If you want to start playing with it, go ahead. Comments are highly welcome!
This engines creates a full mesh network via DIRECT_CONNECTIONS NetStreams among all connected users. Thanks to that, you get lowest latency possible and it’s highly suitable for realtime gaming.
Android Dev: Resolving Empty List Of Devices Attached via USB Debugging on Windows
November 16th, 2010
This is useful tip for Android developers on Windows, especially if you are AIR for Android developer and use Flash Builder or Flash Professional and want to debug and test your apps on mobile phone via USB. On Mac I didn’t have any problem, I just plugged device via USB and it has started working. On Windows it’s a little more tricky. It’s missing driver problem.
First, you install Android SDK.
And when you connect your Android device via USB – it can happen that you see empty list of devices by calling: adb devices command available in android-sdk/tools folder.
Building P2P Multiplayer Games at Adobe MAX 2010
November 12th, 2010
The recording of my session from Adobe MAX 2010, where I briefly explain some tips and tricks I’ve learned during MAX Racer development.
Link to session recording (better view, with navigation)
Available on Adobe TV as well:
Slides (PDF) available for download here.
Libraries and other sources will follow.
3D video in Flash Player (like in a cinema)
November 8th, 2010
I think this is one of the news, which got a little bit lost in all the MAX news.
Next to awesome StageVideo, which can run 1080p video ~0% CPU on Windows desktop PC and 8-10% CPU on new MacBook Air, which can display even 4K video, we had a demo preview at the Adobe Booth, where you could watch a real 3D movie running in a preview of possible future Flash Player.

Well, as you can see it’s hard to take a picture of 3D video, I guess, you just need to believe me, but pssst, it’s reeeally stunning! ![]()
Read the rest of this entry »
Resolving “NetGroup.Connect.Rejected” or when your Flash P2P apps stop working
November 2nd, 2010
I just ran into a problem with NetGroup.Connect.Rejected, my FMS4 server was running ok – I have even tried Cirrus/Stratus and I was still getting this error on demos, which were properly working before.
OK – so what is this error about?
It’s all about your Flash Player security and it’s basically telling you that you have denied access to some source. This happens, when you start developing apps on different PC and someone before you denied to use P2P or similar.
Solution:
1. Go to Global Settings

2. delete all or specific P2P settings in Global Settings

3. run your application again (it should be in browser, had sometimes problems with standalone apps, where dialog didn’t appear)
this dialog should appear. Click Allow and better Remember.

Don’t forget that these settings are inherited to all versions of Flash Player you have on your PC, even to betas or prereleases.
Good Luck!
Call a mobile phone from Flash. SIP calls using Flash Media Gateway
October 27th, 2010
Great times are coming my friends. Flash Media Gateway is a server from Adobe, which enables you to do VoIP calls from your Flash Player.
What it means?
You can basically call mobile phones or telephone over internet or even way back.
Now, isn’t that amazing? And it supports a video calling as well!

The way it works is that Flash Player connects to Flash Media Server, which connects to Flash Media Gateway, which connects to SIP network and then call ends up in a classic telephone.
Say hooray!
And check Adobe Labs page for more info:
http://labs.adobe.com/technologies/flashmedia_gateway/
Flash gets GPU-accelerated 3D! MAX Racer with P2P multiplayer
October 26th, 2010
The revolution is here and the world is never be the same!
Last couple months were just exciting like never before. We’ve been working with guys from Alternativa Platform and Mythos Labs on 3D racing demo with realtime multiplayer over P2P. The game is set to Los Angeles, where popular developers’ conference Adobe MAX takes place right now.
The game uses the new set of GPU-accelerated 3D APIs – currently codenamed Molehill (see Adobe Labs page). You will be able to get your hands on this API in the first half of 2011.
Multiplayer demo – controlling with three computers
MAX Racer Teaser by Alternativa
Check this video to see how it looks like, when playing with friends all over the world:
Implementing the P2P multiplayer
My role in this game was to implement realtime multiplayer over P2P API, which I have to say works just fluently. We have tried playing the game through internet over 2000 km (from Prague in Czech Republic to Perm in Russia) and I had the feeling like we were sitting next room and playing over LAN.
P2P = Getting the best latency possible
Direct connections in P2P is the best possible method to keep your latency as lowest as possible. With direct connections, you can be sure, that the data packets will be delivered, so the transmission is fully reliable. (Note: this is not the case of Posting, Directed Routing and Multicast, where it’s best effort delivery)
When we talk about the programming logic, you basically setup one outgoing stream and 2,3 or 5 (depends on the number of players) incoming streams.

Then you get something, what we call Full Mesh. This P2P architecture makes sure, that all data between the players is delivered in the smallest time possible.

We also ran into couple challenges in multiplayer, it’s not enough to transfer only direction changes (like forward, back, left, right), you also have to transfer a real position to sync on position. This will still make it a little bit choppy, because of massive use of physics and rendering speed. So the solution was to implementing interpolations, which is similar to smoothing. If you are at the Adobe MAX, make sure you drop on my session on Tuesday – Building P2P Multiplayer Games. I will also write more article in the future on how to solve this.
Hooking up Game Controllers
Yes, yes, yes, yes! We are working on adding the support of game controllers in Flash Player in the future. I hooked-up MAX Racer with a steering wheel USB controller and I have to say, it was pretty easy to do. I am pretty sure, you will love it and I can’t wait to see more Facebook realtime games with controllers online.
More info MAX Racer
If you want to check more info about the MAX Racer, watch this video by Thibault Imbert (PM for Flash Player).
Game Screenshots
Look at that details. Yeah, and we are rendering this in 60fps running 1920×1080.

Art was done by Mythos Labs. Kudos for the great job guys!
I just wanted to give a credit to Todd Wahoske and team from Mythos Labs for these great graphics and to Alternativa Platform guys – Vladimir Babushkin, Mikhail Fominykh, Anton Volkov and Alex Karpovich.
Finally I have to say that it was a great pleasure to work with guys on this game!
Flash on!







