LifePaths/README.md
2024-09-22 06:15:23 +02:00

5.3 KiB

LifePaths

A Dynamic Life Simulation Game

LifePaths is a web-based life simulation game inspired by BitLife, The Sims, Crusader Kings 3, and Game of Life. It offers a nonlinear choose-your-own-adventure (CYOA) experience where players navigate through various life events, make choices, and shape their character's destiny.


Table of Contents


Features

  • Character Creation: Customize your character's name, gender, skin tone, abilities, traits, and background.
  • Dynamic Events: Experience a wide range of events influenced by your choices, traits, and background.
  • Nonlinear Storylines: Navigate through multiple branching storylines and career paths.
  • Ability Checks: Make decisions that rely on your character's abilities, with critical successes and failures adding unpredictability.
  • Interactive UI: Enjoy a modern, minimalistic interface with smooth animations and responsive design.

Demo

Add a link or screenshots of the game in action.


Installation

Prerequisites

  • Python 3.7+
  • pip (Python package installer)
  • Virtual Environment (Recommended)

Setup

  1. Clone the Repository

    git clone https://github.com/yourusername/lifepaths.git
    cd lifepaths
    
  2. Create a Virtual Environment

    python3 -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
    
  3. Install Dependencies

    pip install -r requirements.txt
    
  4. Set Up Environment Variables

    • Create a .env file in the root directory.

    • Add your secret key and any other necessary configurations.

      SECRET_KEY=your_secret_key
      
  5. Prepare Data Files

    • Ensure that the data/ directory contains the necessary YAML files organized as per the project structure.

    • Example:

      data/
      ├── events/
      ├── storylines/
      └── careers/
      

Usage

Running the Game

  1. Activate the Virtual Environment

    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
    
  2. Start the Flask App

    flask run
    
    • By default, the app will run on http://127.0.0.1:5000/.

Playing the Game

  • Open your web browser and navigate to http://127.0.0.1:5000/.
  • Create your character by filling out the character creation form.
  • Proceed through events by making choices and experiencing the outcomes.
  • Navigate through life stages, careers, and storylines as your character ages.

Project Structure

lifepaths/
├── app.py
├── data/
│   ├── events/
│   │   ├── [country]/
│   │   │   ├── [region]/
│   │   │   │   ├── [decade]/
│   │   │   │   │   ├── [background]/
│   │   │   │   │   │   ├── childhood.yaml
│   │   │   │   │   │   ├── teen.yaml
│   │   │   │   │   │   └── adult.yaml
│   │   │   │   │   └── ...
│   │   │   │   └── ...
│   │   │   └── ...
│   │   └── ...
│   ├── storylines/
│   │   ├── main_storyline.yaml
│   │   └── ...
│   └── careers/
│       ├── doctor.yaml
│       ├── engineer.yaml
│       └── ...
├── templates/
│   ├── index.html
│   ├── create_character.html
│   ├── event.html
│   ├── outcome.html
│   └── no_events.html
├── static/
│   └── [Optional static files like CSS, JS, images]
├── requirements.txt
└── .env

Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the Repository

    • Click the "Fork" button at the top right of this page.
  2. Clone Your Fork

    git clone https://github.com/yourusername/lifepaths.git
    
  3. Create a New Branch

    git checkout -b feature/your-feature-name
    
  4. Make Your Changes

    • Add new features, fix bugs, or improve documentation.
  5. Commit Your Changes

    git commit -am 'Add some feature'
    
  6. Push to the Branch

    git push origin feature/your-feature-name
    
  7. Create a Pull Request

    • Open a pull request from your branch to the main branch of this repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments


Feel free to customize and expand this README as your project evolves.