A project by: Cristian Chircu Ionut-Alexandru Cristei Ilie Halip Iulian-Constantin Zaharia MISS 2, 2011
Architecture <ul><li>A server mediating multiple clients, processing client messages/requests </li></ul><ul><li>Asynchrono...
Server <ul><li>Running jWebSocket ( http://jwebsocket.org/ ) </li></ul><ul><li>Has a plugin which registers a listener for...
Server <ul><li>Has a FoafManager, which keeps and manager player information (username, real name, wins, losses etc). </li...
Server <ul><li>FoafData contains the following information: </li></ul><ul><ul><ul><ul><li>auth:username </li></ul></ul></u...
Client
Client <ul><li>Is using only  open web standards , and can run in browsers with no plugins (Adobe Flash etc) </li></ul><ul...
Client <ul><li>Game logic is using the MVC pattern, and most of the JavaScript code is OO </li></ul><ul><li>Tabs: Lobby, R...
AI <ul><li>Uses a Greedy algorythm for calculating optimum attacks </li></ul><ul><li>Applies restrictions to actions, depe...
Technologies used <ul><li>jWebSocket: open-source WebSocket server </li></ul><ul><li>jQuery: open-source JavaScript librar...
Upcoming SlideShare
Loading in …5
×

Inter galactic war

1,065 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,065
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Inter galactic war

  1. 1. A project by: Cristian Chircu Ionut-Alexandru Cristei Ilie Halip Iulian-Constantin Zaharia MISS 2, 2011
  2. 2. Architecture <ul><li>A server mediating multiple clients, processing client messages/requests </li></ul><ul><li>Asynchronous communication using WebSocket (a feature of HTML5) </li></ul><ul><li>Server running jWebSocket, and a plugin that could handle IGW-specific tokens </li></ul><ul><li>UI designed using jQueryUI </li></ul><ul><li>Game logic using gameQuery </li></ul><ul><li>Server implements an AI for single-player </li></ul>
  3. 3. Server <ul><li>Running jWebSocket ( http://jwebsocket.org/ ) </li></ul><ul><li>Has a plugin which registers a listener for client messages and requests; the listener searches for different “tokens”, and handles them using a GameManager </li></ul><ul><li>Different classes for Owner (player), Game, GameMap, Planet… </li></ul><ul><li>Each player is characterized by name and color (inside the same room) </li></ul>
  4. 4. Server <ul><li>Has a FoafManager, which keeps and manager player information (username, real name, wins, losses etc). </li></ul><ul><li>Uses 4 namespaces: </li></ul><ul><ul><ul><li>xmlns:rdf= http://www.w3.org/1999/02/22-rdf-syntax-ns# </li></ul></ul></ul><ul><ul><ul><li>xmlns:foaf= http://xmlns.com/foaf/0.1/ </li></ul></ul></ul><ul><ul><ul><li>xmlns:game= http://spacegame-ns/games/ </li></ul></ul></ul><ul><ul><ul><li>xmlns:auth= http://spacegame-ns/authentication/ </li></ul></ul></ul><ul><li>Uses SparQL to get the list of friends for each player (when logging in) </li></ul>
  5. 5. Server <ul><li>FoafData contains the following information: </li></ul><ul><ul><ul><ul><li>auth:username </li></ul></ul></ul></ul><ul><ul><ul><ul><li>auth:password </li></ul></ul></ul></ul><ul><ul><ul><ul><li>game:wins </li></ul></ul></ul></ul><ul><ul><ul><ul><li>game:defeats </li></ul></ul></ul></ul><ul><ul><ul><ul><li>foaf:firstname </li></ul></ul></ul></ul><ul><ul><ul><ul><li>foaf:givenname </li></ul></ul></ul></ul><ul><ul><ul><ul><li>foaf:knows </li></ul></ul></ul></ul><ul><li>Will be updated by FoafManager whenever any changes occur </li></ul>
  6. 6. Client
  7. 7. Client <ul><li>Is using only open web standards , and can run in browsers with no plugins (Adobe Flash etc) </li></ul><ul><li>Uses the JavaScript WebSocket object, and warns when the browser does not support it </li></ul><ul><li>Communicates with the server, and registers callbacks for messages received from server </li></ul>
  8. 8. Client <ul><li>Game logic is using the MVC pattern, and most of the JavaScript code is OO </li></ul><ul><li>Tabs: Lobby, Rooms, Room, Game </li></ul><ul><ul><ul><li>Lobby: shows logged on users, online friends </li></ul></ul></ul><ul><ul><ul><li>Rooms: shows all available rooms </li></ul></ul></ul><ul><ul><ul><li>Room: pre-game chat </li></ul></ul></ul><ul><ul><ul><li>Game: the actual game </li></ul></ul></ul>
  9. 9. AI <ul><li>Uses a Greedy algorythm for calculating optimum attacks </li></ul><ul><li>Applies restrictions to actions, depending on the game state (early, mid, late) </li></ul><ul><li>Uses 2 formulas to get the best base score, and target score </li></ul>
  10. 10. Technologies used <ul><li>jWebSocket: open-source WebSocket server </li></ul><ul><li>jQuery: open-source JavaScript library </li></ul><ul><li>jQueryUI: UI design using jQuery </li></ul><ul><li>gameQuery: game library using jQuery </li></ul><ul><li>Google Chrome: modern browser supporting some features of HTML5 (including WebSocket) </li></ul><ul><li>TortoiseSVN: SVN client (repository for game hosted on students’ server) </li></ul><ul><li>Eclipse: IDE used to create the jWebSocket plugin </li></ul>

×