Giter VIP home page Giter VIP logo

space-invaders's Introduction

Classic Space Invaders Game

logo

Features

  • Player moves ship horizontally by pressing on keyboard ✔️
  • Player shoot aliens, which can move horizontally & vertically ✔️
  • When bullet reach alien, alien disappear & total score increase ✔️
  • Aliens can shoot too. When alien hit player, his lives decrease ✔️
  • Player can hide behind obstacles
  • Game ends when player lives become 0 ✔️
  • Game has record table ✔️
  • Game has sounds effects ✔️

Demo

demo.mov

Installation

Launch

ruby lib/space_invaders.rb

Other resources

space-invaders's People

Contributors

dependabot[bot] avatar fargelus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

space-invaders's Issues

Replace Mongo by SQLite

It's better use that tools which is widely supported and won't require install additional deps.

Specs

Project require to be tested. Now all features blindly injected.

Release

Prepare project to release on RubyGems.

Game Levels

Game has only one repeated level, implementing other ones would be great.

CI

Setup Github Actions for running specs wouldn't be bad option.

it crashes due to a NoMethodError

Hi,
am I too fast?

space-invaders-master/lib/space_invaders/game_objects/image_objects/ship.rb:100:in block in retarget_gun!': undefined method x' for nil:NilClass (NoMethodError)

    bullet.target = @enemies.find(bullet.target.x)
                                               ^^
from space-invaders-master/lib/space_invaders/game_objects/image_objects/ammo.rb:52:in `block in bullets_without_target'
from space-invaders-master/lib/space_invaders/game_objects/image_objects/ammo.rb:52:in `each'
from space-invaders-master/lib/space_invaders/game_objects/image_objects/ammo.rb:52:in `bullets_without_target'
from space-invaders-master/lib/space_invaders/game_objects/image_objects/ship.rb:99:in `retarget_gun!'
from space-invaders-master/lib/space_invaders/game_objects/image_objects/ship.rb:71:in `draw'
from space-invaders-master/lib/space_invaders/scenes/main_scene.rb:50:in `each'
from space-invaders-master/lib/space_invaders/scenes/main_scene.rb:50:in `draw'
from space-invaders-master/lib/space_invaders/game.rb:21:in `draw'
from /usr/local/lib/ruby/gems/3.1.0/gems/gosu-1.4.3/lib/gosu/patches.rb:64:in `tick'
from lib/space_invaders.rb:6:in `<main>'

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.