79 lines
2.2 KiB
Markdown
79 lines
2.2 KiB
Markdown
# Rogue
|
|
|
|
**[Play Online](https://rogue.peterstockings.com/)**
|
|
|
|
A roguelike dungeon crawler built with TypeScript, Phaser, and Rot.js.
|
|
|
|
## Getting Started
|
|
|
|
Follow these instructions to get the project up and running on your local machine.
|
|
|
|
### Prerequisites
|
|
|
|
This project uses [Bun](https://bun.sh/) as its runtime and package manager. Ensure you have Bun installed on your system.
|
|
|
|
### Installation
|
|
|
|
Clone the repository and install the dependencies:
|
|
|
|
```bash
|
|
bun install
|
|
```
|
|
|
|
### Running the Game
|
|
|
|
Start the development server:
|
|
|
|
```bash
|
|
bun run dev
|
|
```
|
|
|
|
### Accessing the Game
|
|
|
|
Once the server is running, open your browser and navigate to the URL shown in the terminal. typically:
|
|
|
|
[http://localhost:5173](http://localhost:5173)
|
|
|
|
## Development Workflow
|
|
|
|
We strive to maintain a high quality of code. Please follow these guidelines when contributing.
|
|
|
|
### Making Changes
|
|
|
|
1. **Create a Feature Branch**: Always create a new branch for your changes.
|
|
```bash
|
|
git checkout -b feature/my-new-feature
|
|
```
|
|
|
|
2. **Add Tests**: Ensure that new functionality is covered by unit tests.
|
|
|
|
3. **Run Verification**: Before merging your changes, run the verification script to ensure type safety and pass all tests.
|
|
```bash
|
|
bun run verify
|
|
```
|
|
### Running Tests
|
|
|
|
To run the test suite manually:
|
|
|
|
```bash
|
|
bun run test
|
|
```
|
|
|
|
## Project Structure
|
|
|
|
The source code is organized as follows:
|
|
|
|
- `src/core`: Contains core game logic, configuration, and type definitions.
|
|
- `src/engine`: Handles game systems like simulation, turn management, and world generation.
|
|
- `src/rendering`: Manages visual aspects using Phaser, including the renderer and FOV.
|
|
- `src/scenes`: Defines the different Phaser scenes (e.g., Game, Menu, Preload).
|
|
- `src/ui`: Contains User Interface components and logic.
|
|
|
|
## Built With
|
|
|
|
- [Phaser](https://phaser.io/) - HTML5 Game Framework
|
|
- [Rot.js](https://ondras.github.io/rot.js/hp/) - Roguelike Toolkit
|
|
- [Vite](https://vitejs.dev/) - Frontend Tooling
|
|
- [TypeScript](https://www.typescriptlang.org/) - Typed JavaScript
|
|
- [Vitest](https://vitest.dev/) - Unit Testing Framework
|