3 Star 1 Fork 0

xhw / Sustech CS205 C++ Project

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

C++ Project For CS205

项目选题 : Recursive Box

1. 项目要求

2. 实现功能

  • Basic Part

    • Programming language: C/C++
    • Command Line Interface (10pts)
    • Implementation of Basic Sokuban Rules (15pts)
      • You can push more than one box simultaneously
      • Not only all the storage points should have one box but also the player should arrive at the checkpoint
    • Implementation of Extra Rules (45pts)
      • Internal Structures (10pts)
      • Recursive Box (5pts)
      • Recursion Overflow (5pts)
      • Greedy Snake (5pts)
      • Multiple reference (10pts)
    • Save and load (10pts)
  • Bonus Part

    • New Functions
      • Graphical Interface (up to 15pts)
      • Undo (up to 5pts)
      • Auto solving (up to 10pts)
    • More Extra Rules
      • Time travel (up to 10pts)
      • Multiple infinite and multiple epsilon (10pts)
    • Anything you think is worth doing
      • Multiple players
      • Level editor
      • Sharing levels through network
      • Bgm and Sound effect

3. 操作说明

  • 主菜单

    主菜单

  • 关卡选择

    关卡选择

    • 关卡名称会自定义方式排序
  • 游戏内

    游戏内

    • 可以点击箱子进行查看操作
    • 按键
      • P : 查看父箱子
      • R : 撤销操作
      • C : 重置操作
      • ESC : 退回当前箱子
      • W/A/S/D : 控制玩家
  • 联机

    联机

    • 默认占用8421端口(可以在配置文件中修改)
  • 关卡编辑器

    编辑器

    • 特殊箱子的创建
      • Recursive Box : 需指定放置对象(唯一存在)
      • Clone Box : 需指定克隆对象
      • Infinity Box : 需指定引用对象
      • Infinitesimal Box : 需指定引用对象
    • 删除的注意事项
      • 不能删除一个被克隆/引用/放置的箱子
      • 不能删除最后一个箱子

4. 程序工作目录介绍

  • Qt库

    • generic
    • iconengines
    • imageformats
    • multimedia
    • networkinformation
    • platforms
    • styles
    • tls
    • translations
    • *.dll
  • 资源文件

    • resource
      • bgm 背景音乐
      • cursor 鼠标指针
      • font 字体
      • icon 图标
      • image 图片
      • sound 音效
  • 配置文件

    • configs
      • stylesheet.qss qt全局样式表
      • colors.json 游戏颜色信息
      • config.json 游戏参数
  • 临时文件

    • temp 临时文件存放处
  • 关卡文件

    • levels 全部关卡文件

5. 其它

1. 开发环境

  • 项目使用Visual Studio,详见"Recursive Box.vcxproj"
  • 编译器使用MSVC
  • Qt版本为6.3.2
  • 所用Qt模块
    • core
    • gui
    • widgets
    • multimedia

2. 项目结构

├── audio
│   ├── AudioManager.*                  # 音乐音效播放类
│   └── AudioRecorder.*                 # 音频录制类(未使用)
├── core
│   ├── block
│       ├── BlockBase.h                 # 方格抽象类
│       └── BlockImpl.*                 # 方格实现类(继承BlockBase)
│   ├── item
│       ├── ItemBase.h                  # 物品抽象类
│       ├── ComplexBox.*                # 递归箱子实现类(继承ItemBase)
│       └── ItemImpl.*                  # 其余物品实现类(继承ItemBase)
│   └── kernel
│       ├── GameKernelBasic.*           # 单机模式运行类(继承QObject,实现Serializable)
│       ├── GameKernelOnline.*          # 联机模式运行抽象类(继承GameKernelBasic,实现NetWorkHandlerBase)
│       ├── GameKernelOnlineHost.*      # 联机模式主机实现类(继承GameKernelOnline)
│       └── GameKernelOnlineCustom.*    # 联机模式客机实现类(继承GameKernelOnline)
├── loader
│   ├── ConfigLoader.*                  # 配置文件加载类
│   ├── LevelSaveLoader.*               # 游戏关卡保存加载类
│   └── Serializable.h                  # 可序列化接口
├── network
│   ├── NetWorkException.h              # 网络异常类
│   ├── NetWorkHandlerBase.h            # 网络请求处理接口
│   ├── NetWorkMessenger.*              # 网络请求接受发送类
│   └── UdpDatagram.*                   # UDP数据包类
├── ui
│   ├── components
│       ├── Advance
│           ├── AdvanceButton.*         # 按钮提升类(继承QPushButton)
│           ├── AdvanceComboBox.*       # 组合框提升类(继承QComboBox)
│           ├── AdvanceLineEdit.*       # 单行编辑框提升类(继承QLineEdit)
│           ├── AdvanceRadioButton.*    # 单选按钮提升类(继承QRadioButton)
│           └── AdvanceMessageBox.*     # 自定义增强消息框
│       ├── GameRenderer
│           ├── GameRendererBase.*      # 游戏渲染抽象类(继承QWidget)
│           ├── GameRendererForPlay.*   # 游戏渲染类(继承GameRenderBase)
│           └── GameRendererForEditor.* # 关卡编辑器渲染类(继承GameRenderBase)
│       └── other
│           └── MessagePrompt.*         # 消息弹出提示类(继承QWidget)
│   └── widget
│       ├── GamePlayUI.*                # 游戏界面UI类(继承QWidget)
│       ├── LevelEditorUI.*             # 关卡编辑器UI类(继承QWidget,实现Serilizable)
│       ├── LevelSelectionUI.*          # 关卡选择器UI累(继承QWidget)
│       ├── MenuUI.*                    # 菜单UI类(继承QWidget)
│       ├── OnlineLobby.*               # 联机大厅类(继承QWidget,实现NetWorkHandlerBase)
│       └── MainWindow.*                # 主窗口类(继承QWidget)
├── utils
│   ├── JsonParser.*                    # Json解析器类
│   └── Utils.*                         # 工具包类
└── main.cpp                            # 游戏运行主函数

3. 项目成员及分工

  • 王玺华
    • GUI与音乐音效
    • 网络联机通讯
    • 关卡编辑器
    • 游戏保存与存档格式的实现
  • 范升泰
    • 游戏运行逻辑实现
    • 玩家,普通箱子,普通递归,克隆,无穷大的设计与实现
  • 杨哲皓
    • 无穷小的设计与实现
    • 完善存档健壮性

4. 仓库链接

https://gitee.com/xbxzka/c---project

5. LICENSE

MIT

MIT License Copyright (c) 2024 xhw Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

C++ Project For Sustech CS205 展开 收起
C++ 等 5 种语言
MIT
取消

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/xbxzka/c---project.git
git@gitee.com:xbxzka/c---project.git
xbxzka
c---project
Sustech CS205 C++ Project
master

搜索帮助