Realtime User-Generated Cross-Platform Multiplayer Gaming

Post on 22-Jun-2015

998 views 0 download

Tags:

description

MultiPlay.io is a realtime cross-platform gaming platform that allows you to edit the games as they are being played on mobile and web devices. We've been using MongoDB now since the inception of the project, where we quickly needed a data store to handle synchronization between our players entering and leaving a 3d chatroom with guns game. Since then we've gone on to add standard gaming features such as leader boards, real time game analytics, game replays and some not so standard features such as modifying the 3d assets and textures of the games as they're being played. In this talk, we'd like to share with you the tricks and techniques we've used to handle our ever changing datasets and assets store to scale across different versions of the game clients and platforms. Which will help you gain insight into building a cross-platform rapid prototyping environment of your own too.

Transcript of Realtime User-Generated Cross-Platform Multiplayer Gaming

Realtime User GeneratedMulti-Platform Multiplayer 3D Gaming

@multiplayio

[Warning: May contain LIVE DEMO]

#MongoDBdays

Hello

@multiplayio#MongoDBdays

• Going Multiplayer• Going Multi-Platform• Why use MongoDB?• How we use MongoDB?

@multiplayio#MongoDBdays

MongoDB

SocketIO

NodeJS

Web App

Common Multiplayer Web Stack

@multiplayio#MongoDBdays

• Server

• Client

@multiplayio#MongoDBdays

Maintaining State

MongoDBWeb App

Shot Fired

ServerApp

Game Events Collection

Save Event

• Saving game events for analytics

@multiplayio#MongoDBdays

Gameplay Demo

@multiplayio#MongoDBdays

http://multiplay.io/play/phonewars

HTML5

@multiplayio#MongoDBdays

Tizen

iOS

Android

Linux

MacWindows

Windows Phone

Blackberry

Firefox OS

Ubuntu

..but slow?

C++/GPU APIs

@multiplayio#MongoDBdays

Tizen

iOS

Android

Linux

MacWindows

Windows Phone

Blackberry

Firefox OS

Ubuntu

@multiplayio#MongoDBdays

SocketIO

NodeJSProxy Server

Web App

Cross-Platform Proxy Multiplayer Stack

MongoDB

Sockets

Java Server

Native App

JavaScript Networking

Logic

C++ Networking

Logic

@multiplayio#MongoDBdays

Cross-Platform Hybrid Multiplayer Stack

MongoDB

Sockets

NodeJS

Networking Logic

Web View

DOM/Canvas App

WebGLApp

Native AppApp

@multiplayio#MongoDBdays

Hackathon Challenge

• Mongoose • Jansson • Async

@multiplayio#MongoDBdays

• JavaScriptNetworking Logic to C++

• C++

Framework Layer Application LayerDevice Layer

@multiplayio#MongoDBdays

Supporting Native Platforms

Renderer

QtRenderer

iOSRenderer

Engine App

@multiplayio#MongoDBdays

Supporting Direct3D

@multiplayio#MongoDBdays

Editor Demo

@multiplayio#MongoDBdays

Editing Objects

Framework JavaScript AppDevice

@multiplayio#MongoDBdays

Supporting Hybrid Platforms

Renderer

QtRenderer

iOSRenderer

Engine

App

JavaScript Proxy

WebView

Proxy Renderer

..JIT?

@multiplayio#MongoDBdays

Renderer Proxy

• JavaScript

• C++

@multiplayio#MongoDBdays

Performance Issues

@multiplayio#MongoDBdays

Why MongoDB?

• Community• Get’s out of your way• Fun & Easy• 10gen Education• JSON/JavaScript• Sharding• Don’t fight it

@multiplayio#MongoDBdays

QUESTIONS?

@multiplayio#MongoDBdays

THANKS!

“Fast Delivery. Changed my life. Should present again. A+++++”

- iBot5

“I wanted to be a pop star before this, but now I just want to program JavaScript!”

- Zombie Justin B.