Skip to content

AndresMWeber/ironhack-mars-rover-kata

Repository files navigation

🌌🚀🤖☄️🌑🌌

Ironhack Mars Rover Kata License: MIT Auto-build dist Netlify Status

📝 Table of Contents

🧐 About

A JS canvas-based Mars Rover Simulator written in JavaScript (Node.js).

Deployments
Play Live on GHPages
Play Live on Netlify

🕹️ 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:

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

node index.js

or

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 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

🎉 Acknowledgements

  • Tania Rascia I used her Snek.js game as a template for the v2 ui/terminal based blessed rendering.

👾 Sprites

⛏️ Built Using

⚖ License

This project is open source and available under the MIT 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
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
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