Gennia: Yet another generals.io clone server & client
What is GenniaServer 2?
- A realtime multiplayer game where the goal is to capture all of the enemy's general without losing your own
- using react/nextjs/socket/express
- inspired by generals.io, the game mode will be different from generals.io in the future.
Your goal is to capture other generals.
- Plains produce one unit every 25 turns
- Cities and generals produce one unit every turn
- You can move twice per turn.
- When you capture the enemy general, all his territory belongs to you and his army strength is halved and becomes yours.
| function | keyboard |
|---|---|
| Move Around | WSAD |
| Move On Mobile | Touch & Drag |
| Open Chat | Enter |
| Undo Move | e |
| Clear Queued Moves | q |
| Select on general | g |
| Center on home | h |
| Center Map | c |
| Toggle 50% | z |
| Set Zoom to Preset | 1 / 2 / 3 |
| Zoom in / out | mouse wheel |
| Surrender | escape |
- Create Custom Map
- Game Bot
- Replays
- Mobile Support (Drag to attack)
- Lobby & Custom Game
- Room Chat
- Team
- Fog of War
- Spectator
- Warring States (Reveal all King)
- Move All Armys
- Movable King
First, run the development server:
cd client/
pnpm install
pnpm run devOpen http://localhost:3000 with your browser to see the result.
We use postgresql + prisma
- see
.env.exampleto config prisma env correctly - if you init repo or edit prisma schema, run
pnpx prisma migrate devto make sure update schema in database and update prisma client
npx prisma generate # generate prisma client code
npx prisma migrate dev # migrate
pnpm dlx prisma studio # open databaseUI
cd server/
pnpm install
pnpm dlx prisma migrate dev
pnpm run dev- setup postgresql and pyadmin to manage data
docker-compose up -d
-
PM2 is a production process manager for Node.js applications, which is very easy to use.
-
docker-compose: for setup database
-
see
make deployandmake restartin Makefile -
to set the application to restart on startup see: https://pm2.keymetrics.io/docs/usage/startup/
- QQ Group : 374889821
- Discord
Distributed under the GNU GENERAL PUBLIC LICENSE VERSION 3. See LICENSE.txt for more information.


