Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.
/ dark-forest Public archive

Break Free submission to the 2023 Multiplayer Madness competition by Hathora

License

Notifications You must be signed in to change notification settings

philihp/dark-forest

Repository files navigation

Hathora Deploy Coverage Status

Dark Forest

Architecture

All game logic is contained in here. Game state is stored in a state object, with a reducer processing every command, which is sent to it as a plain string. Every move is processed deterministically, so it can be done simultaneously on both client and server.

This serves mostly as a bridge between Game logic and the Hathora server, and handles users joining the game, and throwing out invalid moves which the Game logic processes and returns an undefined state.

Built in plain React, a lot of the bridging to the server is handled in context/GameContext.tsx. The main game's view is in pages/Game.tsx, and is graphics are just a plain inline SVG.

About

Break Free submission to the 2023 Multiplayer Madness competition by Hathora

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages