Inspired by Katamari Damacy and Agar.io, this is Agamari, an online multiplayer game where players compete to roll up the largest ball on a tiny planet. Along the way they might roll up each other, or even the moon.
A playable online build of Agamari can be found here.
Agamari is designed to be a simple-to-understand game that relies on intuitive physics for its gameplay mechanics. Players join each game as small spherical rocks with one purpose for existence: to roll up everything they can on the planet. Rocks are able to only pick up objects smaller than themselves. However, each object added increases a rock's size, allowing for larger and larger things to be rolled up as the game progresses. Items rolled up affect the mass and shape of a rock, bringing challenges and strategy to picking up different objects. Eventually, players may encounter other players, and if they are larger, can roll them up as well.
Agamari is built on Node.js using Socket.IO for client-server interaction, Three.js for 3D graphics rendering, Cannon.js for the physics engine, React for HTML rendering, and Redux for both client and server app state and game state management.
Handling of the game logic is distributed between the client and the server. Clients run their own physics calculations to compute their next position and orientation, while the server manages and modifies the master game state according to game logic and client events such as collisions with objects or other players.
- Use the arrow keys (or WASD) to move your rock.
- Roll over objects or players smaller than your rock to pick them up and grow.
- Avoid being rolled up by larger players.
- Hold & release the spacebar while holding down an arrow key to launch yourself in that direction.
- Your volume determines what you can or can not roll up. You can only roll up objects or players with less volume than yourself.
- Objects spawn randomly across the planet. They are usually scaled to the size of the smaller players, although occasionally large spawns occur.
- Players farther ahead in volume gain volume from objects at a slower rate. To keep their lead, hunting other players is a more efficient tactic.
- The larger you are, the heavier and more unwieldly you become, making movement more cumbersome. Be aware of what and how you pick up different objects and players.
The simplest way to have Agamari running locally is to have Docker. Simply do
docker compose up
and then access the game at http://localhost:8000
.
To do local development, you can run Agamari on your computer without Docker, but you will need Node.js with NPM (tested on 20.5).
Once you have Node.js with NPM installed, install the game's dependencies with the following command:
npm install
Then start the server with the following command:
npm run dev
The game will then be accessible at http://localhost:8000
.
Create an issue if you need help.