wpug - 3d multiplayer from ios and android to wp8

Post on 14-Jan-2015

946 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Presented at Windows Phone User Group in London (22/04/2013). Video: https://vimeo.com/64767100 More info: http://multiplay.io

TRANSCRIPT

iOS vs Android vs Windows PhoneWindows Phone User Group Edition

@multiplayio#wpdev

Phone Wars

In a galaxy far far Away.…

@multiplayio#wpdev

Hello

@multiplayio

• Architecture Overview• Gameplay Demo• Getting Started• C# and C++• Direct3D and OpenGL• Controls• File Access• Profiling• Publishing• Bonus Demo• Q&A

#wpdev

@multiplayio

3D Multiplayer Multi-Platform Games Engine

#wpdev

Framework Layer

Engine

App Layer Platform Layer

@multiplayio

Supporting Multiple Platforms

Renderer API

App

#wpdev

Controls API

File API

Scenes

Objects

Java C++

@multiplayio

Android onTouch

#wpdev

onTouch onTouch

Framework Layer

Controls API

Objective C C++

@multiplayio

iOS onTouch

#wpdev

onTouch onTouch

Framework Layer

Controls API

Framework Layer Device Layer

@multiplayio

Opening a File on iOS

#wpdev

OpenFile OpenFile

C++

fopen

App

Objective C

Get iOS User Folder

fread

fclose

@multiplayio#MongoDBdays

Cross-Platform Hybrid Multiplayer Stack

MongoDB

Sockets

NodeJS

Networking Logic

Web View

DOM/Canvas App

WebGLApp

Native AppApp

Gameplay Demo

@multiplayio

http://multiplay.io/play/phonewars

#wpdev

Getting Started

@multiplayio#wpdev

• Folder structure• Debug Configurations• .vcproj files

• <IncludePath>• Bundling assets

• packager.bat

Getting Started

@multiplayio#wpdev

Getting Started

@multiplayio#wpdev

Getting Started

@multiplayio#wpdev

Just include all source files and you’re done

@multiplayio#wpdev

Search Paths (Sorry)

@multiplayio#wpdev

Bundle a folder

@multiplayio#wpdev

Bundle a folder

@multiplayio#wpdev

C# and C++

@multiplayio#wpdev

• XAML required for good OS integration• Use DispatchTimer to stay in the same thread• Messaging C++ and back• Scary ^ % symbols• Converting from WinRT types and back

Messaging C++

@multiplayio#wpdev

Messaging C++

@multiplayio#wpdev

Messaging C++

@multiplayio#wpdev

Messaging C#

@multiplayio#wpdev

• You can’t officially• Workaround have C# poll C++

Framework Layer

Engine

App Layer Platform Layer

@multiplayio

Direct3D for OpenGL

Renderer API

App

#wpdev

Controls API

File API

Scenes

Objects

Renderer

Renderer

D3DRenderer

OGLRenderer

@multiplayio

Supporting Direct3D

#wpdev

SetBlend GLEnable(GL_BLEND)

Direct3D

OpenGL

OMSetBlendState

SetBlend GLEnable(GL_BLEND) glEnable(GL_BLEND)

@multiplayio

Supporting Direct3D

#wpdev

@multiplayio

Supporting Direct3D

#wpdev

Supporting Direct3D

@multiplayio#wpdev

• Beware of Draw Calls• Transpose matrices• No runtime shader compiler• Open source alternative - ProjectAngle• Minimal changes to support Windows 8• No out of the box JPG PNG support

• Use libPNG and libJPEG• Cocus2D Open Source Example

Direct3DInterop Platform Layer

@multiplayio

Controls

#wpdev

OnPointerPressed touchBegin

Framework Layer

Controls API

Controls

@multiplayio#wpdev

Controls

@multiplayio#wpdev

Controls

@multiplayio#wpdev

File Access

@multiplayio#wpdev

• Marble Maze• BasicReaderWriter.cpp

Framework Layer Device Layer

@multiplayio

Opening a File on iOS

#wpdev

OpenFile OpenFile

C++

fopen

App

Objective C

Get iOS User Folder

fread

fclose

File Path

@multiplayio#wpdev

Read Data

@multiplayio#wpdev

Read Data

@multiplayio#wpdev

Platform::Array<byte>

@multiplayio#wpdev

Profiling

@multiplayio#wpdev

• Memory not supported for D3D Apps• Do it manually

• On device profiling tricky

Profiling

@multiplayio#wpdev

• Memory not supported for D3D Apps• Do it manually

• On device profiling tricky

Publishing

@multiplayio#wpdev

• Change only on fail• ARM• Debug on Native for screenshots• PEGI - https://wp-rating.pegi.eu/Games/Submit

• Markets• In-App Purchasing• WMAppManifest.xml

@multiplayio

Editor Demo

#wpdev

@multiplayio

QUESTIONS?

#wpdev

@multiplayio

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.

#wpdev

top related