Creating a browser ready fps mmo in unity ppt-mew_final

48
Creating a Browser-ready FPS MMO in Unity

description

Creating a browser-ready first-person shooter MMO in Unity presents massive gaming opportunity but also a set of unique client-server challenges. Join the developers from Aquiris Game Experience and Electrotank as they discuss the hands-on lessons they learned in creating an upcoming free-to-play FPS MMO for PC/Mac and the browser.

Transcript of Creating a browser ready fps mmo in unity ppt-mew_final

Page 1: Creating a browser ready fps mmo in unity ppt-mew_final

Creating a Browser-ready FPS MMO in Unity

Page 2: Creating a browser ready fps mmo in unity ppt-mew_final

7 09/29/11

Networking Options

• Built in• Smart Fox• Photon• Electroserver 5

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 3: Creating a browser ready fps mmo in unity ppt-mew_final

8 09/29/11

Built in Solution

• Pros• Easy control over the network• Network views watching objects• Simple RPC implementation• Is already in Unity• We had previous experience with the system

• Cons• Unity only server• Runs only on Windows and Mac• Not made for thousands of players per instance• Good for local hosted games, not for 2k+ players in a single server

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 4: Creating a browser ready fps mmo in unity ppt-mew_final

Built in networking is not an option

Page 5: Creating a browser ready fps mmo in unity ppt-mew_final

10 09/29/11

What we chose?

• ElectroServer 5• Tech Support• Proven with previous Flash games• Great admin tools• Runs under linux

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 6: Creating a browser ready fps mmo in unity ppt-mew_final

11 09/29/11

Artwork Challenges

• Complex Structure• Lightweight Graphics• Small Packages

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 7: Creating a browser ready fps mmo in unity ppt-mew_final

12 09/29/11

Large Spaces vs Unique Artwork

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 8: Creating a browser ready fps mmo in unity ppt-mew_final

13 09/29/11

Basemesh

• Max 50k triangles• Max 30 objects• Max 3k triangles per object

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 9: Creating a browser ready fps mmo in unity ppt-mew_final

14 09/29/11

Tileable ~ 50% Coverage

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 10: Creating a browser ready fps mmo in unity ppt-mew_final

15 09/29/11

Trims ~ 25% Coverage

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 11: Creating a browser ready fps mmo in unity ppt-mew_final

16 09/29/11

Unique ~ 25% Coverage

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 12: Creating a browser ready fps mmo in unity ppt-mew_final

17 09/29/11

Graphics Tweaking

• From Geforce 6 series, to all cards.• Saving Presets• Auto Benchmark

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 13: Creating a browser ready fps mmo in unity ppt-mew_final

18 09/29/11

Technical Overview

• Asset pipeline• Game design flow• User data• Networking• Publisher integration

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 14: Creating a browser ready fps mmo in unity ppt-mew_final

19 09/29/11

Asset Pipeline

• Automatic import tools• Build tools• Memory control• Loading and unloading assets on the

fly

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 15: Creating a browser ready fps mmo in unity ppt-mew_final

20 09/29/11

Automatic import tools

• Tons of items/weapons• Textures• Animations• Custom data

• Manual setup is bug prone• Asset pre and post processing

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 16: Creating a browser ready fps mmo in unity ppt-mew_final

21 09/29/11 Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Manually Manually placedplaced

Generated Generated by Systemby System

Page 17: Creating a browser ready fps mmo in unity ppt-mew_final

22 09/29/11

Build Tools

• Asset bundles• Build time• Editor tools

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 18: Creating a browser ready fps mmo in unity ppt-mew_final

23 09/29/11 Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 19: Creating a browser ready fps mmo in unity ppt-mew_final

24 09/29/11

Memory Control

• Loading assets• Know what you’re not using• Unload unneeded stuff• Asset bundles for maps may use up to 200

MB of Ram!

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 20: Creating a browser ready fps mmo in unity ppt-mew_final

25 09/29/11

GAME LOGICGAME LOGIC ITEM CONTROLLERITEM CONTROLLER

REQUEST ASSETREQUEST ASSET START LOADINGSTART LOADING

WWWWWWCACHECACHE

COMPLETE/COMPLETE/ERRORERROR

ASSETASSET

REQUEST REQUEST UNLOADUNLOAD

AssetBundle.Unload(AssetBundle.Unload())

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 21: Creating a browser ready fps mmo in unity ppt-mew_final

26 09/29/11

Game Design Flow

• Weapons and Items configuration• Gameplay configuration• Level setup• Exchanging data with the server

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 22: Creating a browser ready fps mmo in unity ppt-mew_final

27 09/29/11 Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 23: Creating a browser ready fps mmo in unity ppt-mew_final

28 09/29/11 Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 24: Creating a browser ready fps mmo in unity ppt-mew_final

29 09/29/11 Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 25: Creating a browser ready fps mmo in unity ppt-mew_final

30 09/29/11

User Data

• Accounts• Avatars• Loadouts• Loadout Items

• Statistics

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 26: Creating a browser ready fps mmo in unity ppt-mew_final

31 09/29/11

AccountAccount

AvatarAvatar LoadoutsLoadouts

LoadoutLoadoutItemsItems

GameGameItemsItemsClassesClasses

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 27: Creating a browser ready fps mmo in unity ppt-mew_final

32 09/29/11

Networking Overview

• Architecture• Topology• Lobby and match system• Event driven development• How to exchange data between client

and server?

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 28: Creating a browser ready fps mmo in unity ppt-mew_final

33 09/29/11

Networking Architecture

• Client - server• Semi authoritative server• 100+ matches per server instance• From 8 to 16 players per match• Tons of messages• Lightweight server solution

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 29: Creating a browser ready fps mmo in unity ppt-mew_final

34 09/29/11

Networking Topology

Acount ServerAcount Server Game NodeGame Node

Game NodeGame Node

Game NodeGame Node

ClientClient

ClientClient

ClientClient

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 30: Creating a browser ready fps mmo in unity ppt-mew_final

09/29/11

Lobby and match system

• Channels (zones)• Rooms• User distribution• Data optimization

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 31: Creating a browser ready fps mmo in unity ppt-mew_final

36 09/29/11

Client Development

• Event driven• Transparent network layer• Data exchange• ESObjects

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 32: Creating a browser ready fps mmo in unity ppt-mew_final

37 09/29/11

Publisher integration

• Aeria’s systems• Accounts• Webmall

Aquiris Game Studio | Amilton Diesel, Maurício Longoni, Raphael Baldi

Page 33: Creating a browser ready fps mmo in unity ppt-mew_final

38 09/29/11

Distributed Simulation

EUPEUP ES5 NodeES5 Node

ES5 NodeES5 Node

ES5 NodeES5 Node

ClientClient

ClientClient

ClientClient

Electrotank | Jonathan Wagner

Page 34: Creating a browser ready fps mmo in unity ppt-mew_final

39 09/29/11

Distributed Simulation II

• Distribute load across multiple servers

• Burstable capacity in cloud deployment.

Electrotank | Jonathan Wagner

Page 35: Creating a browser ready fps mmo in unity ppt-mew_final

40 09/29/11

ES5 NodeES5 Node EUPEUP

Start() Stop()Start() Stop() NodeServiceNodeService

MatchmakingMatchmaking

MatchMatch

LoadoutLoadout

Player ProfilePlayer Profile

ScoreScore

Electrotank | Jonathan Wagner

Page 36: Creating a browser ready fps mmo in unity ppt-mew_final

41 09/29/11

Avoiding Tedious Paperwork

Electrotank | Jonathan Wagner

Page 37: Creating a browser ready fps mmo in unity ppt-mew_final

42 09/29/11

Avoiding Tedious Paperwork II

• Continuous integration.• Automated Deployment.• Eliminate code when you can. • Democratize content creation.

Electrotank | Jonathan Wagner

Page 38: Creating a browser ready fps mmo in unity ppt-mew_final

43 09/29/11

Continuous Integration

• Find code problems more quickly.• Reduce “works on my machine”

problems.

Electrotank | Jonathan Wagner

Page 39: Creating a browser ready fps mmo in unity ppt-mew_final

44 09/29/11

Automated Deployment

• CI can drive automated deployment.• Forces you to have reliable

build/deploy methods.• Do it now. Once you have real players

it just becomes more difficult.

Electrotank | Jonathan Wagner

Page 40: Creating a browser ready fps mmo in unity ppt-mew_final

45 09/29/11

Code Is The Enemy• Please don’t hurt me.

Electrotank | Jonathan Wagner

Page 41: Creating a browser ready fps mmo in unity ppt-mew_final

46 09/29/11

ProtogenMessage DefinitionMessage Definition

MagicMagic

ClientClientMessage/Parser/Message/Parser/

FormatterFormatter

ServerServerMessage/Parser/Message/Parser/

FormatterFormatter

Electrotank | Jonathan Wagner

Page 42: Creating a browser ready fps mmo in unity ppt-mew_final

47 09/29/11

Protocol Generation II

• Protocol efficiency improvements can be made globally with low cost.

• Developers get strongly typed messages.• Model complex data with little effort.• Support clients across many languages /

platforms.

Electrotank | Jonathan Wagner

Page 43: Creating a browser ready fps mmo in unity ppt-mew_final

48 09/29/11

Data Is The Enemy• I lied earlier about code being the enemy.

Electrotank | Jonathan Wagner

Page 44: Creating a browser ready fps mmo in unity ppt-mew_final

49 09/29/11

Dealing with Data: Tools

• Tool dev can easily absorb 30% of dev time.

• “Tools will make or break an MMO.”

Electrotank | Jonathan Wagner

Page 45: Creating a browser ready fps mmo in unity ppt-mew_final

50 09/29/11

Not so democratized

Electrotank | Jonathan Wagner

Page 46: Creating a browser ready fps mmo in unity ppt-mew_final

51 09/29/11 Electrotank | Jonathan Wagner

Better!

Page 47: Creating a browser ready fps mmo in unity ppt-mew_final

52 09/29/11

Let tools do their own thinking

• Give your entities metadata.• Give the metadata to the tools.• General purpose data entry tools can write

themselves.• Spend time on specialized operations tools.• Very low risk of SkyNet.

Electrotank | Jonathan Wagner

Page 48: Creating a browser ready fps mmo in unity ppt-mew_final

53 09/29/11 Aquiris Game Studio | Electrotank

Questions?