bvschwartz / hive

Hive Board Game with Game Engine, AI, UI, and Server.

Home Page:https://playhive.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About Hive

Hive is a tabletop game designed by John Yianni and published in 2001 by Gen42 Games. It's a two player turn based game where the goal is to completely surround the opposing player's queen bee. Each game piece has different ways of moving around the hexagonal grid -- More information about these movements and game rules can be found here https://www.gen42.com/download/rules/hive/Hive_English_Rules.pdf.

Development

The game engine is written in javascript with no 3rd party dependencies. It’s job is to keep game state and to emit events when moves are validated or processed.

The AI is also written in javascript with no 3rd party dependencies and is an implementation of the minimax algorithm with alpha beta pruning. It runs on the client-side in a separate thread via the Web Worker API.

The UI uses the Canvas API along with Kinetic.js to render the pieces. The hexagonal grid was constructed with good ol’e fashion trigonometry.

The hive server runs on Node.js through Socket.io on the Express framework. The decision to use Node.js was to potentially use the game engine on the server-side.

Develop Locally

Install Deps
npm install
Run Tests
npm test
Compile and Watch Assets
grunt && grunt watch
Run Server
node app/server.js
View in Browser
open http://localhost:3001

About

Hive Board Game with Game Engine, AI, UI, and Server.

https://playhive.herokuapp.com


Languages

Language:JavaScript 86.8%Language:CSS 13.1%Language:HTML 0.1%Language:Ruby 0.0%