Download presentation
Presentation is loading. Please wait.
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: Risk Home Page! Url: Risk: The World Conquest Game. Parker Brothers, Ltd. 1994. Rosen, Kenneth H. Discrete Mathematics and its Applications. McGraw Hill, 1998.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.