Skip to content

skycoin/cx-game

Repository files navigation

cx-game

Game Prototype

CX game is a new 2D console game.

Table of Contents


Installation

cx-game requires Golang version of 1.13+

Compiling on Linux

Install dependencies with

sudo apt update
sudo apt install -y glade xvfb libxinerama-dev libxcursor-dev libxrandr-dev libgl1-mesa-dev libxi-dev libperl-dev libcairo2-dev libpango1.0-dev libglib2.0-dev libopenal-dev libxxf86vm-dev libasound2-dev make

Install Go

  • Go to Go Downloads and download from the featured downloads for linux, something like go1.16.2.linux-amd64.tar.gz
  • Extract the archive and install, you may require root or sudo
    For example:
    rm -rf /usr/local/go && tar -C /usr/local -xzf go1.16.2.linux-amd64.tar.gz
  • Add /usr/local/go/bin to the PATH environment variable.
    Or just use this for a quick check
    export PATH=$PATH:/usr/local/go/bin
  • Verify that you've installed Go by opening a command prompt and typing the following command: go version

    Following this for more.

Install git using apt

sudo apt update
sudo apt install git

You can use any other code editor, for installing sublime run these commands:

Install sublime using apt

sudo apt update
sudo apt install sublime-text

Usage

Run the program.

git clone https://github.com/skycoin/cx-game.git
cd cx-game
go mod download
go run main.go

A window should appear, with a cat use a, s, d, w to move the cat around.

Open source code in editor

cd cx-game
subl ./

Compiling on MacOS

Install Go

  • Go to Go Downloads and download from the featured downloads for Apple macOS, something like go1.16.2.darwin-amd64.pkg
  • Open the package file you downloaded and follow the prompts to install Go.
  • Verify that you've installed Go by opening a command prompt and typing the following command: go version
    Following this for more.

Install git with brew

brew install git

Install sublime with brew

brew install --cask sublime-text

Usage

Run the program.

git clone https://github.com/skycoin/cx-game.git
cd cx-game
go mod download
go run main.go

A window should appear, with a cat use a, s, d, w to move the cat around.

Open source code in editor

cd cx-game
subl ./

Compiling on Windows

Install Go

  • Go to Go Downloads and download from the featured downloads for Microsoft Windows, something like go1.16.2.windows-amd64.msi
  • Open the package file you downloaded and follow the prompts to install Go.
  • Verify that you've installed Go by opening a command prompt and typing the following command: go version
    Following this for more.

Install git from executable

  • Download git from git-scm.com
  • Open the executable and follow the prompt to install git.

Install sublime from executable

  • Go to sublime downloads page
  • Download the executable for windows
  • Open the executable and follow the prompts to install sublime.

Install MinGW

  • Download MinGW installer from here
  • Open the executable and follow the instructions.
  • Select Architecture = x86_64 as show in the picture. Alt Text
  • Now go to the installed directory and run mingw-w64.bat to add mingw to PATH.

Install OpenAL

  • Download and extract zip archive from openal.org
  • Run the installer

Usage

Opening terminal

  1. Click the Start menu.
  2. In the menu's search box, type cmd, then press the Enter key.
  3. In the Command Prompt window that appears, type the following command:

Run the program from terminal

git clone https://github.com/skycoin/cx-game.git
cd cx-game
go mod download
go run main.go

A window should appear, with a cat use a, s, d, w to move the cat around.

Open source code in editor

  • Open sublime text editor
  • Drag and drop cx-game folder into sublime text editor

Libraries Used

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.