Download Risk: The World Conquest Game.

yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts

Tektronix 4010 wikipedia, lookup

2.5D wikipedia, lookup

Waveform graphics wikipedia, lookup

The CSE 331 Version
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
• 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
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.
Server Issues
• Move validation:
– How can we detect
adjacent countries?
– How can we tell when
certain moves are valid?
• Process communication:
– Stream communication in
– What language do
processes speak?
Move Validation
• Use a graph for adjacencies.
– We implemented a Graph ADT for this
purpose, inheriting from the STL map
• Keep track of game states for proper move
– Also helps eliminate need for multithreading.
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
Client Issues
• Graphical
– How does the viewer display the stored data?
– Receiving/sending messages?
• Interface
– Easy way for user to communicate?
• 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.
• 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.
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
• AI Modules
– If they can follow
command syntax, they
should be able to
• Other user interfaces
– Text based
– Variants of graphics
– Three-dimensional
• Josuttis, Nicolai M. The C++ Standard Library: A Tutorial
and Reference. Addison-Wesley Publication Co. 1999.
• Neon Helium Productions. NeHe Productions
(OpenGL). Url: <Http://>
• Risk Home Page! Url:
• Risk: The World Conquest Game. Parker Brothers, Ltd.
• Rosen, Kenneth H. Discrete Mathematics and its
Applications. McGraw Hill, 1998.