CursedTomorrow README

项目的 README,来自 github.com/AhmadHassan-BTed/CursedTomorrow。合并为一个 markdown 文件:README.md。

Cursed Tomorrow

A platforming descent into the atmospheric unknown.

CI License: MIT Version C++ Raylib


Cursed Tomorrow is not just a game; it is a manifestation of tension and the human struggle against an encroaching, atmospheric darkness. Designed and engineered by Ahmad Hassan (B-Ted), this project serves as a technical showcase of modular C++ game design and atmospheric storytelling through interaction.

Overview • Showcase • Architecture • Systems • Resources • Development

Overview

The core of Cursed Tomorrow lies in its simplicity and the weight of its atmosphere. Every movement, jump, and collision is tuned to resonate with the player's experience of navigating a world that feels both fragile and hostile.

Core Pillars


Visual Showcase

The World of Tomorrow

Main Menu

The gateway into the descent.


Gameplay Level Selection
Gameplay Level Select
Navigating the void. Choosing the path.
Atmosphere Death
Warning You Died
Signs of what's to come. The inevitable end.

Architecture Documentation

The project architecture prioritizes decoupling and clear ownership. It is built to scale from a simple prototype to a complex production-grade game.

High-Level System Flow

graph TD
    subgraph "Engine Loop"
        Main[main.cpp] --> |Initialize| Game[Core::Game]
        Game --> |Frame Start| Input[HandleInput]
        Input --> |Update| Logic[UpdateLevelLogic]
        Logic --> |Physics| Phys[Entities::Character]
        Phys --> |Render| Draw[Draw]
        Draw --> |Frame End| Game
    end

    subgraph "Asset Management"
        Game -.-> |Request| RM[ResourceManager]
        RM --> |Cache/Load| Disk[(Disk Assets)]
    end

Module Relationship

The interaction between modules is strictly managed through the CursedTomorrow namespace.

Module Responsibility Internal Coupling
Core Window lifecycle, state machine, and main loop orchestration. High (Orchestrator)
Entities Individual game actors, physics, and local state. Low (Independent)
Resources Centralized asset caching and memory safety. Zero (Utility)
Config Global constants and engine parameters. Static Only

Internal Systems

Request & Data Flow

The data flow follows a strict unidirectional pattern during the update phase to ensure deterministic behavior.

sequenceDiagram
    participant P as Player
    participant G as Game
    participant C as Character
    participant RM as ResourceManager

    G->>G: HandleInput()
    G->>C: Update()
    C->>C: Move() & Jump()
    C->>C: ApplyGravity()
    G->>G: UpdateLevelLogic()
    G->>C: Draw()
    C->>RM: LoadTextureResource()
    RM-->>C: Texture Data
    C->>G: Render Complete

Repository Structure

.
├── .github/              # CI/CD Workflows & Templates
├── assets/               # Game Resources (Audio, Textures)
│   ├── audio/            # Atmospheric soundscapes
│   └── mainScreen/       # Visual interface components
├── docs/                 # Detailed Technical Documentation
├── include/              # Header Files
│   └── CursedTomorrow/   # Project Namespace
│       ├── Core/         # Engine & State Logic
│       └── Entities/     # Actor definitions
├── src/                  # Implementation Files
├── scripts/              # Automation and build helpers
└── CMakeLists.txt        # Build System Configuration

Development Workflow

The development process is designed to be contributor-friendly while maintaining high engineering standards.

1. Environment Setup

Ensure a C++17 compiler and CMake (3.15+) are installed. Raylib is the primary dependency.

By default, CMake expects Raylib to be installed on the system. To fetch Raylib automatically during configuration, use the -D FETCH_RAYLIB=ON option.

2. Build Pipeline with Automatically Fetched Raylib
# Configure and fetch Raylib automatically
cmake -B build -D FETCH_RAYLIB=ON

# Build the project
cmake --build build --config Release

# Run unit tests
ctest --test-dir build
3. Build Pipeline with System-Installed Raylib

If Raylib is already installed on your system, configure the project without the FETCH_RAYLIB option:

# Configure using the system-installed Raylib package
cmake -B build

# Build the project
cmake --build build --config Release

# Run unit tests
ctest --test-dir build

Technical Pipeline

graph LR
    Code[Code Change] --> Lint[Linting Check]
    Lint --> CMake[CMake Config]
    CMake --> Build[Binary Build]
    Build --> Test[Unit Testing]
    Test --> Deploy[Release Artifact]

Academic Resources

This project is supported by extensive documentation and presentation materials detailing its design and theoretical foundations.

Resource Description Format
SRS Document Software Requirements Specification and Data Structures (DSA) concepts. PDF
DSA Presentation Technical walkthrough of the concepts implemented in Cursed Tomorrow. PPTX

Credits & Vision

This project is a solo endeavor by Ahmad Hassan (B-Ted). It represents a commitment to clean code, intentional design, and the pursuit of digital atmosphere.

New people are welcomed to explore, contribute, and fork. The goal is to build a community around intentional game engineering.


"Tomorrow is coming, but it might be cursed."

CursedTomorrow (AhmadHassan-BTed/CursedTomorrow)

正在搜索数据库…

这是什么?《Cursed Tomorrow》是一款 2D 恐怖生存与逃脱类平台跳跃游戏,由个人从零开始用 C++ 独立开发,既是一个自研模块化游戏引擎的技术展示,也是一次氛围化叙事的尝试。
这是游戏还是可复用的引擎/库?它是一款独立游戏,拥有自己的 C++ 游戏核心(Core、Entities、Resources、Config 模块),并不是一个供其他项目导入使用的通用引擎。
我该如何构建和运行它?安装 C++17 编译器和 CMake 3.15+,然后运行构建流程;Raylib 会在构建过程中自动下载。
我需要先自己安装 Raylib 吗?不需要。Raylib 是主要的渲染依赖,但它会作为 CMake 构建过程的一部分自动下载,因此无需手动安装。
如果我不想在本地配置 C++ 工具链,有没有 Docker 方案?项目的主题标签中列出了 Docker,这表明除了原生 CMake 构建之外,还存在容器化的构建和运行方式,但 README 没有详细说明具体的 Docker 命令。
除了玩家,这个项目还面向谁?它既面向想体验氛围浓厚的恐怖平台跳跃游戏的玩家,也面向希望研究有完整文档、模块化 C++ 游戏架构的开发者和学生。
这个游戏内部采用了什么架构?游戏被组织在 CursedTomorrow 命名空间下的多个解耦模块中:Core(窗口、状态机和主循环调度)、Entities(角色与物理,相互独立)、Resources(集中式资源缓存,零耦合)以及 Config(静态全局常量)。
除了代码,还有其他学习资料吗?有的。项目包含一份 SRS(软件需求规格说明书),涵盖数据结构与 DSA 概念;还有一份 DSA 演示文稿,讲解项目中实现的各个概念。
大小
34.6 MB
星标
4.9K
更新
提交Nov 09
时长
3年
提交 · 90 天