Git Product home page Git Product logo

spacecake's Introduction

Spacecake

Installation

Node.js

You need to install Node.js with the following packages:

  • serialport
  • express

Arduino

You have to flash spacecake.ino onto an Arduino Uno or Nano, for example with Arduino IDE. The Arduino has to be connected via USB to the computer and show up as serial port /dev/ttyUSB0.

It is also possible to play with the keyboard. Use the a, s, d and f keys.

Hardware

Connect four push buttons between ground and pins 13, 12, 11 and 10 of the Arduino.

How to run

After installing everything, run node server.js and open localhost:3000 in your browser.

spacecake's People

Contributors

ulf-vom-mond avatar

Watchers

 avatar

spacecake's Issues

fly-away animation

add an animation that shows the spacecraft flying away into the far universe when flying out of the screen

statistics

record statistics like the following, per game and in total:

  • total distance traveled
  • total angle turned
  • full rotations made
  • total obstacles avoided
  • fuel consumed
  • number of near misses
  • number of power-ups consumed
  • distance traveled in the wrong direction
  • number of collisions
  • number of deaths by collision and by other causes

collect bonus points

get some extra score or score multiplier for:

  • near misses
  • high speed
  • good coordination (turning on thrusters simultaneously)

game-over screen

add a final screen which shows the score, some statistics, a highscore list and gives the option to restart (maybe when all buttons are pressed for some time)

Power-Ups

Add power-ups that can be collected and give you a special skill for some time. For example:

  • don't die at collision but bounce
  • double scoring
  • better control (more friction?)
  • repair kits/extra lives (only makes sense when you don't die instantly on collision)
  • a magnet to attract other collectables
  • freeze obstacles so they don't move
  • become smaller
  • delete obstacles

negative collectables could be possible, too:

  • attract obstacles
  • earn only half of the score
  • worse control (less friction, more power)
  • damage
  • make obstacles faster
  • become bigger
  • more obstacles

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.