1 / 13

The CSE 331 Version

The CSE 331 Version. By Jeff Golden and Paul Madrid. The Project. Implement Risk for the computer. Requires: Graphics plus user interface Multiplayer capabilities Network support Can support: AI modules Other user interfaces. Language.

connie
Download Presentation

The CSE 331 Version

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. The CSE 331 Version By Jeff Golden and Paul Madrid

  2. The Project • Implement Risk for the computer. • Requires: • Graphics plus user interface • Multiplayer capabilities • Network support • Can support: • AI modules • Other user interfaces

  3. Language • Risk is written in C++ using OpenGL as the graphics library. • Why C++? • Could not find sockets library • ISE graphics library not suitable for games

  4. Client/Server Model • Server • The game is stored on the server. • The server performs all move validations. • Server sends messages and results to client. • Server can be on the client machine or remote. • Client • Client receives messages from server. • Client displays the game map and other game data • Client receives user input, translates it, and sends it to server.

  5. Server Issues • Move validation: • How can we detect adjacent countries? • How can we tell when certain moves are valid? • Process communication: • Stream communication in sockets? • What language do processes speak?

  6. Move Validation • Use a graph for adjacencies. • We implemented a Graph ADT for this purpose, inheriting from the STL map container. • Keep track of game states for proper move validation. • Also helps eliminate need for multithreading.

  7. Process Communication • Create abstract Socket class • Allows cross-platform socket communication. • Allows C++-stream-style I/O. • Define a communication protocol • FTP-like syntax • Covers all information a viewer would need • Plain text

  8. Client Issues • Graphical • How does the viewer display the stored data? • Receiving/sending messages? • Interface • Easy way for user to communicate?

  9. Graphical • Data • Number of armies at center of country. • Countries colored according to owning player. • Status through a pop-up box. • Messages • When received from the server, will be displayed in the lower part of screen. • When sent by user, will also be displayed in lower part of screen.

  10. Interface • Main Window • Divided in three: the map component, message component, and a dice box. • Mainly for display of data. • Menu-system • Context-menu-style system • All commands necessary at disposal of player through context-menu.

  11. Division of Labor • Jeff worked from the client end of the project. • Learned OpenGL GLUT and developed the client through it. • Developed user interface • Developed bitmaps and other graphics • Paul worked from the server end of the project. • Implemented Graph and Socket classes, and all game data classes • Wrote game logic • Determined command syntax

  12. Expansion • AI Modules • If they can follow command syntax, they should be able to work. • Other user interfaces • Text based • Variants of graphics based • Three-dimensional

  13. References • Josuttis, Nicolai M. The C++ Standard Library: A Tutorial and Reference. Addison-Wesley Publication Co. 1999. • Neon Helium Productions. NeHe Productions (OpenGL). Url: <Http://nehe.gamedev.net> • Risk Home Page! Url: <http://www.ascu.unian.it/~bepi/risiko/index_e.html> • Risk: The World Conquest Game. Parker Brothers, Ltd. 1994. • Rosen, Kenneth H. Discrete Mathematics and its Applications. McGraw Hill, 1998.

More Related