Distributed Systems II Extremely Massive Multiplayer Browser – Based Games Νικολάου Σταύρος
Προδιαγραφές 1/5 • Strategy game • Idea: Tribes(Nomad-like) • Idea: Tribes(Nomad-like)
Προδιαγραφές 2/5 • Map – Divided into regions(grid - X,Y coordinates) – Each region has a type(forest, hill, plains, sea, swamps, desert, lakes, mountains) swamps, desert, lakes, mountains) – The type of each region determines resources and movement speed. – Each region has resources(wood, stone, metal, food) – Not distributed Static(for now) –
Προδιαγραφές 3/5 • Tribes 1/2 – Name, population, position(in the map(x,y)) – Move (token which is changes position in the map controlled by players) – Speed:Full, Limited(half speed), Restricted(quarter speed) – Troops • Units(ID, Type, Quantity, Owner) • Units(ID, Type, Quantity, Owner) • Types(Archer, Horseman, Mage, Warrior) • Upgrades of types above(Ranger, Knight, Battlemage, Gladiator) • Attributes(ID_type, Name,Att, Def, Requirements) – Veterans/Trainers • Units(ID, Type, Quantity, Owner) • Types: Sentinels(Archer, Ranger), Sorcerers(Mage, Battlemage), Weapon Masters(Warrior, Gladiator) Paladins(Horseman, Knight) • Attributes(ID_type, Name, Level, Requirements)
Προδιαγραφές 4/5 • Tribes 2/2 – Actions: • Move – change position on the map • Check region – which players are stationed in a specific • Check region – which players are stationed in a specific region/part of the world • Create/Train/Build (troops, veterans) • Combat(Attack a tribe, Defend against attack, assist a tribe by attacking its opponent, assist a tribe by defending it)
Προδιαγραφές 5/5 • Tribes (optional) – Buildings(setlements/facilities - optional) • Same for each tribe • Needed in order to craft troops and veterans • Needed in order to craft troops and veterans • Very simple as we want nomadic gameplay • Few(if implemented) upgrades • Definition(ID, Type, Owner)
Αρχιτεκτονική - Σχεδίαση • Design decisions – Multiple Clients – Multiple servers – Single Database – tables collection(no replication) – Distributed Database
System Architecture … … … … Client Client Client Client Client Client Client Client Client … SERVER SERVER SERVER Database Database Database … Shard Shard Shard
Αρχιτεκτονική - Σχεδίαση • Design decisions – Horinzontal Partitioning • Method: Shards(Directly Implemented by Hibernate) • Dynamic number of servers with part of the world’s database. • Each server will represent a part of the world(with each own tables organized by (world)region based criteria-this can change) • • 3 –tier architecture 3 –tier architecture – User interface/presentation layer(client will express his actions/querries such as move tribe, troops building, veteran training, combat) – Middle tier/application layer(process clients actions and queries, interact- select, insert, update- with the stored DB and inform the player for the result) – Actual DB/data layer(the data stored in the DB is not in the form that the application layer uses it – it’s stored in relational tables)
Αρχιτεκτονική - Σχεδίαση • 3 –tier architecture lient PC Client Layer Web Browser, JSP Web Browser, JSP Clie Web Server Application Layer Game Logic, Objects(RMI), Data Access Database Server Database Layer Tables
Αρχιτεκτονική - Σχεδίαση • Design decisions – Language: JAVA – Why: • Easy • Easy • Many already implemented packages/libraries � reduces the code to be written • Hibernate: Special Java library which offers great flexibility in managing DB’s based on the relational model(very helpful for RDBMS)
Αρχιτεκτονική - Σχεδίαση • Design Decisions – Indexing • Distributed Hash Tables – Like hash tables – Like hash tables – The shard/part(therefore the server) of the DB that will be accessed is defined by the return value of the selected hashed function – Data retrieval • CAN(hopefully)
Στόχος • Obviously a playable game • Database consistency • Most importantly SCALABILITY!!!
Recommend
More recommend