/SpaceCommand

The start of a two dimensional, strategic, highly playable, customizable (Ship designer / scenario designers), space game.

Primary LanguageTypeScript

SpaceCommand

The start of a two dimensional, strategic, highly playable, space adventure game involving asteroids, space combat, planetry landings.

Written in Typescript, using visual Studio Code and using webpack to transpile to bundle.js.

Menu

Initial Starting point is Asteroids and Lander Game

Asteroids

Lander

To build:

  1. Download the Space Command files from github to your dev directory using git clone
  2. You will need npm (node package manager). To install goto nodejs download page.
  3. You will need the typescript compiler. Use npm to install typescript globally: npm install typescript -g
  4. You need to download the js dependencies into the node_modules directory using: npm install.
  5. Build the project by: npm run build. This runs webpack on the project using the tsconfig.json and webpack.config.js settings.
  6. You can run the jest tests using: npm run test or npx jest

To Run locally:

The whole project compiles to javascript. Goto the directory and open the file index.html in chrome.

Play online

The game is hosted on a free hosting provider at: http://spacecommand.000webhostapp.com/ If you do not hear the sound initially - press f5 to refresh.

To host on a server

A good article explaining the issues is here: https://medium.freecodecamp.org/how-to-set-up-a-typescript-project-67b427114884 Will add node start and used http-server soon. (will try hosting the canvas element inside a react component soon) To host, it is made easily possible with Visual Studio Code and the Live Server extension.

  1. Open Visual Studio Code.
  2. Download the Live Server extension in Visual Studio Code extensions
  3. Click "Go Live" icon to start up a web service connected to your source code via a web socket. It will open up a browser window. (use Chrome and navigate to the localhost service and portnumber)

Controls

Keys only - no mouse atm.

In Menu mode:

  • Up/Down Arrow to select menu item
  • Enter to select.
  • In Game Mode:

  • Left/Right Arrow to rotate ship.
  • Up Arrow to thrust
  • Space to fire
  • Z/X to zoom in and out
  • Esc to return to menu
  • F5 to reload and reset game

  • Game concept

    Player starts with a small ship. Gaining money and resources by completing missions. Can then start to build a fleet, where each ship can be controlled directly or commanded with higher level commands. Each ship can be customised and upgraded. One player campaign against AI component in galaxy or multiplayer vs others by server.

    Game moves between different states: space, planet landing, planet surface.

    Ships:

    Each has own characteristic, weapons (lasers, phasers, bullets, missiles), defense (shields, tractor beams)

    Planets:

    Build mines, factories, make weapons, ships, defenses. Eventually to involve trade, inter solar system exploration, mining.

    Todo

    More Unit tests around the physics using jest sound weapons defence