blast_mavens_multiplayer 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/bin/blast_mavens CHANGED
@@ -2,6 +2,9 @@
2
2
  require 'rubygems'
3
3
  require "gosu"
4
4
 
5
- $:.unshift File.expand_path('../../lib', __FILE__)
6
- require 'processor'
5
+ BLAST_ROOT = File.expand_path('../..', __FILE__)
6
+ BLAST_IMG_PATH = BLAST_ROOT + '/resources/images/'
7
+ BLAST_MAP_PATH = BLAST_ROOT + '/resources/maps/'
8
+ BLAST_SND_PATH = BLAST_ROOT + '/resources/sounds/'
9
+ require BLAST_ROOT + '/lib/processor'
7
10
  Processor.new
data/lib/bomb.rb CHANGED
@@ -5,7 +5,7 @@ class Bomb
5
5
  def initialize(x,y)
6
6
  register!(x, y)
7
7
  @t_size = Processor::TileSize
8
- @sprites = Gosu::Image.load_tiles(Processor.game_window, "resources/images/dynamite.png", @t_size, @t_size, false)
8
+ @sprites = Gosu::Image.load_tiles(Processor.game_window, BLAST_IMG_PATH + "dynamite.png", @t_size, @t_size, false)
9
9
  @time_counter = 80
10
10
  @sprite_index = 0
11
11
  @solid = false
data/lib/explosion.rb CHANGED
@@ -5,7 +5,7 @@ class Explosion
5
5
  def initialize(x,y)
6
6
  register!(x, y)
7
7
  @t_size = Processor::TileSize
8
- @sprites = Gosu::Image.load_tiles(Processor.game_window, "resources/images/explosion.png", @t_size, @t_size, false)
8
+ @sprites = Gosu::Image.load_tiles(Processor.game_window, BLAST_IMG_PATH + "explosion.png", @t_size, @t_size, false)
9
9
  @time_counter = 20
10
10
  @sprite_index = 0
11
11
  end
data/lib/game_window.rb CHANGED
@@ -4,13 +4,13 @@ class GameWindow < Gosu::Window
4
4
  self.caption = Processor::Caption
5
5
  @players_hit = {:player_0 => [], :player_1 => []}
6
6
  @finish_game = false
7
- @song = Gosu::Song.new(self, 'resources/sounds/battle.mp3')
7
+ @song = Gosu::Song.new(self, BLAST_SND_PATH + 'battle.mp3')
8
8
  @song.volume = 0.3
9
9
  @song.play(true)
10
10
  end
11
11
 
12
12
  def map
13
- @map ||= Map.new('resources/maps/basic.txt')
13
+ @map ||= Map.new(BLAST_MAP_PATH + 'basic.txt')
14
14
  end
15
15
 
16
16
  def draw
data/lib/map.rb CHANGED
@@ -5,7 +5,7 @@ class Map
5
5
  def initialize(path)
6
6
  @path = path
7
7
  @t_size = Processor::TileSize
8
- @set = Gosu::Image.load_tiles(Processor.game_window, 'resources/images/tileset.png', @t_size, @t_size, true)
8
+ @set = Gosu::Image.load_tiles(Processor.game_window, BLAST_IMG_PATH + 'tileset.png', @t_size, @t_size, true)
9
9
  register_solid_tiles
10
10
  end
11
11
 
data/lib/menu_window.rb CHANGED
@@ -2,13 +2,13 @@ class MenuWindow < Gosu::Window
2
2
  def initialize
3
3
  super(*Processor::Screen)
4
4
  self.caption = Processor::Caption
5
- @pointer = Gosu::Image.new(self,"resources/images/cursor.png",true)
6
- @background = Gosu::Image.load_tiles(self, 'resources/images/menu.png', 1024, 768, true).first
7
- @title = Gosu::Image.load_tiles(self, 'resources/images/title.png', 350, 80, true)
8
- @new_game = Gosu::Image.load_tiles(self, 'resources/images/newgame.png', 150, 40, true)
9
- @options = Gosu::Image.load_tiles(self, 'resources/images/options.png', 150, 40, true)
10
- @exit_game = Gosu::Image.load_tiles(self, 'resources/images/exitgame.png', 150, 40, true)
11
- @song = Gosu::Song.new(self, 'resources/sounds/menu.wav')
5
+ @pointer = Gosu::Image.new(self, BLAST_IMG_PATH + "cursor.png",true)
6
+ @background = Gosu::Image.load_tiles(self, BLAST_IMG_PATH + 'menu.png', 1024, 768, true).first
7
+ @title = Gosu::Image.load_tiles(self, BLAST_IMG_PATH + 'title.png', 350, 80, true)
8
+ @new_game = Gosu::Image.load_tiles(self, BLAST_IMG_PATH + 'newgame.png', 150, 40, true)
9
+ @options = Gosu::Image.load_tiles(self, BLAST_IMG_PATH + 'options.png', 150, 40, true)
10
+ @exit_game = Gosu::Image.load_tiles(self, BLAST_IMG_PATH + 'exitgame.png', 150, 40, true)
11
+ @song = Gosu::Song.new(self, BLAST_SND_PATH + 'menu.wav')
12
12
  @new_game_index = @options_index = @exit_game_index = 1
13
13
  @song.play(true)
14
14
  @song.volume = 0.3
data/lib/player.rb CHANGED
@@ -6,10 +6,10 @@ class Player
6
6
  @t_size = Processor::TileSize
7
7
  #more animation to come
8
8
  @facing = :down
9
- @animation_sprites = {:left => Gosu::Image.load_tiles(Processor.game_window, "resources/images/player_left#{@index}.png", @t_size, @t_size, false),
10
- :down => Gosu::Image.load_tiles(Processor.game_window, "resources/images/player_down#{@index}.png", @t_size, @t_size, false),
11
- :up => Gosu::Image.load_tiles(Processor.game_window, "resources/images/player_up#{@index}.png", @t_size, @t_size, false),
12
- :right => Gosu::Image.load_tiles(Processor.game_window, "resources/images/player_right#{@index}.png", @t_size, @t_size, false)}
9
+ @animation_sprites = {:left => Gosu::Image.load_tiles(Processor.game_window, BLAST_IMG_PATH + "player_left#{@index}.png", @t_size, @t_size, false),
10
+ :down => Gosu::Image.load_tiles(Processor.game_window, BLAST_IMG_PATH + "player_down#{@index}.png", @t_size, @t_size, false),
11
+ :up => Gosu::Image.load_tiles(Processor.game_window, BLAST_IMG_PATH + "player_up#{@index}.png", @t_size, @t_size, false),
12
+ :right => Gosu::Image.load_tiles(Processor.game_window, BLAST_IMG_PATH + "player_right#{@index}.png", @t_size, @t_size, false)}
13
13
  @bombs = []
14
14
  @explosions = []
15
15
  @move_control = {[Gosu::Button::KbA, Gosu::Button::KbLeft] => [:left, [-1, 0],[0, 0, 0, 40]],
@@ -21,9 +21,6 @@ class Player
21
21
  @img_index = 4
22
22
 
23
23
  @x = @y = [@t_size * 1 + 1, @t_size * 14 + 1][@index]
24
- # if @index == 1
25
- # @brain = BasicBrain.new(self, Processor.players[0])
26
- # end
27
24
  end
28
25
 
29
26
  def draw
data/lib/processor.rb CHANGED
@@ -13,7 +13,7 @@ require 'game_over_window'
13
13
  class Processor
14
14
  Screen = [1024, 768, false]
15
15
  TileSize = 48
16
- Caption = "Blast Mavens: Multiplayer Beta v0.1.2"
16
+ Caption = "Blast Mavens: Multiplayer Beta v0.1.3"
17
17
  class << self
18
18
  attr_reader :game_window
19
19
  attr_accessor :players
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blast_mavens_multiplayer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - tjbladez