联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> C/C++编程C/C++编程

日期:2019-06-26 10:44

EECE 1080C / Programming for ECE

Summer 2019

Laboratory 7/8: Project 1

Plagiarism will not be tolerated:

all students who share files will receive a 100% penalty on this assignment

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 become 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 4 to develop an interactive RPG-dungeon game.

o Demonstrate all aspects of C++ language, including:

the use of structures and classes

the use of for loops, while loops, if statements, and input/output commands

Collaboration:

You are expected to work with a group of 4 students on this project.

You can help each other learn by reviewing assignment materials, describing to each other how you

are approaching the problem, and helping each other with syntax errors

Please document any help you receive from tutors, teaching assistants, and instructors.

Your solution is expected to be unique and of your own creation

Having someone else code for you, sharing code with other students, or copy-pasting code from the

internet or previous terms is cheating.

Highlights:

Please consider the following:

o Review structures.

o Review classes.

o Avoid using magic numbers in these functions. Use constants when appropriate.

o Add a main comment section at the beginning of each program you submit, specifying your

name in Pinyin, the date it was last updated and a brief description of what it does.

o Read problem statements carefully in order to fulfill all instructed requirements.

o Remember to validate inputs accordingly. It is also a good programming practice.

o Run your program for all probable outcomes to confirm its functionality. If possible, have other

people test your code. This can help identify and troubleshoot problems.

o Comment important sections of your code to easily recognize your logic and approach to solving

the tasks.

To receive full credit for this laboratory please sign the attendance sheet.

Please access the laboratory assignment via the canopy/blackboard link. The descriptions for each

problem are contained within this document.

Each part should be worked on separately. You will need a separate project for each part of this

assignment when working within your IDE.

Submit your files on Blackboard using the assignment dropbox.

Rubric: 100 points

Background (Story) 5

How-to-Play Instructions 5

Fulfill minimum coding requirements 60

Enhanced game play features 15

Playability (program compiles and works) 15

Interactive RPG-dungeon game:

General Tips

1. Choose your group members:

o make sure that you have submitted the group list under the Wk 16 Laboratory Section on

Blackboard

2. 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.

3. You will have lab time on Friday, 14 Jun and Sunday 16 Jun to complete to work on the project

o Additionally, you will have one more week, outside of class, to complete the project

o Project is due on Tuesday, 25 June!

4. 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

Do not use any global variables (with the exception of constants)

main() should be the bare minimal necessary to accomplish the project – most of the

gameplay should be completed through external and class/struct functions

o Follow all coding style and comment guidelines

o Maximize code reusability

o Test program frequently to eliminate errors and warnings

o Include a complete “Programmer Header”

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\

Project Title: Save the Tesla

Background: You trying to save a Tesla from being launched into

Space by Elon Musk. You have made it into the facility. Avoid

being caught by the security guards, find the Tesla and escape.

How-to-play: use WASD to move Mr. Ant around the room. Collect

power-ups, the evil minion's along the way, and find the exit

to advance to the next level (0 - 9).

Developers:

Name 1 - CQU Number

Name 2 - CQU Number

Name 3 - CQU Number

Name 4 - CQU Number

Special Instructions: (optional)

Include special instructions to compile and run

Developer comments:

Name 1:

Describe what tasks you performed and what your learned

from your experience

Name 2:

Describe what tasks you performed and what your learned

from your experience

Name 3:

Describe what tasks you performed and what your learned

from your experience

Name 4:

Describe what tasks you performed and what your learned

from your experience

\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

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 <cstdlib> 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 levels of game play (0 – 9)

For each level:

Characters starts in a random place in a room

Player should be able to enter

o w – to go up

o a – to go left

o s – to go down

o d – to go right

o q – to quit

Handle the option to move outside the playing field

The player’s goal is to get the character to the winning location

o Player will fight bad guys and collect power-ups along the way.

Playing field 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 vectors. The first will have the map with just * and X. The second will

show all the other characters.

o The playing field should keep the character space private and use class functions to access

the information

o Basic 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 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.

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


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp