Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Albion Online - A Cross-Platform MMO (Unite Europe 2016, Amsterdam)


Published on

Albion Online is a cross-platform sandbox MMO RPG game. This talk takes you behind the (technical) scenes. We will take a look at the structure of the server farm and its inner workings, the databases, the threading and message processing model and many other interesting implementation aspects. On the client side, Albion uses the well-known Unity game engine. The second part of the talk will describe how we use Unity (and which features we do not use, which is just as important!)

Published in: Software
  • Be the first to comment

Albion Online - A Cross-Platform MMO (Unite Europe 2016, Amsterdam)

  2. 2. 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
  3. 3. • 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
  4. 4. • 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
  5. 5. • 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
  6. 6. • 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
  7. 7. ObjectFactory ObjectViewFactory Object +Position +… +RequestAction() ObjectView +Renderer +AnimationCtrl +HandleInput() destroyed changed …etc.. created Object +Position +… +RequestAction() Server Client Unity-Client Interest-Management changed …etc.. obj-enter obj-leave manage create create SEPARATION
  8. 8. 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
  9. 9. • 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
  10. 10. IO Thread IO ThreadNetwork 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
  11. 11. • 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
  12. 12. 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
  13. 13. player Interest area Moves with player Subscribe to objects when they enter inner area Unsubscribe when they leave outer area Tell player when: ● an object enters / leaves interest area ● an object in the area fires an event GAME SERVER – INTEREST MANAGEMENT
  14. 14. 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
  15. 15. Collision • TODO: pictures, demo Collision of all tiles is blended together COLLISION
  16. 16. • 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. on mobile) CHARACTER RENDERING
  17. 17. • .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
  18. 18. THE END Thank you! Questions / Comments?