This is an open source WOL leaderboard emulator for legacy Westwood Studios games; specifically, those hosted by CnCNet. Ideally though, this application should work with any client sending WOLv1 or WOLv2 Game Resolution packets. This application serves several REST API endpoints (documented below) to consume and post leaderboard data.
- Red Alert
- Red Alert: The Aftermath
- Tiberian Sun
- Tiberian Sun: Firestorm
- Red Alert 2
- Yuri's Revenge
- Tiberian Dawn
- Dune 2000
npm install --productionnpm start
There's a few params listed below.
:gamecan be any of the following^(td|d2k?|ra2?|ts|dta|fs|yr|am)$:gameIdcan only be numeric(\d+):playerand:clancan be alpha-numeric with some special characters(\w\d\[\])
- GET
/pingto ensure that the server is online
- POST
/ladder/:gameaccepts gameres packet (via POST body) for the supplied:game - GET
/ladder/:gamewill return the top 150 leaderboard players for the supplied:game - GET
/ladder/:game/game/:gameIdwill return all data for a given:gameId - GET
/ladder/:game/player/:playerwill return most data for given:player
URL /ladder/:game/clan/:clan is used for the following methods. Most of these endpoints require authorization similar to Player Authentication.
GETwill return most data for the given:clan(does not require auth)PUTcreate the given:clanPOSTwilljoin,partormodify(supplied toactionquery) the given:clanDELETEpermanently delete the given:clan
- GET
/auth/:playerHTTP authentication using Account credentials
Successful authentication of this endpoint will return an JSON Web Token which can be used to call subsequent endpoints which require auth. This endpoint uses basic HTTP authentication.
example player auth request
curl -isu Tahj:MyPassword http://localhost:4007/auth/tahj3z- PUT
/auth/:playerusing HTTP authentication
Accounts can be created using this endpoint. After an account has been created, users can then proceed to login using the Player Authentication endpoint above. Future iterations will allow consumers to additionally update Account information using this endpoint.
The below subjects outline how to extend the functionality of this project. Any help is warmly accepted and greatly appreciated! :)
Windows
set DEBUG=wol:leaderboard,-not-this
grunt serveMac
DEBUG=wol:leaderboard grunt serveLeaderboard stats are stored via MongoDB. You'll need this installed for local development. You can start Mongo using the following command.
mongod --dbpath data/db