spaceship

command module
v0.0.0-...-ebd1148 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

README

Spaceship Game

This is a classic arcade-style game created in Go. In this game, players take command of a spaceship as it flies through a meteor shower. The goal is to protect the spaceship by destroying incoming meteorites while navigating to avoid collisions.

Game Start

Linux
  • Download a zip file spaceship-linux-latest.zip from a release page.
  • Unpack the downloaded archive
  • Open your terminal
  • Run the game
    $ <path-to-unpacked-folder/spaceship.exe
    

If everything works fine, a console will display a game screen. Use the arrow keys to move and press the space key to shoot.

presentation

Windows

A Windows version struggles with perfomance issues that affect the gaming experience. However, you can still launch the Windows version by following these steps:

  • Download a zip file spaceship-windows-latest.zip from a release page.
  • Unpack the downloaded archive
  • Run cmd.exe or Windows PowerShell
  • Run the game
    <path-to-unpacked-folder>\spaceship.exe
    
    For example, if the game was unpacked to C:\Games\spacehip-windows-latest, enter C:\Games\spacehip-windows-latest\spaceship.exe and press Enter. To exit, press Escape.

If everything works fine, a console will display a game screen. Use the arrow keys to move and press the space key to shoot.

Development

Prerequisites

Go v.1.20 should be already installed.

Installing

Open a project root directory in a console and install project dependencies:

go mod tidy
Quick Start

Run the game:

go run main.go

If everything works fine, a console will display a game screen.

Tests

Run the project tests:

go test ./...
Additional Info

You can collect logs and cpu profile info in a file.

go run main.go --debug true --log_file=spaceship.log --cpuprofile=cpu.out

Acknowledgements

The inspiration for this project comes from a Python developer course at dvmn.org.

License

This project is licensed under the GNU GPLv3 License - see the LICENSE file for details

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL