Tom Krcha's FlashRealtime

Hey amigo!
I am Tom Krcha, Gaming Evangelist at Adobe. These are my notes


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.
P2P Direct connections

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.
P2P Full Mesh

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!

Credits
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!

Adobe Video Day with Jason Levine

October 12th, 2010

cs5 production premiumNext week we are hosting Jason Levine (worldwide evangelist at Adobe) in Bratislava and Prague. If you are doing video and audio or streaming, this event is right for you! The event is going to be in English with simultaneous translation to Czech.

Register here (for free). Facebook event (only for reminder purposes).

Jason’s invitation to these events:

Move from Stratus to Adobe Cirrus

October 10th, 2010

Quick note: As you have probably already registered, we have renamed Adobe Stratus P2P rendezvous service to Adobe Cirrus.

You can read about details at Kevin’s Towes blog.

Basically, acquire new developer key here and use new address:

rtmfp://p2p.rtmfp.net/YOUR-DEVKEY/

What are Stratus and Cirrus? Cloud types:

(Source: Wikipedia.org)

The most simple P2P Object Replication Example

September 16th, 2010

Here you can download the simplest P2P Object Replication example, which is easy to understand. Previous examples might have been too complicated to start with. Grab this code and start using it right the way.

Download source
Try demo – open in two or more windows. Click “startProviding” button on one of them and “startReceiving” on the rest of the windows. You can then click “writeObject” to check the received object on the receiver windows.

Good Luck!

objrep-simple

Read the rest of this entry »

Flash Media Server 4 released at IBC

September 9th, 2010

Hello from Amsterdam! We have just launched the new version of Flash Media Server at IBC conference in three different versions: Streaming, Interactive and Enterprise. See comparison matrix (help me choose).

fms4_familypage_998x340

The features I am personally most excited about are:

- 64-bit support which brings tremendous streaming power!

- P2P/RTMFP support with server-side API, you get the same access to P2P network like Flash Player client, plus you can create a stable point from the server, very useful for distributed objects and databases. Next to that, you don’t need to use Adobe Stratus rendezvous-server and you can start building your own commercial P2P apps.

- Multicast support – stream multicast in H.264/on2 VP6 right from the Flash Media Live Encoder as well as control and manage multicast streams from the server. This also brings new possibilities to IP only multicast and multicast fusion (combination of application-level multicast and IP-only multicast).

- CentOS support

- Absolute timecode – to sync audio and video from different channels + combined with multibitrate streaming

- HTTP streaming – new delivery choice

and more…

Check Flash Media Server homepage for more details.

Read about other things we are launching at IBC.

Kevin Towes-launch fms4 - IBC 2010
Photo: Kevin Towes launching Flash Media Server 4 at IBC 2010