https://github.com/sverrenystad/boids-the-game
Boids the Game is a simulation-based game that is inspired by Craig Reynolds' Boids algorithm, which models the flocking behavior of birds or fish. In this game, players can choose to control a boid known as a Hoid (herd-like boid) and survive as long as possible, or a Poid (predator-like boid) and hunt down as many Hoids as possible.
https://github.com/sverrenystad/boids-the-game
game java javafx maven
Last synced: about 1 month ago
JSON representation
Boids the Game is a simulation-based game that is inspired by Craig Reynolds' Boids algorithm, which models the flocking behavior of birds or fish. In this game, players can choose to control a boid known as a Hoid (herd-like boid) and survive as long as possible, or a Poid (predator-like boid) and hunt down as many Hoids as possible.
- Host: GitHub
- URL: https://github.com/sverrenystad/boids-the-game
- Owner: SverreNystad
- License: mit
- Created: 2023-05-01T01:28:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-19T22:26:36.000Z (2 months ago)
- Last Synced: 2025-04-06T08:47:12.714Z (about 2 months ago)
- Topics: game, java, javafx, maven
- Language: Java
- Homepage:
- Size: 3.26 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Boids the Game README



[](https://opensource.org/licenses/MIT)## Table of Contents
- [Boids the Game README](#boids-the-game-readme)
- [Table of Contents](#table-of-contents)
- [Description of Boids the Game](#description-of-boids-the-game)
- [Description of the Boids Algorithm](#description-of-the-boids-algorithm)
- [Getting Started](#getting-started)
- [Gameplay](#gameplay)
- [Poid:](#poid)
- [Game Settings:](#game-settings)
- [Game Screens:](#game-screens)
- [Testing](#testing)
- [Acknowledgements](#acknowledgements)
- [License](#license)## Description of Boids the Game
Boids the Game is a simulation-based game that is inspired by Craig Reynolds' Boids algorithm, which models the flocking behavior of birds or fish. In this game, players can choose to control a boid known as a Hoid (herd-like boid) and survive as long as possible, or a Poid (predator-like boid) and hunt down as many Hoids as possible. The game is built using Java, JavaFX, and Maven, with a total of four screens: Main Menu, Settings, Scoreboard, and Game Screen.## Description of the Boids Algorithm
Boids the Game is based on the Boids algorithm, which was developed by Craig Reynolds in 1986 as a model for simulating flocking behavior of birds or fish. The algorithm is simple, yet effective in creating realistic swarm-like movement patterns.The Boids algorithm uses three basic rules to govern the behavior of each individual boid:
1. **Separation**: Boids try to maintain a certain distance from other nearby boids to avoid collisions.
2. **Alignment**: Boids attempt to align their direction and speed with the average direction and speed of nearby boids.
3. **Cohesion**: Boids move towards the average position of nearby boids, effectively staying together as a group.## Getting Started
To get started with Boids the Game, follow these steps:1. Ensure you have Java and JavaFX installed on your system. If not, download and install them from the official websites.
2. Clone or download the repository to your local machine.
```bash
git clone https://github.com/SverreNystad/boids-the-game.git
cd boids-the-game
```
3. Navigate to the project's root folder and run
```bash
mvn clean javafx:run
```## Gameplay
In Boids the Game, you can play as a Hoid or a Poid (predator boid).The Boids algorithm simulates flocking behavior by trying to achieve local flock center, aligning velocity with neighboring boids, and maintaining a minimum distance from other boids. Hoids follow the Boids algorithm, while Poids target the nearest Hoid or PlayerBoid when in Hoid game mode. The PlayerBoid is the character that the player controls, and it follows the cursor in the game.
### Poid:
As a Poid, your goal is to hunt down and capture as many Boids as possible. The player-controlled Poid will also follow the cursor's last known position.### Game Settings:
You can customize your gameplay experience through the settings screen. Here, you can adjust the number of Boids, the ratio of Hoids vs Poids, and enable or disable the map's wraparound feature.### Game Screens:
The game features four main screens:
1. Main Menu: Start a new game or access the settings and scoreboard.
2. Settings: Customize the gameplay experience.
3. Scoreboard: View the highest scores achieved.
4. Game Screen: Play the game.

[](https://gyazo.com/6cd790e5b1516ec82968693f4ff45c76)
[](https://gyazo.com/0dc7b698c4eb431d19be66c0b852ff02)
## Testing
To run the test suite for Boids the Game, follow these steps:1. Navigate to the project's root folder.
2. Run `mvn test` to execute the test suite.## Acknowledgements
We would like to thank Craig Reynolds for creating the Boids algorithm, which inspired the development of this game. Additionally, we appreciate the support of the Java, JavaFX, and Maven communities for their respective technologies."[LPC] Birds" by bluecarrot16, commissioned by castelonia. https://opengameart.org/content/lpc-birds
## License
Boids the Game is released under the [MIT License](https://opensource.org/licenses/MIT). Please refer to the `LICENSE` file in the project's root folder for the full text.