Skip to content

WarCluster/warcluster-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

warcluster logo

WarCluster

Real-time Massive Multiplayer Online Space Strategy Arcade Browser Social Game for Twitter! ヘ(◕。◕ヘ)

⚠️ This project's support is discontinued. Venture forth at your own peril. It's ~3 years old, unmaintained for about a year but helped us learn Go and experiment with strange ideas which would never make it to a real production environment. It's considered as a playground although it's working (we held numerous tournaments with ~100 simultaneous real players and dozens small scale inhouse tests) ;)

Related links:

What can you expect to see in this ~3-year old repo:

  • Go and WebSockets :D
  • Go and Redis =D
  • Go and tests \(^O^)/
  • Voronoi diagram! ... wait, wut?

History of how we got here

long story short: We wanted to learn something new ♪┏(・o・)┛♪┗ ( ・o・) ┓♪, experiment with the unthinkable & foresee the unimaginable. So we decided to make a web-fuckin-browser MMO as a side-project... It must had breathtaking tactics, large scale strategizing, thoughtful meta gameplay & dangerously social diplomacy. This is how WarCluster was born as the first social game for twitter! It was greatly inspired by other games

It has 6 different races. Each race has it's own unique color. six races

Each color corresponds to unique twitter #hashtag used for race wide communication (eg. #WarClusterRed). There're only verbal alliences between players.

Winning

The game is time based. Each round is approximately 10 days. The player with the most controlled planets (i.e. biggest empire) at the end of the round is proclaimed winner and therefore Galactic Emperor (here's one of the Beta winners @valexiev)

Gameplay

Each player starts with a solar system consisting of 9 neutral planets. His home planet (the one with the asteroid belt) is impregnable. Typically each colonized planet has owner and generates for him army pilots per minute. The bigger the planet the more it generates.

At some point the army can grow bigger than the allowed population of the planet. So when the numbers get red bad things start to happen and army pilots are beginnig to die by the minute. Different sizes of planets have different population caps. planet info planet

A player can send army pilots to attack, spy or support other planets depending on their verbal agreements with its owner. The spaceships travel slow so moves are carefully plotted. Imagine it as a real time game of Go warcluster red armada:

  • Upon attacking a player conquers a planet if his attacking army is > 1 than the other army. Everything is lost otherwise.
  • Upon spying a player gets the number of the army on the targeted planet.
  • Upon supporting a player is donating his army to the planet's owner.

A player should spend extra effort to pick his enemies wiser and his allies patiently. Plot twists are around every hour.

There're different kind of ships indicating the size of the army. From left (smallest army, no more than 500 pilots) to right (biggest army, more than 6000 pilots). This is used to understand what's the expected army power that's approaching you.

xs shipssm shipsmd shipslg shipsxxl ships

Running the server

prerequisites:

  • Redis, so you have to install it and run the server (redis-server is the most lazy way)
  • Go. Install version 1.3 or higher. Decide which directory is going to be your go workspace directory, set __$GOPATH__ to it and create src/ directory inside.

It's a good idea to place these two export commands somewhere in your .bashrc file, though. Otherwise you would have to execute them on each re-login in your system. Now it's time to fetch warcluster and install its requirements.

$ git clone git@github.com:WarCluster/warcluster-server.git $GOPATH/src/warcluster
$ cd $GOPATH/src/warcluster/
$ go get -v github.com/stretchr/testify
$ go get -v

Add your twitter consumer/secret keys here in order to have working social twitter login.

If you run redis on your localhost without any custom configuration and you're okay with the game running on port 7000, then you should be able to run the server without any modifications. Otherwise, copy config/config.gcfg.default to config/config.gcfg and make your changes.

Just to be sure, everything is set up propery run the tests:

$ go test ./...

If you see no errors, then Hurray! Let's actually compile server:

$ go install

If this command runs without errors you should have a bin/ directory in your $GOPATH and now you can run it:

$ warcluster

Contributing:

Fork it ( • ∀•)–Ψ and make required changes. After that push your changes in branch, which is named according to the changes you did. Initiate the PR (づ ̄ ³ ̄)づ