EECE 1080C / Programming for ECE 
Summer 2020 
Computer Project 
Project is due on Tuesday, 30 June! 
Topics covered: 
? Project 1 – Interactive Game  
Objective: 
The goal of this project is to demonstrate basic mastery of the design, creation, and implementation of a moderately-sized C++ Project.  ? To demonstrate OOP programming in the construction of a multi-level in game.  ? The main goals of this laboratory are as follows:  o Work in groups of 2 to develop an interactive computer game.  o Demonstrate your understanding of C++  Submit your files on Canvas using the submission Link. Include all .hpp, .cpp, and .exe files  
Game Description 
? Player should navigate around a maze to complete an objective and advance through 10 mazes of increasing difficulty.  ? There needs to be obstacles: bad guys, traps, etc.  ? The maze will be printed to the terminal as a hidden map and revealed as the player moves around to find the end point  ? The player can move around using w-a-s-d or up-down-left-right  
Rubric: 100 points 
? Computer Project (100)  
? Final Project submission: 30 June: 75 points  
- Submit the .hpp, .cpp, and .exe files for the completed code.
 - Include a ?-page guide with instructions about the game objective and interface
   
 
General Tips 
- Choose your partner
 - Take time to discuss the features that you want to build into the game
  o You will be building your code using classes and structures, putting each piece in header files  o Decide who will design each piece, then bring the pieces together in the main code. - The C++ source code should meet or exceed the following requirements
  o Use C++ best practices when possible  ? Use meaningful variable and function names  ? Maximize the use of functions and class/struct data types  ? Most of the gameplay should be completed using struct object functions  o Follow all coding style and comment guidelines  o Complete the following program header:   
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|Project Title: Program Name	|
|   About Game: 	|
|	|
|   How-to-play:	|
|	|
|   Developers:	|
|      Name 1 - CQU Number	|
|      Name 2 - CQU Number	|
|	|
|   Special Instructions: (optional)	|
|      Include special instructions to compile and run	|
|	|
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  
A. Minimum Coding Requirements 
As a programmer, you are free to use any method to interact with the player. Consider displaying game information (a descriptive menu and board graphic.) Note: use #include then put system(“CLS”); on a line in your program to clear the terminal screen.  ? Player can select from three characters  ? Player can select board size: 10 by 10 minimum  o Playing field may increase in size with each level  ? You will progress the player through 10 mazes of game play (0 – 9)  For each level:  ? Characters starts in a random place in the maze  ? Player should be able to enter  o w – to go up (up arrow)  o a – to go left (left arrow)  o s – to go down (down arrow)  o d – to go right (right arrow)  o q – to quit (esc key)  ? Handle the option to move outside the maze  ? The player’s goal is to get the character to the winning objective  o Player will fight bad guys and collect power-ups along the way.  ? Playing field struct/class: should be randomly filled with bad guys, power-ups, and the winning location. I suggest using the following table for population  Level char 0 1 2 3 4 5 6 7 8 9  of Winning space W 1 1 1 1 1 1 1 1 1 1  of Map Reveal space M 0 1 1 1 1 1 1 1 1 1  of Atk-Up space A 0 1 2 3 4 5 6 7 8 9  of Def-Up space D 0 1 2 3 4 5 6 7 8 9  of bad-guy space 1,2,3,4,5 0 5 10 15 20 25 30 35 40 45  Board Size *, X, 0 10x10 10x10 10x10 10x10 10x10 10x10 10x10 10x10 10x10 10x10  o Legend: using a construction similar to the rectangle frame program we created, you can display the game board  ? W = winning space  ? A = attack boost (+1)  ? D = defense boost (+5)  ? M = map reveal treasure – shows the legend on the map instead of * and X  ? 1,2,3,4,5 = level of bad guy occupying the square  ? * = unexplored space on playing field  ? X = explored space on playing field  ? 0 = space where the character is  o Hint: store two 2D arrays. The first will have the map with just * ,0, X. The second will show all the other characters.  o Basic struct/class functions you will need  ? print gameboard – revealed or hidden (public)  ? execute action – based on what is hidden in the square moved to (public)  ? (private) fighting bad guys routine (attack first, take damage hp, repeat until victory or death)  ? output back to main program a mechanism to advance to next level (function return bool)  ? output back to main program if the character is dead (public class variable bool)  ? Character class/struct: should be selected by the player. I suggest the following basic options  Good Guy Attack HP  Good Guy (1) 1 30  Good Guy (2) 2 20  Good Guy (3) 3 10  o Character would be a struct used inside of the playing field class and will have 3 options; the variable will be initialized, based on the player’s selection  o Character attack firsts, then takes damage – repeat until character defeats the bad guy.  o optional: add on the weaponClass  ? Bad Guys struct: Player should fight bad guys of different levels. I suggest, creating bad guys using the following distribution (all in percent) – Take the percentage of bad guys from the playing field table and multiply it by the percentage distribution of bad guys.  Level 0 1 2 3 4 5 6 7 8 9  Bad Guy (0) 0 100 95 85 70 50 30 10 0 0  Bad Guy (1) 0 0 5 10 15 20 25 30 25 20  Bad Guy (2) 0 0 0 5 10 15 20 25 30 25  Bad Guy (3) 0 0 0 0 5 10 15 20 25 30  Bad Guy (4) 0 0 0 0 0 5 10 15 20 25  Bad Guys would be a struct used inside of the playing field class and will have 5 elements  Bad Guy Attack Power HP  Bad Guy (0) 1 1  Bad Guy (1) 2 2  Bad Guy (2) 3 3  Bad Guy (3) 4 4  Bad Guy (4) 5 5  
程序展现 
   
下载地址 
链接: https://pan.baidu.com/s/1ktnGn9OX9VTksVcoR16kmg  提取码: wdng 
                
                
                
        
    
 
 |