Realtime User-Generated Cross-Platform Multiplayer Gaming

23
Realtime User Generated Multi-Platform Multiplayer 3D Gaming @ multiplayio [Warning: May contain LIVE DEMO] # MongoDBdays

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

Page 1: Realtime User-Generated Cross-Platform Multiplayer Gaming

Realtime User GeneratedMulti-Platform Multiplayer 3D Gaming

@multiplayio

[Warning: May contain LIVE DEMO]

#MongoDBdays

Page 2: Realtime User-Generated Cross-Platform Multiplayer Gaming

Hello

@multiplayio#MongoDBdays

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

Page 3: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

MongoDB

SocketIO

NodeJS

Web App

Common Multiplayer Web Stack

Page 4: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

• Server

• Client

Page 5: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

Maintaining State

MongoDBWeb App

Shot Fired

ServerApp

Game Events Collection

Save Event

• Saving game events for analytics

Page 6: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

Page 7: Realtime User-Generated Cross-Platform Multiplayer Gaming

Gameplay Demo

@multiplayio#MongoDBdays

http://multiplay.io/play/phonewars

Page 8: Realtime User-Generated Cross-Platform Multiplayer Gaming

HTML5

@multiplayio#MongoDBdays

Tizen

iOS

Android

Linux

MacWindows

Windows Phone

Blackberry

Firefox OS

Ubuntu

..but slow?

Page 9: Realtime User-Generated Cross-Platform Multiplayer Gaming

C++/GPU APIs

@multiplayio#MongoDBdays

Tizen

iOS

Android

Linux

MacWindows

Windows Phone

Blackberry

Firefox OS

Ubuntu

Page 10: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

SocketIO

NodeJSProxy Server

Web App

Cross-Platform Proxy Multiplayer Stack

MongoDB

Sockets

Java Server

Native App

JavaScript Networking

Logic

C++ Networking

Logic

Page 11: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

Cross-Platform Hybrid Multiplayer Stack

MongoDB

Sockets

NodeJS

Networking Logic

Web View

DOM/Canvas App

WebGLApp

Native AppApp

Page 12: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

Hackathon Challenge

• Mongoose • Jansson • Async

Page 13: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

• JavaScriptNetworking Logic to C++

• C++

Page 14: Realtime User-Generated Cross-Platform Multiplayer Gaming

Framework Layer Application LayerDevice Layer

@multiplayio#MongoDBdays

Supporting Native Platforms

Renderer

QtRenderer

iOSRenderer

Engine App

Page 15: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

Supporting Direct3D

Page 16: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

Editor Demo

Page 17: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

Editing Objects

Page 18: Realtime User-Generated Cross-Platform Multiplayer Gaming

Framework JavaScript AppDevice

@multiplayio#MongoDBdays

Supporting Hybrid Platforms

Renderer

QtRenderer

iOSRenderer

Engine

App

JavaScript Proxy

WebView

Proxy Renderer

..JIT?

Page 19: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

Renderer Proxy

• JavaScript

• C++

Page 20: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

Performance Issues

Page 21: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

Why MongoDB?

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

Page 22: Realtime User-Generated Cross-Platform Multiplayer Gaming

@multiplayio#MongoDBdays

QUESTIONS?

Page 23: Realtime User-Generated Cross-Platform Multiplayer Gaming

@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.