npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

throneteki

v1.0.2

Published

A Game of Throne Second Edition Card Game Server

Downloads

80

Readme

Throneteki

Web based implementation of A Game Of Thrones LCG 2nd Edition

FAQ

What is it?

This is the respository for the code internally known as throneteki which is running on theironthrone.net allowing people to play AGoT 2nd edition online using only their browser

Does't this look a lot like Jinteki? The Android netrunner online experience?

Glad you noticed! Yes, jinteki was a huge inspiration for this project, as the interface is clean and user friendly, so I've tried to make this similar in a lot of ways

Can I contribute?

Sure! The code is written in node.js(server) and react.js(client). Feel free to make suggestions, implement new cards, refactor bits of the code that are a bit clunky(there's a few of those atm), raise pull requests or submit bug reports

If you are going to contribute code, try and follow the style of the existing code as much as possible and talk to me before engaging in any big refactors. Also bear in mind there is an .eslintrc file in the project so try to follow those rules.

Documentation for implementing cards

The biggest help at the moment would be in terms of CSS, as that's a bit of a weakness of mine, feel free to pick up any of the issues tagged 'CSS' in the issue list.

If you're not coding inclined, then just playing games on the site, and reporting bugs and issues that you find is a big help

X Y Z doesn't work

That's not a question, but that still sucks, sorry :( First, bear in mind the site is in its infancy so a lot of things aren't implemented yet, but you should be able to do most things with a bit of manual input. If there's anything you can't do that you need to be able to do, let me know by raising an issue.

See this document for features I have planned and a link to the currently implemented cards: http://bit.ly/throneteki

How do I do X Y Z?

Check out the About page of a Throneteki live deployment.

Development

The game uses mongodb as storage so you'll need that installed and running.

Clone the repository
git submodule init
git submodule update
Run npm install
mkdir server/logs
cd server
node fetchdata.js
cd ..
node .
node server/gamenode

There are two exectuable components and you'll need to configure/run both to run a local server. First is the lobby server and then there are game nodes.

For the lobby server, you'll need a file called server/config.js that should look like this:

var config = {
  secret: 'somethingverysecret',
  dbPath: 'mongodb://127.0.0.1:27017/throneteki',
  mqUrl: 'tcp://127.0.0.1:6000' // This is the host/port of the Zero MQ server which does the node load balancing
};

module.exports = config;

For the game nodes you will need a file called server/gamenode/nodeconfig.js that looks like this:

var config = {
  secret: 'somethingverysecret', // This needs to match the config above
  mqUrl: 'tcp://127.0.0.1:6000', // This is the host/port of the Zero MQ server which does the node load balancing and needs to match the config above
  socketioPort: 9500, // This is the port for the game node to listen on
  nodeIdentity: 'test1', // This is the identity of the node,
  host: 'localhost'
};

module.exports = config;

This will get you up and running in development mode.

For production:

npm run build
NODE_ENV=production PORT=4000 node .

Then for each game node (typically one per CPU/core):

PORT={port} SERVER={node-name} node server/gamenode

Coding Guidelines

All JavaScript code included in Throneteki should pass (no errors, no warnings) linting by ESLint, according to the rules defined in .eslintrc at the root of this repo. To manually check that that is indeed the case install ESLint and run

eslint client/ server/ test/

from repository's root.

All tests should also pass. To run these manually do:

npm test

If you are making any game engine changes, these will not be accepted without unit tests to cover them.

Build Status

CircleCI Travis Build