1 / 17

Warlords - Multiplayer Game Design

A multiplayer version of the arcade game "Warlords". Control a paddle to protect your castle from the cannon ball and eliminate opponents. Python and Panda3D used for game engine.

jpape
Download Presentation

Warlords - Multiplayer Game Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Warlords Patrick Levoshko SE 558 – Multiplayer Game Design

  2. Warlords This game is a multiplayer version of the Atari game “Warlords.” Warlords is a 2D game and can be played by two to four players. Each player will control a paddle to protect his or her castle from the cannon ball. Since there is no out of bounds, once the cannon ball is launched it will continue to rebound around the arena until the game is over. If the cannon ball hits a players paddle, it will be reflected away harmlessly. Behind each paddle is the castle wall which will fall apart as the cannon ball strikes it. This castle wall protects the players avatar; if the avatar is hit by the cannon ball that player loses. The game continues until there is only one avatar alive. Patrick Levoshko

  3. Warlords • The game client was designed using Panda3d and Python for the game engine. • The backend server is using Python and server data is being handled by SQLite • All player account information is saved for future login, etc. • Server data is queried against during login/account registration to make sure players do not register twice or are not already logged in. • Models, artwork and sounds are taken from various places on the internet. • The game is based on the 1980 Atari game “Warlords”. • http://en.wikipedia.org/wiki/Warlords_(video_game) Patrick Levoshko

  4. Server Logon Server Information User Account Information System Status User Options Patrick Levoshko

  5. Server Logon • Server Information : The current server to which the user is trying to connect. • User Account Information : User account input. • System Status : Status returned by the client or server to be displayed to the user. • Invalid user name or password. • User already logged into server. • Error connecting to server. • User Options : Options in which the user can select. • Quit returns the user to the server select window. • Create New Account brings the user to the register window. • Login attempts to log into the selected server. Patrick Levoshko

  6. User Registration Server Information User Account Information System Status User Options Patrick Levoshko

  7. User Registration • Server Information : The server the user is trying to register to. • User Account Information : The account information which the user is trying to register under. • System Status : Status returned by the client or server to be displayed to the user. • Not a completely filled out form. • Mismatch in passwords. • Account already exists. • User Options : Options which the user can select. • Quit returns the user to the server logon window. • Register attempts to register with the currently selected server. Patrick Levoshko

  8. Player Lobby User Name Chat Window Players List Active Game List System Status Chat Entry User Options Patrick Levoshko

  9. Player Lobby • Chat Window : All chatting done in the lobby is printed here. After 15 messages it clears. • Chat Entry : Enter a chat message. User hits enter to send the chat. • User Name : User name of current user. • Players List : Listing of all currently connected users to the lobby or in a game. • Active Game List : List of all active current games including who is hosting and who is playing. • System Status : Status returned by the client or server to be displayed to the user. • Players lobby login/log out messages. • Game creation or joining status, along with how many more members the game is waiting for. • User Options : Options which the user can select. • # Players ranges from 2 to 4 for a new game. • Start Game creates a game on the server with the given # players. • Join Game will join the user to the current game waiting for players. • Quit Game returns the user to the login screen. Patrick Levoshko

  10. Warlords Client Player Name Player Castle Player Paddle Startup Directions Arena Wall Patrick Levoshko

  11. Warlords Client • Player Name/Castle/Paddle : Player interface to the game. • Explained more on the next slide. • Startup Directions : Controls displayed to all players. • The client which is also the server has a message notifying that player how to launch the ball. Only the server launches the ball to start the game. • Arena Wall : The ball reflects off of the wall to keep in play. Patrick Levoshko

  12. Warlords Client Player Paddle Cannon Ball Castle Wall Player Avatar Arena Wall Patrick Levoshko

  13. Warlords Client • Player Paddle : The player uses the left and right arrow keys to move this back and forth in order to block the cannon ball from hitting his or her castle walls and avatar. The player’s paddle is gold, while the opponents’ are blue. • Cannon Ball : Used by the players to destroy another players castle and avatar. • Arena Wall : The ball reflects off of the wall to keep in play. • Castle Wall : Walls which protect a players avatar from the cannon ball. Each hit of the wall by the cannon ball breaks a little off. • Player Avatar : If the player’s avatar is hit by the cannon ball, that player loses. Patrick Levoshko

  14. Network Design Details • All clients use TCP to communicate with the game lobby server. • All clients use unreliable UDP to the talk to the game server (which is another player client). Patrick Levoshko

  15. Game Design Details • The client which started the game in the lobby is chosen to also be the server. • The client-server handles all game state data. • Notifies all clients when the cannon ball collides and what the position is after the collision. • Notifies all clients when a player’s wall is hit with the position of the hit. • Notifies all clients when a player exits the game or has lost/won. • The client-server handles all data being passed between clients. • Notifies all clients when a player’s paddle changes direction/stops/starts. • All clients use Dead Reckoning for cannon ball and player paddle position except when notified by the client-server. Patrick Levoshko

  16. Some Technical Issues Faced • Trying to get the cannon ball and game state to match up was difficult. Although still not perfect it is much more smooth. • The server sends 3 packets in unison with the ball position to each client after a collision. • The server sends a packet every 5 frames with the ball position. • Tried 3 variations for game physics. • Ended up using panda3D collision detection and vectors to decide on velocity of the cannon ball. • This causes an issue where sometimes the cannon ball will get stuck on a paddle. • Originally the lobby server was created to handle a one-on-one game. • Had to design a way to handle multiple games running at one time and how to join them/know when the game was filled with the amount of players asked for. • Tried to design the best way for clients to move the paddles while updating the server/other clients without too much jitter. • The client only sends the paddle position when being moved/stopped, otherwise the other clients assume that the paddle is moving in the same direction. Patrick Levoshko

  17. Current State of Development • All major code for the game is complete. • The models, graphics and sounds are finalized. • Warlords is currently in the play testing and bug fixing stage of development. Patrick Levoshko

More Related