Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/riskymh/hunger-games
A chaotic fighting game
https://github.com/riskymh/hunger-games
Last synced: 4 days ago
JSON representation
A chaotic fighting game
- Host: GitHub
- URL: https://github.com/riskymh/hunger-games
- Owner: RiskyMH
- Created: 2023-11-18T07:37:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-19T13:39:35.000Z (5 months ago)
- Last Synced: 2024-12-17T02:04:16.480Z (11 days ago)
- Language: TypeScript
- Homepage: https://riskymh.github.io/Hunger-Games/
- Size: 449 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Hunger GamesA simulation of a game with random fighting like Hunger Games
> **Note:** I made this for a school assignment, but decided to put it here because it was cool enough :)
## How to run
1. Install bun:
* can be inside wsl
2. Install dependencies: `bun install`
3. Run game `bun run start:game`
* `bun run start:game --print-map` can print the map to the console
4. Build website `bun run build:website`
5. Go to `./apps/visualization/out` to use the static html## How it works
### [The game](./apps/game)
This is the effectively a way dumber down version of Hunger Games, but this is trying to just let the computer use random to fight in an arena. I had intended for this to be more amazing but ran out of time to actually implement cool things.
**General Info:**
* Make large amount of people for all 12 districts
* Get some people to fight in district
* Currently 10 per district (and at min ~25% split of sex)
* Make it turn based
* Players can move in grid to fight or hide
* Map kind of inspired by civilisation games**The Map:**
* Turns go until only one district is remaining
* Can do many actions (will discuss below)
* Player’s move around the board doing their action
* Point of game is to eliminate all other players (as long as they are not your teammate)**The Actions:**
* **Move** is for going to random place without player
* **Fight** is finding the closest player with least health
* **Nothing** shouldn’t be used
* **Hide** makes it harder for other players to see them – lower chance of going on that tile (for both fight or move)
* **Loot** is finding lootbox**_"Genetic Algorithm":_**
* This works by finding the best player for each district and “copying” its stat
* The next year’s players uses that but +/- a bit
* Every year the amount of change is reduced
And thus the players learn from previous participants*Can view latest simulation: *
### [The visualization](./apps/visualization)
**Shows some data from the game:**
* Age distribution grouped by district
* The 4 changeable actions on columns coloured by districts
* Population per year by district – population/deaths/births
* The top person leaderboard for all years (ie 11th)*Can view the latest graphs: *
## Future goals
* Try and make this an actually playable game and not just a simulation
* Add items to make the game more interesting (ie bow and arrow)
* Give districts their own unique bonuses