gamebox 0.2.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +1 -8
- data/Rakefile +13 -37
- data/TODO.txt +27 -27
- data/docs/getting_started.rdoc +2 -2
- data/gamebox.gemspec +33 -191
- data/lib/gamebox.rb +18 -14
- data/lib/gamebox/actor.rb +37 -27
- data/lib/gamebox/actor_factory.rb +4 -5
- data/lib/gamebox/actor_view.rb +8 -0
- data/lib/gamebox/actors/collidable_debugger.rb +2 -2
- data/lib/gamebox/actors/curtain.rb +3 -3
- data/lib/gamebox/actors/emitter.rb +51 -0
- data/lib/gamebox/actors/label.rb +27 -7
- data/lib/gamebox/actors/logo.rb +1 -1
- data/lib/gamebox/actors/spatial_debugger.rb +25 -10
- data/lib/gamebox/arbiter.rb +61 -34
- data/lib/gamebox/behavior.rb +3 -3
- data/lib/gamebox/behaviors/animated.rb +1 -1
- data/lib/gamebox/behaviors/audible.rb +1 -1
- data/lib/gamebox/behaviors/collidable.rb +9 -4
- data/lib/gamebox/behaviors/collidable/aabb_collidable.rb +26 -1
- data/lib/gamebox/behaviors/collidable/circle_collidable.rb +3 -3
- data/lib/gamebox/behaviors/collidable/polygon_collidable.rb +1 -1
- data/lib/gamebox/behaviors/graphical.rb +30 -4
- data/lib/gamebox/behaviors/layered.rb +1 -1
- data/lib/gamebox/behaviors/physical.rb +113 -30
- data/lib/gamebox/behaviors/timed.rb +33 -0
- data/lib/gamebox/behaviors/updatable.rb +1 -1
- data/lib/gamebox/class_finder.rb +1 -21
- data/lib/gamebox/console_app.rb +33 -31
- data/lib/gamebox/constants.rb +481 -0
- data/lib/gamebox/data/config/objects.yml +7 -0
- data/lib/gamebox/gamebox_application.rb +10 -33
- data/lib/gamebox/gamebox_generator.rb +32 -32
- data/lib/gamebox/input_manager.rb +73 -32
- data/lib/gamebox/lib/inflector.rb +1 -1
- data/lib/gamebox/lib/range_ext.rb +5 -0
- data/lib/gamebox/lib/rect.rb +548 -548
- data/lib/gamebox/lib/sorted_list.rb +1 -1
- data/lib/gamebox/lib/symbol_ext.rb +8 -0
- data/lib/gamebox/physical_director.rb +1 -1
- data/lib/gamebox/physical_stage.rb +3 -3
- data/lib/gamebox/physics.rb +0 -3
- data/lib/gamebox/resource_manager.rb +22 -17
- data/lib/gamebox/sound_manager.rb +3 -2
- data/lib/gamebox/spatial_hash.rb +60 -31
- data/lib/gamebox/spatial_stagehand.rb +30 -6
- data/lib/gamebox/spec/helper.rb +7 -7
- data/lib/gamebox/stage.rb +18 -19
- data/lib/gamebox/stage_manager.rb +33 -23
- data/lib/gamebox/stagehand.rb +3 -0
- data/lib/gamebox/svg_document.rb +1 -1
- data/lib/gamebox/tasks/gamebox_tasks.rake +133 -0
- data/lib/gamebox/templates/actor.erb +0 -2
- data/lib/gamebox/templates/actor_view.erb +1 -3
- data/lib/gamebox/templates/template_app/Gemfile +3 -2
- data/lib/gamebox/templates/template_app/Rakefile +3 -8
- data/lib/gamebox/templates/template_app/config/environment.rb +7 -39
- data/lib/gamebox/templates/template_app/src/demo_stage.rb +1 -2
- data/lib/gamebox/templates/template_app/src/my_actor.rb +0 -3
- data/lib/gamebox/version.rb +2 -2
- data/lib/gamebox/viewport.rb +44 -8
- data/lib/gamebox/views/graphical_actor_view.rb +22 -16
- data/lib/gamebox/wrapped_screen.rb +9 -1
- data/script/perf_spatial_hash.rb +49 -58
- data/script/perf_struct_vs_array.rb +32 -0
- data/spec/actor_factory_spec.rb +61 -0
- data/spec/actor_spec.rb +24 -18
- data/spec/actor_view_spec.rb +51 -6
- data/spec/animated_spec.rb +27 -6
- data/spec/arbiter_spec.rb +12 -24
- data/spec/backstage_spec.rb +1 -1
- data/spec/behavior_spec.rb +3 -3
- data/spec/class_finder_spec.rb +13 -0
- data/spec/collidable_spec.rb +30 -10
- data/spec/emitter_spec.rb +20 -0
- data/spec/helper.rb +5 -21
- data/spec/input_manager_spec.rb +134 -0
- data/spec/label_spec.rb +0 -1
- data/spec/physical_spec.rb +114 -5
- data/spec/resource_manager_spec.rb +1 -2
- data/spec/spatial_hash_spec.rb +23 -7
- data/spec/spatial_stagehand_spec.rb +97 -0
- data/spec/stage_manager_spec.rb +0 -1
- data/spec/stage_spec.rb +2 -2
- data/spec/viewport_spec.rb +92 -48
- metadata +223 -119
- data/.gitignore +0 -11
- data/History.txt +0 -80
- data/VERSION +0 -1
- data/lib/gamebox/event_compat.rb +0 -285
- data/lib/gamebox/lib/diy.rb +0 -371
- data/lib/gamebox/lib/numbers_ext.rb +0 -3
- data/lib/gamebox/tasks/gamebox_tasks.rb +0 -61
- data/load_paths.rb +0 -20
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
require File.join(File.dirname(__FILE__),'helper')
|
|
2
|
-
require 'resource_manager'
|
|
3
2
|
|
|
4
3
|
describe 'A new resource manager' do
|
|
5
4
|
before do
|
|
@@ -7,7 +6,7 @@ describe 'A new resource manager' do
|
|
|
7
6
|
end
|
|
8
7
|
|
|
9
8
|
it 'should load an actor image' do
|
|
10
|
-
@res_man.
|
|
9
|
+
@res_man.expects(:load_image).with("string.png").returns(:surf)
|
|
11
10
|
@res_man.load_actor_image("FoopyPants").should == :surf
|
|
12
11
|
end
|
|
13
12
|
|
data/spec/spatial_hash_spec.rb
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
require File.join(File.dirname(__FILE__),'helper')
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
|
|
4
4
|
describe 'a new SpacialHash' do
|
|
5
5
|
before do
|
|
6
6
|
@hash = SpatialHash.new 10
|
|
7
7
|
end
|
|
8
|
+
|
|
8
9
|
it 'should be constructable' do
|
|
9
10
|
@hash.cell_size.should == 10
|
|
10
11
|
end
|
|
@@ -26,6 +27,7 @@ describe 'a new SpacialHash' do
|
|
|
26
27
|
@hash.add box
|
|
27
28
|
|
|
28
29
|
buckets = @hash.instance_variable_get('@buckets')
|
|
30
|
+
|
|
29
31
|
buckets[0][0].first.should == box
|
|
30
32
|
buckets[0][1].first.should == box
|
|
31
33
|
buckets[1][0].first.should == box
|
|
@@ -42,6 +44,7 @@ describe 'a new SpacialHash' do
|
|
|
42
44
|
|
|
43
45
|
buckets[1][1].should be_nil
|
|
44
46
|
buckets[0][1].should be_nil
|
|
47
|
+
|
|
45
48
|
end
|
|
46
49
|
|
|
47
50
|
it 'can remove points' do
|
|
@@ -87,12 +90,25 @@ describe 'a new SpacialHash' do
|
|
|
87
90
|
end
|
|
88
91
|
|
|
89
92
|
class Point
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
extend Publisher
|
|
94
|
+
can_fire :remove_me
|
|
95
|
+
include Kvo
|
|
96
|
+
kvo_attr_accessor :x, :y
|
|
97
|
+
def initialize(x,y)
|
|
98
|
+
self.x = x
|
|
99
|
+
self.y = y
|
|
100
|
+
end
|
|
92
101
|
end
|
|
93
102
|
|
|
94
|
-
class Item
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
103
|
+
class Item
|
|
104
|
+
extend Publisher
|
|
105
|
+
can_fire :remove_me
|
|
106
|
+
include Kvo
|
|
107
|
+
kvo_attr_accessor :x, :y, :width, :height
|
|
108
|
+
def initialize(x,y,w=1,h=1)
|
|
109
|
+
self.x = x
|
|
110
|
+
self.y = y
|
|
111
|
+
self.width = w
|
|
112
|
+
self.height = h
|
|
113
|
+
end
|
|
98
114
|
end
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
require File.join(File.dirname(__FILE__),'helper')
|
|
2
|
+
|
|
3
|
+
describe 'a new SpacialStagehand' do
|
|
4
|
+
before do
|
|
5
|
+
@target = SpatialStagehand.new :stage, {}
|
|
6
|
+
@hash = @target.instance_variable_get("@spatial_actors")
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
describe "it constructs" do
|
|
10
|
+
it 'should be constructable with default params' do
|
|
11
|
+
@target.cell_size.should == 50
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it 'passes on cell_size' do
|
|
15
|
+
@target = SpatialStagehand.new :stage, {:cell_size => 99}
|
|
16
|
+
@target.cell_size.should == 99
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
describe "#cell_size" do
|
|
21
|
+
it "returns the cell size" do
|
|
22
|
+
@hash.cell_size = :size
|
|
23
|
+
@target.cell_size.should == :size
|
|
24
|
+
end
|
|
25
|
+
it "sets the cell size" do
|
|
26
|
+
@target.cell_size = :size
|
|
27
|
+
@hash.cell_size.should == :size
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
describe "#auto_resize" do
|
|
32
|
+
it "returns the resize setting" do
|
|
33
|
+
@hash.auto_resize = :resize
|
|
34
|
+
@target.auto_resize.should == :resize
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
it "sets the resize setting" do
|
|
38
|
+
@target.auto_resize = :resize
|
|
39
|
+
@hash.auto_resize.should == :resize
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
describe "#moved_items" do
|
|
44
|
+
it "returns all the moved items" do
|
|
45
|
+
@hash.instance_variable_set("@moved_items", :moved_items => :moved_items)
|
|
46
|
+
@target.moved_items.should == [:moved_items]
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
describe "#items" do
|
|
51
|
+
it "returns all the items" do
|
|
52
|
+
@hash.instance_variable_set("@items", :items => :items)
|
|
53
|
+
@target.items.should == [:items]
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
describe "#buckets" do
|
|
58
|
+
it "returns all the buckets" do
|
|
59
|
+
@hash.instance_variable_set("@buckets", :buckets)
|
|
60
|
+
@target.buckets.should == :buckets
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
describe "#add" do
|
|
65
|
+
it 'should add the actor to the hash' do
|
|
66
|
+
@actor = stub(:when)
|
|
67
|
+
@hash.expects(:add).with(@actor)
|
|
68
|
+
@target.add(@actor)
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
describe "#remove" do
|
|
73
|
+
it "removes the actor from the hash" do
|
|
74
|
+
@hash.expects(:remove).with(:actor)
|
|
75
|
+
@target.remove(:actor)
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
describe "#items_at" do
|
|
80
|
+
it "calls through to hash" do
|
|
81
|
+
@hash.expects(:items_at).with(:x, :y)
|
|
82
|
+
@target.items_at(:x,:y)
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
describe "#items_in" do
|
|
86
|
+
it "calls through to hash" do
|
|
87
|
+
@hash.expects(:items_in).with(:x, :y, :w, :h)
|
|
88
|
+
@target.items_in(:x,:y, :w, :h)
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
describe "#neighbors_of" do
|
|
92
|
+
it "calls through to hash" do
|
|
93
|
+
@hash.expects(:neighbors_of).with(:actor, 3)
|
|
94
|
+
@target.neighbors_of(:actor, 3)
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
data/spec/stage_manager_spec.rb
CHANGED
data/spec/stage_spec.rb
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
require File.join(File.dirname(__FILE__),'helper')
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
|
|
4
4
|
describe 'A new stage' do
|
|
5
5
|
FakeDrawable = Struct.new :layer, :parallax
|
|
6
6
|
|
|
7
7
|
before do
|
|
8
8
|
@config = {:screen_resolution => [800,600] }
|
|
9
|
-
@actor_factory = stub(:
|
|
9
|
+
@actor_factory = stub(:director= => nil)
|
|
10
10
|
@stage = Stage.new :input_manager, @actor_factory,
|
|
11
11
|
:resource_manager, :sound_manager, @config, :backstage, {}
|
|
12
12
|
end
|
data/spec/viewport_spec.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require File.join(File.dirname(__FILE__),'helper')
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
|
|
4
4
|
class Vec
|
|
5
5
|
attr_accessor :x, :y
|
|
@@ -10,106 +10,150 @@ class Vec
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
describe 'A new viewport' do
|
|
13
|
-
|
|
14
|
-
@viewport = Viewport.new 800, 600
|
|
15
|
-
end
|
|
13
|
+
subject { Viewport.new 800, 600 }
|
|
16
14
|
|
|
17
15
|
it 'should construct with width and height' do
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
subject.width.should == 800
|
|
17
|
+
subject.height.should == 600
|
|
18
|
+
subject.x_offset.should == 0
|
|
19
|
+
subject.y_offset.should == 0
|
|
22
20
|
end
|
|
23
21
|
|
|
24
22
|
it 'should center the viewport on an actor when follow' do
|
|
25
23
|
actor = Vec.new 900, 200
|
|
26
|
-
|
|
24
|
+
subject.follow actor
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
subject.x_offset.should == -500
|
|
27
|
+
subject.y_offset.should == 100
|
|
28
|
+
subject.follow_target.should equal(actor)
|
|
31
29
|
end
|
|
32
30
|
|
|
33
31
|
it 'should center the viewport on an actor (plus offset) when follow' do
|
|
34
32
|
actor = Vec.new 900, 200
|
|
35
|
-
|
|
33
|
+
subject.follow actor, [40,-20]
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
subject.x_offset.should == -460
|
|
36
|
+
subject.y_offset.should == 80
|
|
37
|
+
subject.follow_target.should equal(actor)
|
|
40
38
|
end
|
|
41
39
|
|
|
42
40
|
it 'should respect parallax scrolling layers for offsets' do
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
subject.x_offset = -200
|
|
42
|
+
subject.y_offset = -300
|
|
45
43
|
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
subject.x_offset(2).should == -100
|
|
45
|
+
subject.y_offset(2).should == -150
|
|
48
46
|
end
|
|
49
47
|
|
|
50
48
|
it 'should return a zero offset on INFINITY' do
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
subject.x_offset = -200
|
|
50
|
+
subject.y_offset = -300
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
subject.x_offset(Float::INFINITY).should == 0
|
|
53
|
+
subject.y_offset(Float::INFINITY).should == 0
|
|
56
54
|
end
|
|
57
55
|
|
|
58
56
|
it 'shouldn\'t update anything unless following a target' do
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
subject.x_offset = -200
|
|
58
|
+
subject.y_offset = -300
|
|
61
59
|
|
|
62
|
-
|
|
60
|
+
subject.update 3000
|
|
63
61
|
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
subject.x_offset.should == -200
|
|
63
|
+
subject.y_offset.should == -300
|
|
66
64
|
end
|
|
67
65
|
|
|
68
66
|
it 'should follow a target if target has gone right;down of its buffer' do
|
|
69
67
|
actor = Vec.new 900, 200
|
|
70
|
-
|
|
68
|
+
subject.follow actor, [0,0], [100,200]
|
|
71
69
|
|
|
72
|
-
|
|
70
|
+
subject.update 100
|
|
73
71
|
actor.x = 990
|
|
74
72
|
actor.y = 390
|
|
75
73
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
subject.update 100
|
|
75
|
+
subject.x_offset.should == -500
|
|
76
|
+
subject.y_offset.should == 100
|
|
79
77
|
|
|
80
78
|
actor.x = 1001
|
|
81
79
|
actor.y = 401
|
|
82
|
-
|
|
80
|
+
subject.update 100
|
|
83
81
|
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
subject.x_offset.should == -501
|
|
83
|
+
subject.y_offset.should == 99
|
|
86
84
|
end
|
|
87
85
|
|
|
88
86
|
it 'should follow a target if target has gone left;up of its buffer' do
|
|
89
87
|
actor = Vec.new 900, 200
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
subject.expects(:fire).with(:scrolled).twice
|
|
89
|
+
subject.follow actor, [0,0], [100,200]
|
|
92
90
|
|
|
93
|
-
|
|
91
|
+
subject.update 100
|
|
94
92
|
actor.x = 810
|
|
95
93
|
actor.y = 10
|
|
96
94
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
subject.update 100
|
|
96
|
+
subject.x_offset.should == -500
|
|
97
|
+
subject.y_offset.should == 100
|
|
100
98
|
|
|
101
99
|
actor.x = 799
|
|
102
100
|
actor.y = -1
|
|
103
|
-
|
|
101
|
+
subject.update 100
|
|
104
102
|
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
subject.x_offset.should == -499
|
|
104
|
+
subject.y_offset.should == 101
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
it 'should respect the speed setting' do
|
|
108
|
+
actor = Vec.new 900, 200
|
|
109
|
+
subject.speed = 0.5
|
|
110
|
+
subject.follow actor, [0,0], [100,200]
|
|
111
|
+
|
|
112
|
+
subject.update 100
|
|
113
|
+
actor.x = 990
|
|
114
|
+
actor.y = 390
|
|
115
|
+
|
|
116
|
+
subject.update 100
|
|
117
|
+
subject.x_offset.should == -500
|
|
118
|
+
subject.y_offset.should == 100
|
|
119
|
+
|
|
120
|
+
actor.x = 1002
|
|
121
|
+
actor.y = 402
|
|
122
|
+
subject.update 100
|
|
123
|
+
|
|
124
|
+
subject.x_offset.should == -501
|
|
125
|
+
subject.y_offset.should == 99
|
|
126
|
+
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
it 'enforces speed is >= 0 and <= 1' do
|
|
130
|
+
subject.speed.should == 1
|
|
131
|
+
|
|
132
|
+
subject.speed = 0
|
|
133
|
+
subject.speed.should == 0
|
|
134
|
+
|
|
135
|
+
subject.speed = 2
|
|
136
|
+
subject.speed.should == 1
|
|
137
|
+
|
|
138
|
+
subject.speed = 0.1
|
|
139
|
+
subject.speed.should be_within(0.001).of(0.1)
|
|
107
140
|
end
|
|
108
141
|
|
|
109
142
|
it 'should fire :scrolled event when targeting an actor' do
|
|
110
143
|
actor = Vec.new 900, 200
|
|
111
|
-
|
|
112
|
-
|
|
144
|
+
subject.expects(:fire).with(:scrolled)
|
|
145
|
+
subject.follow actor, [0,0], [100,200]
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
describe "#bounds" do
|
|
149
|
+
it 'returns the bounds as [x1,y1,x2,y2]' do
|
|
150
|
+
subject.bounds.should == [0,0,800,600]
|
|
151
|
+
|
|
152
|
+
subject.x_offset = -10
|
|
153
|
+
subject.y_offset = -100
|
|
154
|
+
|
|
155
|
+
subject.bounds.should == [10,100,810,700]
|
|
156
|
+
end
|
|
113
157
|
end
|
|
114
158
|
|
|
115
159
|
end
|
metadata
CHANGED
|
@@ -1,125 +1,227 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gamebox
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
5
|
-
prerelease:
|
|
6
|
-
segments:
|
|
7
|
-
- 0
|
|
8
|
-
- 2
|
|
9
|
-
- 1
|
|
10
|
-
version: 0.2.1
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.3.2
|
|
5
|
+
prerelease:
|
|
11
6
|
platform: ruby
|
|
12
|
-
authors:
|
|
7
|
+
authors:
|
|
13
8
|
- Shawn Anderson
|
|
14
9
|
- Jason Roelofs
|
|
15
10
|
- Karlin Fox
|
|
16
11
|
autorequire:
|
|
17
12
|
bindir: bin
|
|
18
13
|
cert_chain: []
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
date: 2011-11-19 00:00:00.000000000Z
|
|
15
|
+
dependencies:
|
|
16
|
+
- !ruby/object:Gem::Dependency
|
|
17
|
+
name: gosu
|
|
18
|
+
requirement: &2157000860 !ruby/object:Gem::Requirement
|
|
19
|
+
none: false
|
|
20
|
+
requirements:
|
|
21
|
+
- - ! '>='
|
|
22
|
+
- !ruby/object:Gem::Version
|
|
23
|
+
version: '0'
|
|
24
|
+
type: :runtime
|
|
25
25
|
prerelease: false
|
|
26
|
-
|
|
26
|
+
version_requirements: *2157000860
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: constructor
|
|
29
|
+
requirement: &2157000400 !ruby/object:Gem::Requirement
|
|
27
30
|
none: false
|
|
28
|
-
requirements:
|
|
29
|
-
- -
|
|
30
|
-
- !ruby/object:Gem::Version
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- 0
|
|
34
|
-
version: "0"
|
|
35
|
-
type: :development
|
|
36
|
-
version_requirements: *id001
|
|
37
|
-
- !ruby/object:Gem::Dependency
|
|
38
|
-
name: jeweler
|
|
31
|
+
requirements:
|
|
32
|
+
- - ! '>='
|
|
33
|
+
- !ruby/object:Gem::Version
|
|
34
|
+
version: '0'
|
|
35
|
+
type: :runtime
|
|
39
36
|
prerelease: false
|
|
40
|
-
|
|
37
|
+
version_requirements: *2157000400
|
|
38
|
+
- !ruby/object:Gem::Dependency
|
|
39
|
+
name: publisher
|
|
40
|
+
requirement: &2156999940 !ruby/object:Gem::Requirement
|
|
41
41
|
none: false
|
|
42
|
-
requirements:
|
|
43
|
-
- -
|
|
44
|
-
- !ruby/object:Gem::Version
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- 0
|
|
48
|
-
version: "0"
|
|
49
|
-
type: :development
|
|
50
|
-
version_requirements: *id002
|
|
51
|
-
- !ruby/object:Gem::Dependency
|
|
52
|
-
name: gosu
|
|
42
|
+
requirements:
|
|
43
|
+
- - ! '>='
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '0'
|
|
46
|
+
type: :runtime
|
|
53
47
|
prerelease: false
|
|
54
|
-
|
|
48
|
+
version_requirements: *2156999940
|
|
49
|
+
- !ruby/object:Gem::Dependency
|
|
50
|
+
name: diy
|
|
51
|
+
requirement: &2156999520 !ruby/object:Gem::Requirement
|
|
55
52
|
none: false
|
|
56
|
-
requirements:
|
|
57
|
-
- -
|
|
58
|
-
- !ruby/object:Gem::Version
|
|
59
|
-
|
|
60
|
-
segments:
|
|
61
|
-
- 0
|
|
62
|
-
version: "0"
|
|
53
|
+
requirements:
|
|
54
|
+
- - ! '>='
|
|
55
|
+
- !ruby/object:Gem::Version
|
|
56
|
+
version: '0'
|
|
63
57
|
type: :runtime
|
|
64
|
-
version_requirements: *id003
|
|
65
|
-
- !ruby/object:Gem::Dependency
|
|
66
|
-
name: bundler
|
|
67
58
|
prerelease: false
|
|
68
|
-
|
|
59
|
+
version_requirements: *2156999520
|
|
60
|
+
- !ruby/object:Gem::Dependency
|
|
61
|
+
name: tween
|
|
62
|
+
requirement: &2156999100 !ruby/object:Gem::Requirement
|
|
69
63
|
none: false
|
|
70
|
-
requirements:
|
|
71
|
-
- -
|
|
72
|
-
- !ruby/object:Gem::Version
|
|
73
|
-
|
|
74
|
-
segments:
|
|
75
|
-
- 0
|
|
76
|
-
version: "0"
|
|
64
|
+
requirements:
|
|
65
|
+
- - ! '>='
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '0'
|
|
77
68
|
type: :runtime
|
|
78
|
-
version_requirements: *id004
|
|
79
|
-
- !ruby/object:Gem::Dependency
|
|
80
|
-
name: constructor
|
|
81
69
|
prerelease: false
|
|
82
|
-
|
|
70
|
+
version_requirements: *2156999100
|
|
71
|
+
- !ruby/object:Gem::Dependency
|
|
72
|
+
name: require_all
|
|
73
|
+
requirement: &2156998660 !ruby/object:Gem::Requirement
|
|
83
74
|
none: false
|
|
84
|
-
requirements:
|
|
85
|
-
- -
|
|
86
|
-
- !ruby/object:Gem::Version
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
75
|
+
requirements:
|
|
76
|
+
- - ! '>='
|
|
77
|
+
- !ruby/object:Gem::Version
|
|
78
|
+
version: '0'
|
|
79
|
+
type: :runtime
|
|
80
|
+
prerelease: false
|
|
81
|
+
version_requirements: *2156998660
|
|
82
|
+
- !ruby/object:Gem::Dependency
|
|
83
|
+
name: kvo
|
|
84
|
+
requirement: &2156998220 !ruby/object:Gem::Requirement
|
|
85
|
+
none: false
|
|
86
|
+
requirements:
|
|
87
|
+
- - ! '>='
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :runtime
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: *2156998220
|
|
93
|
+
- !ruby/object:Gem::Dependency
|
|
94
|
+
name: pry
|
|
95
|
+
requirement: &2156997700 !ruby/object:Gem::Requirement
|
|
96
|
+
none: false
|
|
97
|
+
requirements:
|
|
98
|
+
- - =
|
|
99
|
+
- !ruby/object:Gem::Version
|
|
100
|
+
version: 0.9.6
|
|
101
|
+
type: :runtime
|
|
102
|
+
prerelease: false
|
|
103
|
+
version_requirements: *2156997700
|
|
104
|
+
- !ruby/object:Gem::Dependency
|
|
105
|
+
name: pry-remote
|
|
106
|
+
requirement: &2156997240 !ruby/object:Gem::Requirement
|
|
107
|
+
none: false
|
|
108
|
+
requirements:
|
|
109
|
+
- - ! '>='
|
|
110
|
+
- !ruby/object:Gem::Version
|
|
111
|
+
version: '0'
|
|
91
112
|
type: :runtime
|
|
92
|
-
version_requirements: *id005
|
|
93
|
-
- !ruby/object:Gem::Dependency
|
|
94
|
-
name: publisher
|
|
95
113
|
prerelease: false
|
|
96
|
-
|
|
114
|
+
version_requirements: *2156997240
|
|
115
|
+
- !ruby/object:Gem::Dependency
|
|
116
|
+
name: chipmunk
|
|
117
|
+
requirement: &2156996740 !ruby/object:Gem::Requirement
|
|
97
118
|
none: false
|
|
98
|
-
requirements:
|
|
99
|
-
- -
|
|
100
|
-
- !ruby/object:Gem::Version
|
|
101
|
-
|
|
102
|
-
segments:
|
|
103
|
-
- 0
|
|
104
|
-
version: "0"
|
|
119
|
+
requirements:
|
|
120
|
+
- - ! '>='
|
|
121
|
+
- !ruby/object:Gem::Version
|
|
122
|
+
version: '0'
|
|
105
123
|
type: :runtime
|
|
106
|
-
|
|
124
|
+
prerelease: false
|
|
125
|
+
version_requirements: *2156996740
|
|
126
|
+
- !ruby/object:Gem::Dependency
|
|
127
|
+
name: rspec-core
|
|
128
|
+
requirement: &2156996300 !ruby/object:Gem::Requirement
|
|
129
|
+
none: false
|
|
130
|
+
requirements:
|
|
131
|
+
- - ! '>='
|
|
132
|
+
- !ruby/object:Gem::Version
|
|
133
|
+
version: '0'
|
|
134
|
+
type: :development
|
|
135
|
+
prerelease: false
|
|
136
|
+
version_requirements: *2156996300
|
|
137
|
+
- !ruby/object:Gem::Dependency
|
|
138
|
+
name: rspec-mocks
|
|
139
|
+
requirement: &2156995860 !ruby/object:Gem::Requirement
|
|
140
|
+
none: false
|
|
141
|
+
requirements:
|
|
142
|
+
- - ! '>='
|
|
143
|
+
- !ruby/object:Gem::Version
|
|
144
|
+
version: '0'
|
|
145
|
+
type: :development
|
|
146
|
+
prerelease: false
|
|
147
|
+
version_requirements: *2156995860
|
|
148
|
+
- !ruby/object:Gem::Dependency
|
|
149
|
+
name: rspec-expectations
|
|
150
|
+
requirement: &2156995360 !ruby/object:Gem::Requirement
|
|
151
|
+
none: false
|
|
152
|
+
requirements:
|
|
153
|
+
- - ! '>='
|
|
154
|
+
- !ruby/object:Gem::Version
|
|
155
|
+
version: '0'
|
|
156
|
+
type: :development
|
|
157
|
+
prerelease: false
|
|
158
|
+
version_requirements: *2156995360
|
|
159
|
+
- !ruby/object:Gem::Dependency
|
|
160
|
+
name: mocha
|
|
161
|
+
requirement: &2156994940 !ruby/object:Gem::Requirement
|
|
162
|
+
none: false
|
|
163
|
+
requirements:
|
|
164
|
+
- - ! '>='
|
|
165
|
+
- !ruby/object:Gem::Version
|
|
166
|
+
version: '0'
|
|
167
|
+
type: :development
|
|
168
|
+
prerelease: false
|
|
169
|
+
version_requirements: *2156994940
|
|
170
|
+
- !ruby/object:Gem::Dependency
|
|
171
|
+
name: rspec
|
|
172
|
+
requirement: &2156994520 !ruby/object:Gem::Requirement
|
|
173
|
+
none: false
|
|
174
|
+
requirements:
|
|
175
|
+
- - ! '>='
|
|
176
|
+
- !ruby/object:Gem::Version
|
|
177
|
+
version: '0'
|
|
178
|
+
type: :development
|
|
179
|
+
prerelease: false
|
|
180
|
+
version_requirements: *2156994520
|
|
181
|
+
- !ruby/object:Gem::Dependency
|
|
182
|
+
name: rake
|
|
183
|
+
requirement: &2156994060 !ruby/object:Gem::Requirement
|
|
184
|
+
none: false
|
|
185
|
+
requirements:
|
|
186
|
+
- - ! '>='
|
|
187
|
+
- !ruby/object:Gem::Version
|
|
188
|
+
version: '0'
|
|
189
|
+
type: :development
|
|
190
|
+
prerelease: false
|
|
191
|
+
version_requirements: *2156994060
|
|
192
|
+
- !ruby/object:Gem::Dependency
|
|
193
|
+
name: polaris
|
|
194
|
+
requirement: &2156993640 !ruby/object:Gem::Requirement
|
|
195
|
+
none: false
|
|
196
|
+
requirements:
|
|
197
|
+
- - ! '>='
|
|
198
|
+
- !ruby/object:Gem::Version
|
|
199
|
+
version: '0'
|
|
200
|
+
type: :development
|
|
201
|
+
prerelease: false
|
|
202
|
+
version_requirements: *2156993640
|
|
203
|
+
- !ruby/object:Gem::Dependency
|
|
204
|
+
name: rcov
|
|
205
|
+
requirement: &2156993220 !ruby/object:Gem::Requirement
|
|
206
|
+
none: false
|
|
207
|
+
requirements:
|
|
208
|
+
- - ! '>='
|
|
209
|
+
- !ruby/object:Gem::Version
|
|
210
|
+
version: '0'
|
|
211
|
+
type: :development
|
|
212
|
+
prerelease: false
|
|
213
|
+
version_requirements: *2156993220
|
|
107
214
|
description: Framework for building and distributing games using Gosu
|
|
108
215
|
email: shawn42@gmail.com
|
|
109
|
-
executables:
|
|
216
|
+
executables:
|
|
110
217
|
- gamebox
|
|
111
218
|
extensions: []
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- README.txt
|
|
115
|
-
files:
|
|
116
|
-
- .gitignore
|
|
219
|
+
extra_rdoc_files: []
|
|
220
|
+
files:
|
|
117
221
|
- Gemfile
|
|
118
|
-
- History.txt
|
|
119
222
|
- README.txt
|
|
120
223
|
- Rakefile
|
|
121
224
|
- TODO.txt
|
|
122
|
-
- VERSION
|
|
123
225
|
- bin/gamebox
|
|
124
226
|
- docs/CODE_REVIEW
|
|
125
227
|
- docs/gamebox.bat
|
|
@@ -133,6 +235,7 @@ files:
|
|
|
133
235
|
- lib/gamebox/actor_view.rb
|
|
134
236
|
- lib/gamebox/actors/collidable_debugger.rb
|
|
135
237
|
- lib/gamebox/actors/curtain.rb
|
|
238
|
+
- lib/gamebox/actors/emitter.rb
|
|
136
239
|
- lib/gamebox/actors/fps.rb
|
|
137
240
|
- lib/gamebox/actors/label.rb
|
|
138
241
|
- lib/gamebox/actors/logo.rb
|
|
@@ -152,10 +255,12 @@ files:
|
|
|
152
255
|
- lib/gamebox/behaviors/graphical.rb
|
|
153
256
|
- lib/gamebox/behaviors/layered.rb
|
|
154
257
|
- lib/gamebox/behaviors/physical.rb
|
|
258
|
+
- lib/gamebox/behaviors/timed.rb
|
|
155
259
|
- lib/gamebox/behaviors/updatable.rb
|
|
156
260
|
- lib/gamebox/class_finder.rb
|
|
157
261
|
- lib/gamebox/config_manager.rb
|
|
158
262
|
- lib/gamebox/console_app.rb
|
|
263
|
+
- lib/gamebox/constants.rb
|
|
159
264
|
- lib/gamebox/data/config/objects.yml
|
|
160
265
|
- lib/gamebox/data/fonts/Asimov.ttf
|
|
161
266
|
- lib/gamebox/data/fonts/GAMEBOX_FONTS_GO_HERE
|
|
@@ -164,7 +269,6 @@ files:
|
|
|
164
269
|
- lib/gamebox/data/music/GAMEBOX_MUSIC_GOES_HERE
|
|
165
270
|
- lib/gamebox/data/sounds/GAMEBOX_SOUND_FX_GO_HERE
|
|
166
271
|
- lib/gamebox/director.rb
|
|
167
|
-
- lib/gamebox/event_compat.rb
|
|
168
272
|
- lib/gamebox/ftor.rb
|
|
169
273
|
- lib/gamebox/gamebox_application.rb
|
|
170
274
|
- lib/gamebox/gamebox_generator.rb
|
|
@@ -174,16 +278,16 @@ files:
|
|
|
174
278
|
- lib/gamebox/input_manager.rb
|
|
175
279
|
- lib/gamebox/lib/aliasing.rb
|
|
176
280
|
- lib/gamebox/lib/code_statistics.rb
|
|
177
|
-
- lib/gamebox/lib/diy.rb
|
|
178
281
|
- lib/gamebox/lib/inflections.rb
|
|
179
282
|
- lib/gamebox/lib/inflector.rb
|
|
180
283
|
- lib/gamebox/lib/linked_list.rb
|
|
181
284
|
- lib/gamebox/lib/metaclass.rb
|
|
182
|
-
- lib/gamebox/lib/numbers_ext.rb
|
|
183
285
|
- lib/gamebox/lib/platform.rb
|
|
184
286
|
- lib/gamebox/lib/publisher_ext.rb
|
|
287
|
+
- lib/gamebox/lib/range_ext.rb
|
|
185
288
|
- lib/gamebox/lib/rect.rb
|
|
186
289
|
- lib/gamebox/lib/sorted_list.rb
|
|
290
|
+
- lib/gamebox/lib/symbol_ext.rb
|
|
187
291
|
- lib/gamebox/physical_director.rb
|
|
188
292
|
- lib/gamebox/physical_stage.rb
|
|
189
293
|
- lib/gamebox/physics.rb
|
|
@@ -196,7 +300,7 @@ files:
|
|
|
196
300
|
- lib/gamebox/stage_manager.rb
|
|
197
301
|
- lib/gamebox/stagehand.rb
|
|
198
302
|
- lib/gamebox/svg_document.rb
|
|
199
|
-
- lib/gamebox/tasks/gamebox_tasks.
|
|
303
|
+
- lib/gamebox/tasks/gamebox_tasks.rake
|
|
200
304
|
- lib/gamebox/templates/actor.erb
|
|
201
305
|
- lib/gamebox/templates/actor_spec.erb
|
|
202
306
|
- lib/gamebox/templates/actor_view.erb
|
|
@@ -223,71 +327,71 @@ files:
|
|
|
223
327
|
- lib/gamebox/viewport.rb
|
|
224
328
|
- lib/gamebox/views/graphical_actor_view.rb
|
|
225
329
|
- lib/gamebox/wrapped_screen.rb
|
|
226
|
-
- load_paths.rb
|
|
227
330
|
- script/perf_polaris.rb
|
|
228
331
|
- script/perf_spatial_hash.rb
|
|
332
|
+
- script/perf_struct_vs_array.rb
|
|
333
|
+
- spec/actor_factory_spec.rb
|
|
229
334
|
- spec/actor_spec.rb
|
|
230
335
|
- spec/actor_view_spec.rb
|
|
231
336
|
- spec/animated_spec.rb
|
|
232
337
|
- spec/arbiter_spec.rb
|
|
233
338
|
- spec/backstage_spec.rb
|
|
234
339
|
- spec/behavior_spec.rb
|
|
340
|
+
- spec/class_finder_spec.rb
|
|
235
341
|
- spec/collidable_spec.rb
|
|
342
|
+
- spec/emitter_spec.rb
|
|
236
343
|
- spec/helper.rb
|
|
344
|
+
- spec/input_manager_spec.rb
|
|
237
345
|
- spec/label_spec.rb
|
|
238
346
|
- spec/physical_spec.rb
|
|
239
347
|
- spec/resource_manager_spec.rb
|
|
240
348
|
- spec/spatial_hash_spec.rb
|
|
349
|
+
- spec/spatial_stagehand_spec.rb
|
|
241
350
|
- spec/stage_manager_spec.rb
|
|
242
351
|
- spec/stage_spec.rb
|
|
243
352
|
- spec/viewport_spec.rb
|
|
244
|
-
has_rdoc: true
|
|
245
353
|
homepage: http://shawn42.github.com/gamebox
|
|
246
354
|
licenses: []
|
|
247
|
-
|
|
248
355
|
post_install_message:
|
|
249
|
-
rdoc_options:
|
|
250
|
-
|
|
251
|
-
require_paths:
|
|
356
|
+
rdoc_options: []
|
|
357
|
+
require_paths:
|
|
252
358
|
- lib
|
|
253
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
359
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
254
360
|
none: false
|
|
255
|
-
requirements:
|
|
256
|
-
- -
|
|
257
|
-
- !ruby/object:Gem::Version
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
- 0
|
|
261
|
-
version: "0"
|
|
262
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
361
|
+
requirements:
|
|
362
|
+
- - ! '>='
|
|
363
|
+
- !ruby/object:Gem::Version
|
|
364
|
+
version: '0'
|
|
365
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
366
|
none: false
|
|
264
|
-
requirements:
|
|
265
|
-
- -
|
|
266
|
-
- !ruby/object:Gem::Version
|
|
267
|
-
|
|
268
|
-
segments:
|
|
269
|
-
- 0
|
|
270
|
-
version: "0"
|
|
367
|
+
requirements:
|
|
368
|
+
- - ! '>='
|
|
369
|
+
- !ruby/object:Gem::Version
|
|
370
|
+
version: '0'
|
|
271
371
|
requirements: []
|
|
272
|
-
|
|
273
372
|
rubyforge_project: gamebox
|
|
274
|
-
rubygems_version: 1.
|
|
373
|
+
rubygems_version: 1.8.6
|
|
275
374
|
signing_key:
|
|
276
375
|
specification_version: 3
|
|
277
376
|
summary: Framework for building and distributing games using Gosu
|
|
278
|
-
test_files:
|
|
377
|
+
test_files:
|
|
378
|
+
- spec/actor_factory_spec.rb
|
|
279
379
|
- spec/actor_spec.rb
|
|
280
380
|
- spec/actor_view_spec.rb
|
|
281
381
|
- spec/animated_spec.rb
|
|
282
382
|
- spec/arbiter_spec.rb
|
|
283
383
|
- spec/backstage_spec.rb
|
|
284
384
|
- spec/behavior_spec.rb
|
|
385
|
+
- spec/class_finder_spec.rb
|
|
285
386
|
- spec/collidable_spec.rb
|
|
387
|
+
- spec/emitter_spec.rb
|
|
286
388
|
- spec/helper.rb
|
|
389
|
+
- spec/input_manager_spec.rb
|
|
287
390
|
- spec/label_spec.rb
|
|
288
391
|
- spec/physical_spec.rb
|
|
289
392
|
- spec/resource_manager_spec.rb
|
|
290
393
|
- spec/spatial_hash_spec.rb
|
|
394
|
+
- spec/spatial_stagehand_spec.rb
|
|
291
395
|
- spec/stage_manager_spec.rb
|
|
292
396
|
- spec/stage_spec.rb
|
|
293
397
|
- spec/viewport_spec.rb
|