Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/andresmweber/ironhack-mars-rover-kata

Ironhack's Javascript Challenge
https://github.com/andresmweber/ironhack-mars-rover-kata

canvas canvas2d game ironhack javascipt javascript javascript-game rover rover-simulator simulation

Last synced: about 1 month ago
JSON representation

Ironhack's Javascript Challenge

Awesome Lists containing this project

README

        

# 🌌🚀🤖☄ī¸đŸŒ‘đŸŒŒ

# Ironhack Mars Rover Kata [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) ![Auto-build dist](https://github.com/AndresMWeber/ironhack-mars-rover-kata/workflows/Auto-build%20dist/badge.svg) [![Netlify Status](https://api.netlify.com/api/v1/badges/ddf947f8-202e-4b57-a02b-c95fbc0cc416/deploy-status)](https://app.netlify.com/sites/mars-rover-kata/deploys)

## 📝 Table of Contents

- [About](#about)
- [How To Play](#howto)
- [Installing](#installing)
- [Running](#running)
- [Log Files](#log_files)
- [Authors](#authors)
- [Acknowledgments](#acknowledgements)
- [Built Using](#built_using)
- [License](#license)
- [Version History](#history)

## 🧐 About

A JS canvas-based Mars Rover Simulator written in JavaScript (Node.js).
| Deployments |
| :---------: |
| [Play Live on GHPages](https://andresmweber.github.io/ironhack-mars-rover-kata/) |
| [Play Live on Netlify](https://mars-rover-kata.netlify.app/) |

## 🕹ī¸ How To Play
### Hotkeys:





Mars Rover Demo Gif




Control Scheme





Web


Left
A


Right
D


Up
W


Down
S


Pause
Spacebar


Quit
Escape or CTRL + C





## ⌨ī¸ Installing

### 🚀 Clone from repository and install dependencies

Just clone the repo and inside the main directory install it:

```bash
git clone https://github.com/andresmweber/ironhack-mars-rover-kata
cd ironhack-mars-rover-kata
npm install
```
### 🏃 Run

Now you can run it with either
```bash
node index.js
```
or
```bash
npm run-script play
```
Feel free to just hit `Enter` twice and run the game in default mode (you can read the defaults on the prompts).

## 📋 Log Files

After running the simulation it will always generate a log file you can look at to see the steps and travel log in more detail.
The filename is in the format: ```roverLog_DD-MM-YYYY_HH-MM-SS.log``` and you will find it in the directory you ran the script from.
Here is an [example log file](media/sample_log_file.log) generated from the gif above.

Notice the travel map at the end which shows you the path they've taken. Note that it will not show you if the rover has been over a spot multiple times, just shows the path with overlaps.

## đŸ’ŗ Credits
### ✍ī¸ Authors
- [Andres Weber](https://www.github.com/andresmweber)

### 🎉 Acknowledgements
- [Tania Rascia](https://github.com/taniarascia) I used her [Snek.js](https://github.com/taniarascia/snek/) game as a template for the v2 ui/terminal based blessed rendering.

### 👾 Sprites
- [Andres Weber](https://www.piskelapp.com/user/5716277421670400/public)

## ⛏ī¸ Built Using

- [NodeJS](https://www.nodejs.org/) - Web Server
- [JavaScript](https://www.javascript.com/) - Front End
- [SCSS](https://sass-lang.com/) - Styling
- [Webpack](https://webpack.js.org/) - Asset Bundling
- [Piskel](https://www.piskelapp.com/) - Pixel Art Creation

## ⚖ License
This project is open source and available under the [MIT License](LICENSE).

## 📊 Version History

| Version | Description | Demo |
| :------ | :---------- | :--: |
| 1.0.0 | The first version was a simple simulation where all rovers were automated on a preset grid. | ![demo1.gif](media/demo_v1.gif) |
| 2.0.0 | The second version was a simple simulation where the player rover movements were based on user input and all npc rovers were automated on a user input size grid. | ![demo1.gif](media/demo_v2.gif) |
| 3.0.0 | The third version uses webpack to bundle assets and utilizes the canvas to draw custom sprites by employing the previously employed MVC architecture. | ![demo2.gif](media/demo_v3.gif) |