IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> C++知识库 -> C++ Interactive Game 2020 -> 正文阅读

[C++知识库]C++ Interactive Game 2020

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

  1. Submit the .hpp, .cpp, and .exe files for the completed code.
  2. Include a ?-page guide with instructions about the game objective and interface

General Tips

  1. Choose your partner
  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. 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

程序展现

C++ Interactive Game 2020.gif

下载地址

链接: https://pan.baidu.com/s/1ktnGn9OX9VTksVcoR16kmg
提取码: wdng

  C++知识库 最新文章
【C++】友元、嵌套类、异常、RTTI、类型转换
通讯录的思路与实现(C语言)
C++PrimerPlus 第七章 函数-C++的编程模块(
Problem C: 算法9-9~9-12:平衡二叉树的基本
MSVC C++ UTF-8编程
C++进阶 多态原理
简单string类c++实现
我的年度总结
【C语言】以深厚地基筑伟岸高楼-基础篇(六
c语言常见错误合集
上一篇文章      下一篇文章      查看所有文章
加:2021-07-29 11:27:16  更:2021-07-29 11:28:52 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年4日历 -2024/4/28 13:54:02-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码