Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAHARA QUEST — 1972

A Text-Based Story Game | C Language | Terminal

"A Moroccan soldier, abandoned in Western Sahara, must choose:
serve the king who left him, or fight for the people who saved him."


STORY

October 1972. Morocco's King Hassan II sends covert military units
into Spanish-occupied Western Sahara to test Spain's resolve.
Spain pushes back hard. Morocco withdraws. Officially, the soldiers were never there.

You were one of those soldiers. You have been left behind.

Found by Polisario fighters — the nascent independence movement —
you face an impossible choice: spy for the country that abandoned you,
or fight for the people who gave you water in the desert.


GAMEPLAY

  • Pure terminal / text-based (no graphics library needed)
  • 80%+ of each scene is ASCII art — every location is drawn
  • Typewriter effect on all narration
  • 6 unique endings across 2 major branches
  • Alignment system tracks Morocco vs Polisario loyalty
  • World flags gate choices — your decisions accumulate
  • Press [S] anytime to see your soldier's status
  • Press [Q] anytime to quit

BRANCHES

                        START
                          │
                    Desert Wake
                     (Act 1)
                          │
                Polisario Camp
                 (You're found)
                          │
                   Meet Hassan
                          │
               ┌───────────────────┐
               │                   │
           SPY PATH          POLISARIO PATH
           (Morocco)         (Freedom)
               │                   │
          ┌────┴────┐        ┌──────┼──────┐
          │         │        │      │      │
        Hero      Ghost    Free   Exile  Peace
       Ending    Ending   Ending Ending Ending
                    │
                  Caught
                  Ending

HOW TO COMPILE

Linux / Mac:

gcc main.c -I include -std=c99 -o sahara_quest
./sahara_quest

Windows (MinGW):

gcc main.c -I include -std=c99 -o sahara_quest.exe
sahara_quest.exe

With Makefile:

make
make run

PROJECT STRUCTURE

sahara_quest/
├── main.c                  ← Entry point (3 lines of logic)
├── Makefile                ← Build system
│
├── include/
│   ├── game.h              ← All types, structs, enums, prototypes
│   ├── color.h             ← Cross-platform color
│   ├── input.h             ← Input enable/disable
│   └── typewriter.h        ← Typewriter effect
│
├── src/
│   ├── engine.c            ← GameEngine — main loop controller
│   ├── scenes.c            ← ALL story scenes (the content file)
│   ├── render.c            ← All display / ASCII art rendering
│   ├── player.c            ← Player state, flags, alignment
│   ├── input_handler.c     ← Keyboard input handling
│   ├── color.c             ← Terminal colors (Win + Linux/Mac)
│   ├── input.c             ← Raw input toggle (Win + Linux/Mac)
│   └── typewriter.c        ← Typewriter character effect
│
└── assets/                 ← (Future: external ASCII art files)

OOP ARCHITECTURE (in C)

This project simulates Object-Oriented design in C:

Struct Equivalent "Class" File
GameEngine Application / Controller engine.c
Player Player / Character player.c
Scene Room / Level Object scenes.c
Choice Option / Branch scenes.c
WorldFlags Game State Manager player.c

All "methods" take their struct as first parameter — like self in Python.


HOW TO ADD A NEW SCENE

  1. Add an ID to SceneID enum in include/game.h
  2. Write a load_scene_yourname() function in src/scenes.c
  3. Call it in scenes_load_all() at the bottom of src/scenes.c
  4. Connect to it by setting next_scene = SCENE_YOURNAME in a choice

HISTORICAL NOTES

  • 1884–1975: Spain colonizes Western Sahara
  • 1973: Polisario Front founded by Sahrawi independence fighters
  • 1975: The Green March — 350,000 Moroccan civilians cross the border
  • 1976: Sahrawi Arab Democratic Republic proclaimed
  • 1991: UN ceasefire — promised referendum never held
  • Today: Western Sahara remains one of Africa's last unresolved colonial questions

CREDITS

  • Original engine & concept: Your adventure_text_based_game project
    (banner, typewriter, color system, input toggle)
  • Story, branching, scenes: Built on your foundation
  • Cross-platform port: Linux/Mac support added
  • Architecture: OOP-style C with full comments for contributors

"The desert remembers everything.
The question is what we choose to remember with it."

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages