David Salz CTO / Co-Founder david@sandbox-interactive.com ABOUT - - PowerPoint PPT Presentation

david salz
SMART_READER_LITE
LIVE PREVIEW

David Salz CTO / Co-Founder david@sandbox-interactive.com ABOUT - - PowerPoint PPT Presentation

ALBION ONLINE: A CROSS-PLATFORM MMO David Salz CTO / Co-Founder david@sandbox-interactive.com ABOUT ALBION ONLINE What is Albion Online? Albion Online is a modern interpretation of EVE Online with the skill based combat from League of


slide-1
SLIDE 1

ALBION ONLINE: A CROSS-PLATFORM MMO

David Salz

CTO / Co-Founder

david@sandbox-interactive.com

slide-2
SLIDE 2
slide-3
SLIDE 3

What is Albion Online? Albion Online is a modern interpretation of EVE Online with the skill based combat from League of Legends

ABOUT ALBION ONLINE

slide-4
SLIDE 4
  • Sandbox MMORPG
  • Cross-Platform (Windows/OSX/Linux/Android/iOS)
  • One World (no „Shards“ or „Servers“, not even for different platforms)
  • 4 years in the making
  • Currently in Closed Beta w/ 100.000+ „founding“ players
  • „Release“ in Q4/2016

ABOUT ALBION ONLINE

slide-5
SLIDE 5
  • Engine Selection: Unity
  • powerful, accessible
  • Cross-Platform was a „target of opportunity“
  • Database Selection: Cassandra, Postgres
  • One world  need a very scalable database, NoSQL
  • still use SQL for query-heavy problems
  • Networking Middleware: Photon
  • UDP (reliable/unreliable), TCP
  • can use C# on server (like in Unity!)
  • works with all Unity platforms

MIDDLEWARE SELECTION

slide-6
SLIDE 6
  • NoSQL Database
  • Originally developed by Facebook
  • Open Source (Apache-License)
  • written in Java
  • Concept: everything is a hash table
  • in-memory (as much as possible)
  • optimized for high throughput
  • scales horizontally (just add servers)
  • redundant (no single point of failure)
  • CQL: SQL-like language (w/ massive restrictions – it‘s NoSQL)

CASSANDRA

slide-7
SLIDE 7
  • Server needs to work without Unity
  • Ideally, client works without Unity, too!
  • think: tools, stress-test-bots!
  • Use Unity only as rendering front-end
  • cannot rely on Unity features for basic functions!
  • levels / game objects
  • collision
  • pathfinding

CONSEQUENCES

slide-8
SLIDE 8

ObjectFactory ObjectViewFactory

Object +Position +… +RequestAction() ObjectView +Renderer +AnimationCtrl +HandleInput() destroyed changed …etc.. created Object +Position +… +RequestAction() Server Client Unity-Client Interest-Management

changed …etc..

  • bj-enter
  • bj-leave

manage create create

SEPARATION

slide-9
SLIDE 9

Game Server Game Server Game Server Login Server World Server

Marketplace Server GoldMarket Server

Statistics Server

Ranking Server BackOffice Server

Chat Server

Client

Connect to different game server depending on location in game world

Game DB (Cassandra) Accounts DB (Postgres) Market DB (Postgres) GoldMarket DB (Postgres)

SERVER FARM

slide-10
SLIDE 10
  • game world split into unique „clusters“ of ~ 1 km²
  • current world: ~600, next world: x2
  • distributed among game servers
  • player changes servers when travelling
  • handoff done through database (even on same server)
  • World Server
  • responsible for everything „global“
  • guilds, parties, coordination of guild battles etc.

SERVER FARM

slide-11
SLIDE 11
slide-12
SLIDE 12

IO Thread IO Thread Network IO Thread Event Queue Logging IO Thread Event Scheduler Cluster Thread Event Queue Event Scheduler Cluster Thread Pathfinding Thread Database IO Thread Cluster Thread makes request Events / Results get put into Event Queue Cluster polls Events from Queue and Scheduler

GAME SERVER – THREADING MODEL

slide-13
SLIDE 13
  • Players should only „see“ (network-

wise) what‘s on their screen

  • important to reduce traffic…
  • … and prevent cheating!
  • Needs to be efficient!
  • ~500 mobs / cluster
  • > 10.000 game objects (e.g. trees)
  • up to 300 players

player

GAME SERVER – INTEREST MANAGEMENT

slide-14
SLIDE 14

grid based hash (10x10m cells)

  • cells contain list of objects inside
  • list is updated by object itself when moving
  • cells fire events:
  • ObjectEnteredCell()
  • ObjectLeftCell()

player

  • objects also fire events
  • ObjectMoved()
  • ObjectDestroyed()
  • EventFired()

GAME SERVER – INTEREST MANAGEMENT

slide-15
SLIDE 15

player Interest area Moves with player Subscribe to objects when they enter inner area Unsubscribe when they leave

  • uter area

Tell player when:

  • an object enters / leaves interest area
  • an object in the area fires an event

GAME SERVER – INTEREST MANAGEMENT

slide-16
SLIDE 16

Level consists of „tiles“ (Unity prefabs) Tile has 3d collider (for mouse picking + ground height definition) 2d collision is painted per tile (blocks movement / blocks shots / blocks placement etc.) Ground tile Object (non-ground) tile

LEVEL DESIGN

slide-17
SLIDE 17

Collision

  • TODO: pictures, demo

Collision of all tiles is blended together

COLLISION

slide-18
SLIDE 18
  • Character + Equipment

gets baked into one mesh (= 1 draw call!)

  • parts of character mesh

hidden depending on equipment

  • Only one material for

character + all equipment items

  • Limit number of

characters drawn (esp.

  • n mobile)

CHARACTER RENDERING

slide-19
SLIDE 19
slide-20
SLIDE 20
  • .NET code is very accessible for analysis
  • camera hacks (minior problem because of interest management)
  • found internal tools, cheats in code (not working on live)
  • extracted data from client
  • maps, player rankings… lead to cool community projects!
  • Users built bots directly into client 
  • Difficult to prevent
  • Obfuscation – helps, but not much
  • We are doing more integrity checks now!
  • Future: Unity IL2CPP ?

CHEATERS

slide-21
SLIDE 21
slide-22
SLIDE 22

THE END

Thank you!

Questions / Comments? david@sandbox-interactive.com