Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ThuStory · Tsinghua Garden Story

English | 中文

Project status: archived Backend tests Code License: MIT

Merit Award project from the Tsinghua University Software Design Competition

ThuStory is a campus-life simulation game set at Tsinghua University. Players manage energy, health, GPA, research progress, and extracurricular development across four academic years, build relationships with NPCs, and work toward multiple endings.

Note

This is an archived competition project and is no longer under active development. The repository is maintained primarily as a portfolio, technical reference, and historical record.

Important

The repository contains a runnable FastAPI backend, a snapshot of the Unity C# scripts, technical documentation, screenshots, and demo videos. It does not contain the complete Unity project or a downloadable game build.

Screenshots

ThuStory screenshot 1 ThuStory screenshot 2
ThuStory screenshot 3 ThuStory screenshot 4

Demo videos: Video 1 · Video 2 · Video 3

Highlights

  • Server-authoritative game clock: 0.9 real seconds equals one in-game minute
  • Campus progression systems: courses, GPA, research, extracurricular activities, energy, and health
  • NPC dialogue: optional DeepSeek integration with offline fallback responses
  • Multiple endings: postgraduate study, overseas study, entrepreneurship, employment, and other routes
  • Daily-life mechanics: classes, meals, curfew, exhaustion, and health penalties

Architecture

Unity C# thin client
        ↕ HTTP API / X-Token
Python 3.10+ / FastAPI backend (application version 2.2)
        ↕
SQLite single-player save
        ↕
DeepSeek API (optional)

The backend is the source of truth for game time, player attributes, courses, activities, NPC relationships, and ending evaluation.

Run the Backend

Windows PowerShell

cd source-code/backend
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txt
Copy-Item .env.example .env
python main.py

After startup:

On macOS or Linux, use source venv/bin/activate and cp .env.example .env.

The DEEPSEEK_API_KEY setting is optional. Without it, NPC conversations use local fallback responses.

Run Tests

cd source-code/backend
pip install -r requirements-dev.txt
python -m pytest -q

Tests use temporary SQLite databases and do not modify a local game save.

Repository Layout

source-code/
  backend/                  # FastAPI backend and pytest regression tests
  csharp-client/            # Unity C# script snapshot, not a complete Unity project
docs/                       # Gameplay, system, API, and deployment documentation in Chinese
media/                      # Screenshots and demo videos

Known Limitations

  • The backend uses one global single-player save and is not designed as a multi-user service.
  • Unity scenes, assets, packages, and project settings are not included.
  • The ignored local game.exe is a legacy binary and was not rebuilt after the server configuration changes.
  • SQLite is suitable for local use and low-concurrency demonstrations, not a public multi-user deployment.
  • Some Unity class names and comments still use the earlier v2.1 naming convention.

Documentation

The detailed documentation is maintained in Chinese:

Team

Member GitHub
brightcolin @brightcolin
zhangchee25-cloud @zhangchee25-cloud
galaxy-3000 @galaxy-3000

License

The MIT License applies only to original program and test code under source-code/, CI automation under .github/workflows/, and original software configuration files required to build, run, or test that code.

The README files, AGENTS.md, CLAUDE.md, docs/, media/, game-build/, project names, marks, and third-party materials are excluded from the MIT grant and are all rights reserved unless otherwise stated. See NOTICE for the precise scope.

About

A university life simulation game built with Unity + FastAPI. Excellence Award, Tsinghua Software Design Competition.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages