Install and Run CodeCombat Multiplayer Game on Ubuntu 16.04

28/12/2020
Chưa phân loại

CodeCombat is a multiplayer programming game for learning how to code. It’s a platform for students to learn computer science while playing through a real game.

It’s both a startup and a community project, completely open source under the MIT and Creative Commons licenses. Furthermore, it’s the largest open source CoffeeScript project by lines of code, and since it’s a game, it’s really fun to hack on.

To install CodeCombat, we need to first setup our database. The database used will be MongoDB

Install MongoDB

  • Import public key, create source list file and install database
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927  echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list  sudo apt-get update && sudo apt-get install -y mongodb-org
  • Create the service file for mongodb
cd /lib/systemd/system/  vim mongod.service
  • Paste below into the file
[Unit]  Description=High-performance, schema-free document-oriented database  After=network.target  Documentation=https://docs.mongodb.org/manual    [Service]  User=mongodb  Group=mongodb  ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf    [Install]  WantedBy=multi-user.target
  • Reload systemd service with following command
systemctl daemon-reload
  • Start mongodb service and add as a service on startup
systemctl start mongod  systemctl enable mongod

Install and run CodeCombat Multiplayer Game on Ubuntu 16.04

  • Install some needed packages
sudo apt-get install build-essential python2.7 git curl npm nodejs-legacy
  • If your default Python version is 3, then run this also
npm config set python `which python2.7`
  • Next let’s setup Git
git config --global user.name "YOUR_NAME"  git config --global user.email "YOUR_EMAIL_ADDRESS"
  • Next we start cloning the game from the repository
git clone https://github.com/codecombat/codecombat.git  cd codecombat  git remote add -f upstream https://github.com/codecombat/codecombat.git
  • Install Dependencies
npm install
  • Let’s import the latest development database and overwrite the current development database
(cd $(mktemp -d /tmp/coco.XXXXXXXX) && curl http://analytics.codecombat.com:8080/dump.tar.gz | tar xzf - && mongorestore --drop --host 127.0.0.1)
  • Run following command to startup brunch and nodemon
npm run dev
  • Open your browser and enter following URL
http://127.0.0.1:3000

Now we have our game environment running on Ubuntu 16.04

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Nextcloud [Part 1] – Cài đặt Nextcloud trên CentOS 7

Mục lục Chuẩn bị môi trường Cài đặt dịch vụ Web Cài đặt MariaDB Cài đặt PHP 7.2 Cài...
30/12/2020

Manjaro vs Arch Linux Distribution Comparison

If you’ve looked at the DistroWatch Page Hit Ranking statistics in recent months, you might have noticed that the top...
29/12/2020

Getting started with Nikto vulnerability scanner

In the past we learned how to use Nmap, Nessus and OpenVAS to look for vulnerabilities. This time we’ll explore Nikto,...
29/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Check proxy trên trang nào chuẩn nhất❓
01/11/2023

Thuê Proxy chạy Google Ads / Cần chú ý gì khi chọn proxy và email chạy G.G ads?
12/10/2023

Thuê proxy 4G ở đâu uy tín, giá rẻ, chất lượng?
05/10/2023

Vì sao cần thuê proxy xoay? Địa chỉ cung cấp proxy xoay uy tín
05/10/2023

Thuê proxy v6 kéo view Youtube ở đâu uy tín, chất lượng?
05/10/2023