{"id":17772069,"url":"https://github.com/amirrajan/nodekick","last_synced_at":"2025-08-08T10:33:15.884Z","repository":{"id":68042891,"uuid":"14399511","full_name":"amirrajan/nodekick","owner":"amirrajan","description":"multiplayer fighting game","archived":false,"fork":false,"pushed_at":"2018-02-04T03:53:21.000Z","size":19932,"stargazers_count":23,"open_issues_count":29,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-03T06:33:13.762Z","etag":null,"topics":["game","nodejs","websocket"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amirrajan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-11-14T15:53:33.000Z","updated_at":"2024-12-29T16:31:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"2ad39ff0-b81d-4f05-9903-5a07ba037c96","html_url":"https://github.com/amirrajan/nodekick","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amirrajan/nodekick","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirrajan%2Fnodekick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirrajan%2Fnodekick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirrajan%2Fnodekick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirrajan%2Fnodekick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amirrajan","download_url":"https://codeload.github.com/amirrajan/nodekick/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirrajan%2Fnodekick/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269408876,"owners_count":24412133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game","nodejs","websocket"],"created_at":"2024-10-26T21:37:54.527Z","updated_at":"2025-08-08T10:33:15.855Z","avatar_url":"https://github.com/amirrajan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nodekick\n\n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-sa/2.0/\"\u003e\u003cimg alt=\"Creative Commons License\" style=\"border-width:0\" src=\"http://i.creativecommons.org/l/by-nc-sa/2.0/88x31.png\" /\u003e\u003c/a\u003e\u003cbr /\u003eThis work is licensed under a \u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-sa/2.0/\"\u003eCreative Commons Attribution-NonCommercial-ShareAlike 2.0 Generic License\u003c/a\u003e.\n\nNodekick is a realtime, multiplayer fighting game built using NodeJS, socket.io, and pixi.js.\n\nThis codebase is a cleaned up version of what our team built for Node Knockout 2013. Out of 385 teams, we placed 15th overall and 6th in the \"fun/utility\" category.\n\n# Screenshots and Instruction to deploy your own Nodekick.\n\n\u003cimg src=\"nodekick.gif\" /\u003e\n\n## Run Locally\n\n**Due to the use of websockets (and time sensitive game events over those sockets), this game server will not perform well on a Windows machine (tested on Windows 7).**\n\nInstall node:\n\n```\nbrew install node\nbrew upgrade node\n```\n\nClone the repo:\n\n```\ngit clone REPO_URL\ncd REPO_DIRECTORY\n```\n\nInstall all the dependencies:\n\n    npm install\n\nRun the app:\n\n    npm start\n\nThen navigate to `http://localhost:3000` (use chrome or firefox).\n\n## Signing up, and deploying to Heroku\n\n### Documentation\n\nFrom heroku.com, click Documentation, then click the Getting Started button, then click Node.js from the list of options on the left...which will take you here: https://devcenter.heroku.com/articles/nodejs\n\nInstall Heroku toolbelt from here: https://toolbelt.heroku.com/\n\nSign up via the website (no credit card required).\n\nLogin using the command line tool:\n\n    heroku login\n\nCreate your heroku app:\n\n    heroku create\n\nGit deploy your app:\n\n    git push heroku master\n\nOpen the app (same as opening it in the browser):\n\n    heroku open\n\nAnd your app should be up on Heroku.\n\n# Deploy to Infrastructure as a Service\n\nThe deployment instructions thus far have been about deploying to PaaS. You can spin up your own linux box and deploy Nodekick (or any other NodeJS app for that matter). This is of course a bit harder, but you'll have fine grained control over your box as opposed to being constrained to what PaaS provides.\n\n## Signing up and deploying to Amazon EC2\n\nSign up for Amazon AWS at http://aws.amazon.com/\n\nTake note of any Access and Secret Keys provided during the sign up process, you won't get another chance to look at these.\n\n## AWS CLI Installation\n\n### Automatic\n\nAfter this, you'll want to install the Amazon CLI, instructions located here: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html\n\n### Clutch\n\nI found that AWS CLI is open source. So I decided to build it from its source as opposed to installing it.\n\nFirst I cloned the repo\n\n    git clone https://github.com/aws/aws-cli\n\nThe source is written in Python. So you'll have to install that based on whatever OS you are running. Brew, apt-get flavors, and chocolatey all have a means to install Python.\n\nAfter cloning the repo, I checked out the latest tag (at this point it was `1.11.35`)\n\n    git checkout tags/1.11.35\n\nI then built and installed.\n\n    python setup.py build\n    python setup.py install\n\nThere is a good chance (especially if you are developing on a Mac), that the above commands would have also moved the generated executable files to an appropriate location which is already referenced in your `$PATH` environment variable. Try running\n\n    aws help\n\nIf you get an error saying that the command was not found, then you would need to manually ensure that the generated files are referenced in `$PATH`.\n\nLooking at the console output of the build, the files were copied to `build/scripts-2.7` (this may be different for your OS). Navigating to this directory, I then ran\n\n    python aws\n\nWhich yielded results.\n\nNow that we have a successful build, move the scripts to a location of your choosing and expose the directory to `$PATH`.  I chose to put the scripts in `/usr/local/aws-cli/bin`\n\nAfter moving the scripts over, I added the following line to my `.bashrc`. If you are on windows, you can place the directory in the `C:` drive and manipulate the path variable by right clicking My Computer, Properties, Advanced.\n\n    export PATH=\"/usr/local/aws-cli/bin:$PATH\"\n\nAfter you have updated your `.bashrc` or the Environment Variables (and have sourced the new file... or restarted your computer), you should be able to run the `aws` command from anywhere.\n\n##Configuring AWS CLI\n\nThis section is based on the documentation located here: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html\n\nThe simplest way to use a configuration file with the AWS CLI is to name it config and place it in a folder named .aws in your home directory. On Windows, that would look like C:\\Users\\USERNAME\\.aws\\config. On Linux, OS X, or Unix, that is ~/.aws/config. The AWS CLI will automatically check this location for a configuration file.\n\nStart by creating an empty configuration file.\n\n    mkdir ~/.aws\n    touch ~/.aws/config\n\nYou'll need to provide your Access Key, Secret Key, Region and Output Format. Here is a sample config file.\n\n    [default]\n    aws_access_key_id=REDACTED\n    aws_secret_access_key=REDACTED\n    region=us-east-1\n    output=json\n\nA full region list can be found here: http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region\n\nYou can go to https://console.aws.amazon.com/iam/home?#security_credential to see your security credentials, but the secret access key is only shown **once**. If you didn't write down your secret key, you can create a new one here.\n\n## Generating a Key Pair for SSH\n\nYou can log into boxes by using a key pair (as opposed to using a password). You have to associate your key pair when you create the instances. So we'll set up the key pair first. The following command creates a key pair and saves the return value to a file (the data that is returned is important, and must be saved on creation).\n\n    aws ec2 create-key-pair --key-name nodeboxes --query 'KeyMaterial' --output text \u003e nodeboxes.pem\n\n## Creating a Security Group for you NodeJS Apps\n\nWe also want to create a security group for our NodeJS applications. This will also be associated with the instance we create.\n\n    aws ec2 create-security-group --group-name \"nodeapps\" --description \"NodeJS Applications\"\n\nWhich will return something like:\n\n    {\n        \"return\": \"true\",\n        \"GroupId\": \"GROUPID\"\n    }\n\nAfter we have the security group created, we need to set up ssh and http ports.\n\n    aws ec2 authorize-security-group-ingress --group-name nodeapps --protocol tcp --port 22 --cidr 0.0.0.0/0\n    aws ec2 authorize-security-group-ingress --group-name nodeapps --protocol tcp --port 80 --cidr 0.0.0.0/0\n\n## Creating an EC2 Instance\n\nYou can run the `aws ec2 describe-images` command to see all images you have access to (it will take a while to return). I ended up going to the Create Instance page on the website to find the Ubuntu 13 micro instances I wanted to spin up. The rest of the instructions assume that you are using an Ubuntu 13 box.\n\nHere is the command that returns the Ubuntu 14 box I ended up cloning:\n\n    aws ec2 describe-images help\n    aws ec2 describe-images --filters Name=image-id,Values=ami-ad184ac4\n    aws ec2 describe-images --filters Name=name,Values=\"*Ubuntu*\"\n\nTo create an ec2 instance for this image (and associate it with the key pair and security group we just created). Run the following command:\n\n    aws ec2 run-instances --image-id ami-60f37908 --count 1 --instance-type t1.micro --security-groups nodeapps --key-name nodeboxes\n\nYou can then run `aws ec2 describe-instances | grep PublicDnsName` to get the public dns.\n\nWith the dns information and the .pem file, you should be able to ssh into the box (git bash on Windows has an ssh client). Here is the command to log into the box. First we need to edit the permissions of the .pem file, then we should be able to log in.\n\n    chmod 600 ~/.aws/nodeboxes.pem\n    ssh-add ~/.aws/nodeboxes.pem\n    ssh ubuntu@PUBLICDNS\n\nIf you mess up the creation of your instance, you can delete it using the following command:\n\n    aws ec2 terminate-instances --instance-ids INSTANCEID\n\nYou can then run `aws ec2 describe-instances` to get the instance id.\n\n## Setting up NodeJS on the EC2 Instance\n\nOnce you've ssh'ed into the box. We'll use `apt-get` to install the programs needed to retrieve, compile and run our app.\n\n    sudo apt-get update\n    sudo apt-get install nginx\n    sudo apt-get install gcc\n    sudo apt-get install g++\n    sudo apt-get install make\n    sudo apt-get install openssl\n    sudo apt-get install git\n\nTo install node and npm, we will\nuse [nvm](https://github.com/creationix/nvm), which is a nice tool to\nmanage, and have different versions of node co-exist on the same\nmachine. Use the install script for the latest version\nfound [here](https://github.com/creationix/nvm#install-script) (you\nmay choose to precede the command with `sudo`). Then, install the\nlatest version of node and npm:\n\n    nvm install node\n\nNow lets start and configure nginx (it will act as a reverse proxy and send all requests on port 80 to node).\n\n    sudo update-rc.d nginx on\n\nthen\n\n    sudo service nginx start\n\nNow to configure nginx. You'll need to use a text editor to do this (I use VIM).\n\n    sudo vim /etc/nginx/sites-enabled/default\n\nReplace the contents of the file with the following:\n\n    upstream node {\n        server 127.0.0.1:3000;\n        keepalive 256; # not necessary\n    }\n\n    server {\n        listen 80;\n        server_name localhost; # domain of my site\n        access_log /var/log/nginx/localhost.access.log;\n        error_log /var/log/nginx/localhost.error.log;\n\n        large_client_header_buffers 8 32k;\n\n        location / {\n            proxy_set_header X-Real-IP $remote_addr;\n            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n            proxy_set_header Host $http_host;\n            proxy_set_header X-NginX-Proxy true;\n\n            proxy_buffers 8 32k;\n            proxy_buffer_size 64k;\n\n            proxy_pass http://node;\n            proxy_redirect off;\n\n            proxy_http_version 1.1;\n            proxy_set_header Upgrade $http_upgrade;\n            proxy_set_header Connection \"upgrade\";\n\n            tcp_nodelay on; # not necessary\n        }\n     }\n\nSave the file, then restart nginx\n\n    sudo service nginx restart\n\nNow that we have nginx configured, we can clone the Nodekick repo.\n\n    cd ~/\n    git clone https://github.com/amirrajan/nodekick.git\n    cd nodekick\n    npm install\n\nAnd start up the app using `forever` (this will keep the app running even if we log off).\n\n    npm install forever -g\n\nRun the app\n\n    forever start --spinSleepTime 10000 start.js\n\nThat's it! You should now be able to hit the public IP for your box\nand should be able to play Nodekick!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirrajan%2Fnodekick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famirrajan%2Fnodekick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirrajan%2Fnodekick/lists"}