Git Product home page Git Product logo

tank_island's Introduction

Tank Island

Tank Island is an open source 2D top down shooter game that was created with Ruby using Gosu game development library while writing this book.

Screenshots

Tank Island Game

Tank Island Game

Gameplay video on YouTube

Book: Developing Games With Ruby

Complete process of building this game is described step by step in this free to read book:

Developing Games With Ruby

Installation

Before installing, make sure you have:

  • Ruby installed, preferably through rbenv, not rvm.
  • ImageMagick (gem install rmagick should work).
  • Gosu prerequisites for Mac, Linux or Windows

To install it, run

$ gem install tank_island

Starting the game

There are several ways to start the game.

Running in 800x600 window mode

$ tank_island

Running with custom resolution

$ w=1600 h=1200 tank_island

Running full screen with custom resolution

$ fs=1 w=1200 h=800 tank_island

Controls

Gameplay

  • W A S D moves your tank.
  • Mouse left click shoots.
  • ESC goes into menu and away from it.

Debugging

  • R respawns your tank.
  • T spawns an enemy tank under mouse cursor.
  • F1 enters debug mode.
  • F2 toggles profiling

tank_island's People

Contributors

spajus avatar willardgmoore avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

tank_island's Issues

Doesn't seem to start on Ubuntu 14.04

After installing Gosu dependencies, the game installed OK, but failed to launch:

tank_island 
/home/gintaras/.rvm/gems/ruby-2.1.3/gems/tank_island-1.0.0/lib/game_states/demo_state.rb:1:in `<top (required)>': uninitialized constant PlayState (NameError)
    from /home/gintaras/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/gintaras/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/gintaras/.rvm/gems/ruby-2.1.3/gems/tank_island-1.0.0/bin/tank_island:24:in `block in <top (required)>'
    from /home/gintaras/.rvm/gems/ruby-2.1.3/gems/tank_island-1.0.0/bin/tank_island:23:in `each'
    from /home/gintaras/.rvm/gems/ruby-2.1.3/gems/tank_island-1.0.0/bin/tank_island:23:in `<top (required)>'
    from /home/gintaras/.rvm/gems/ruby-2.1.3/bin/tank_island:23:in `load'
    from /home/gintaras/.rvm/gems/ruby-2.1.3/bin/tank_island:23:in `<main>'
    from /home/gintaras/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `eval'
    from /home/gintaras/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `<main>'

Can't start on Linux

Hello,

I'm trying to run this on Linux but it fails

$ tank_island 
/home/qubodup/.gem/ruby/2.2.0/gems/tank_island-1.0.3/lib/entities/components/tank_health.rb:1:in `': uninitialized constant Health (NameError)
    from /usr/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/qubodup/.gem/ruby/2.2.0/gems/tank_island-1.0.3/bin/tank_island:24:in `block in '
    from /home/qubodup/.gem/ruby/2.2.0/gems/tank_island-1.0.3/bin/tank_island:23:in `each'
    from /home/qubodup/.gem/ruby/2.2.0/gems/tank_island-1.0.3/bin/tank_island:23:in `'
    from /home/qubodup/.gem/ruby/2.2.0/bin/tank_island:23:in `load'
    from /home/qubodup/.gem/ruby/2.2.0/bin/tank_island:23:in `'

Game Crash

Hi Spajus!
Thank you for this great game! But for me it's not working. I tried to install it according to you,
but it says:

/var/lib/gems/2.7.0/gems/gosu_texture_packer-0.1.8/lib/gosu_texture_packer/tileset.rb:12:in `read': no implicit conversion of GameWindow into String (TypeError)

Do you have a clue?
With dear greetings
Hibiscus

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.