game_2d 0.0.1
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/.gitignore +15 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +84 -0
- data/Rakefile +1 -0
- data/bin/game_2d_client.rb +17 -0
- data/bin/game_2d_server.rb +21 -0
- data/game_2d.gemspec +32 -0
- data/lib/game_2d/client_connection.rb +127 -0
- data/lib/game_2d/client_engine.rb +227 -0
- data/lib/game_2d/complex_move.rb +45 -0
- data/lib/game_2d/entity.rb +371 -0
- data/lib/game_2d/entity/block.rb +73 -0
- data/lib/game_2d/entity/owned_entity.rb +29 -0
- data/lib/game_2d/entity/pellet.rb +27 -0
- data/lib/game_2d/entity/titanium.rb +11 -0
- data/lib/game_2d/entity_constants.rb +14 -0
- data/lib/game_2d/game.rb +213 -0
- data/lib/game_2d/game_space.rb +462 -0
- data/lib/game_2d/game_window.rb +260 -0
- data/lib/game_2d/hash.rb +11 -0
- data/lib/game_2d/menu.rb +82 -0
- data/lib/game_2d/move/rise_up.rb +77 -0
- data/lib/game_2d/player.rb +251 -0
- data/lib/game_2d/registerable.rb +25 -0
- data/lib/game_2d/serializable.rb +69 -0
- data/lib/game_2d/server_connection.rb +104 -0
- data/lib/game_2d/server_port.rb +74 -0
- data/lib/game_2d/storage.rb +42 -0
- data/lib/game_2d/version.rb +3 -0
- data/lib/game_2d/wall.rb +21 -0
- data/lib/game_2d/zorder.rb +3 -0
- data/media/Beep.wav +0 -0
- data/media/Space.png +0 -0
- data/media/Star.png +0 -0
- data/media/Starfighter.bmp +0 -0
- data/media/brick.gif +0 -0
- data/media/cement.gif +0 -0
- data/media/crosshair.gif +0 -0
- data/media/dirt.gif +0 -0
- data/media/pellet.png +0 -0
- data/media/pellet.xcf +0 -0
- data/media/player.png +0 -0
- data/media/player.xcf +0 -0
- data/media/rock.png +0 -0
- data/media/rock.xcf +0 -0
- data/media/steel.gif +0 -0
- data/media/tele.gif +0 -0
- data/media/titanium.gif +0 -0
- data/media/unlikelium.gif +0 -0
- data/spec/client_engine_spec.rb +235 -0
- data/spec/game_space_spec.rb +347 -0
- metadata +246 -0
@@ -0,0 +1,347 @@
|
|
1
|
+
require 'set'
|
2
|
+
$LOAD_PATH << '.'
|
3
|
+
require 'game_space'
|
4
|
+
|
5
|
+
describe GameSpace do
|
6
|
+
subject { GameSpace.new(nil).establish_world('lump', nil, 3, 3) }
|
7
|
+
describe "@grid" do
|
8
|
+
let(:grid) { subject.instance_variable_get :@grid }
|
9
|
+
it "has the right size grid" do
|
10
|
+
expect(grid.size).to eq(5)
|
11
|
+
expect(grid.first.size).to eq(5)
|
12
|
+
expect(grid.last.size).to eq(5)
|
13
|
+
end
|
14
|
+
|
15
|
+
it "has cells" do
|
16
|
+
expect(grid[0][0]).to be_a Cell
|
17
|
+
end
|
18
|
+
|
19
|
+
it "has cells that know their positions" do
|
20
|
+
expect(grid[4][2].x).to eq(3)
|
21
|
+
expect(grid[4][2].y).to eq(1)
|
22
|
+
expect(grid[0][1].x).to eq(-1)
|
23
|
+
expect(grid[0][1].y).to eq(0)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "forbids changes" do
|
27
|
+
expect { grid[0][0] = nil }.to raise_exception
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe "#at" do
|
32
|
+
it "returns the right cell" do
|
33
|
+
cell = subject.at(0,2)
|
34
|
+
expect(cell.x).to eq(0)
|
35
|
+
expect(cell.y).to eq(2)
|
36
|
+
end
|
37
|
+
it "disallows illegal coordinates" do
|
38
|
+
expect { subject.at(2, 4) }.to raise_exception
|
39
|
+
expect { subject.at(-2, 3) }.to raise_exception
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
describe "#put and #cut" do
|
44
|
+
let(:dirt) { Entity::Block.new(@x, @y) }
|
45
|
+
|
46
|
+
it "populates the cell" do
|
47
|
+
cell = subject.at(1, 2)
|
48
|
+
expect(cell).to be_empty
|
49
|
+
subject.put(1, 2, dirt)
|
50
|
+
expect(cell).to include(dirt)
|
51
|
+
end
|
52
|
+
|
53
|
+
it "clears the cell" do
|
54
|
+
cell = subject.at(1, 2)
|
55
|
+
subject.put(1, 2, dirt)
|
56
|
+
expect(cell).to include(dirt)
|
57
|
+
subject.cut(1, 2, dirt)
|
58
|
+
expect(cell).to be_empty
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
describe "#cell_at_point" do
|
63
|
+
it "translates from a point to a cell" do
|
64
|
+
expect(subject.cell_at_point(399,399)).to eq([0,0])
|
65
|
+
expect(subject.cell_at_point(399,400)).to eq([0,1])
|
66
|
+
expect(subject.cell_at_point(401,399)).to eq([1,0])
|
67
|
+
expect(subject.cell_at_point(799,800)).to eq([1,2])
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe "#cells_at_points" do
|
72
|
+
it "translates from points to cells" do
|
73
|
+
expect(subject.cells_at_points(
|
74
|
+
[
|
75
|
+
[399,399],
|
76
|
+
[399,400],
|
77
|
+
[401,399],
|
78
|
+
[799,800]
|
79
|
+
]
|
80
|
+
)).to eq([[0,0], [0,1], [1,0], [1,2]].to_set)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
describe "#corner_points_of_entity" do
|
85
|
+
it "returns all four corners, given the upper-left corner" do
|
86
|
+
expect(subject.corner_points_of_entity(200,300)).to eq(
|
87
|
+
[
|
88
|
+
[200,300], [599,300], [200,699], [599,699]
|
89
|
+
]
|
90
|
+
)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
# Normally these blocks wouldn't be allowed to intersect this
|
95
|
+
# way, but we're using the low-level put() call, so no check
|
96
|
+
# for collisions is done.
|
97
|
+
describe "#entities_at_point" do
|
98
|
+
let(:first_match) { Entity::Block.new(400, 400) }
|
99
|
+
let(:second_match) { Entity::Block.new(799, 799) }
|
100
|
+
let(:not_match) { Entity::Block.new(600, 399) } # too high
|
101
|
+
it "returns all entities touching that point" do
|
102
|
+
subject.put(1, 1, first_match)
|
103
|
+
subject.put(1, 1, second_match)
|
104
|
+
subject.put(2, 1, second_match)
|
105
|
+
subject.put(1, 2, second_match)
|
106
|
+
subject.put(2, 2, second_match)
|
107
|
+
subject.put(1, 0, not_match)
|
108
|
+
subject.put(2, 0, not_match)
|
109
|
+
subject.put(1, 1, not_match)
|
110
|
+
subject.put(2, 1, not_match)
|
111
|
+
result = subject.entities_at_point(799, 799)
|
112
|
+
expect(result).to be_an(Array)
|
113
|
+
expect(result).to include(first_match)
|
114
|
+
expect(result).to include(second_match)
|
115
|
+
expect(result).not_to include(not_match)
|
116
|
+
expect(result.size).to eq(2)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
describe "#entities_at_points" do
|
121
|
+
let(:first_match) { Entity::Block.new(0, 0) }
|
122
|
+
let(:second_match) { Entity::Block.new(780, 400) }
|
123
|
+
let(:not_match) { Entity::Block.new(799, 400) } # too far right
|
124
|
+
it "returns all entities touching those points" do
|
125
|
+
subject.put(0, 0, first_match)
|
126
|
+
subject.put(1, 1, second_match)
|
127
|
+
subject.put(2, 1, second_match)
|
128
|
+
subject.put(1, 1, not_match)
|
129
|
+
subject.put(2, 1, not_match)
|
130
|
+
result = subject.entities_at_points([[10,10],[785,600]])
|
131
|
+
expect(result).to be_a(Set)
|
132
|
+
expect(result).to include(first_match)
|
133
|
+
expect(result).to include(second_match)
|
134
|
+
expect(result).not_to include(not_match)
|
135
|
+
expect(result.size).to eq(2)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
describe "#entities_bordering_entity_at" do
|
140
|
+
let(:above1) { Entity::Block.new(201, 200) }
|
141
|
+
let(:above2) { Entity::Block.new(999, 200) }
|
142
|
+
let(:below1) { Entity::Block.new(201, 1000) }
|
143
|
+
let(:below2) { Entity::Block.new(999, 1000) }
|
144
|
+
let(:left1) { Entity::Block.new(200, 201) }
|
145
|
+
let(:left2) { Entity::Block.new(200, 999) }
|
146
|
+
let(:right1) { Entity::Block.new(1000, 201) }
|
147
|
+
let(:right2) { Entity::Block.new(1000, 999) }
|
148
|
+
let(:too_left) { Entity::Block.new(199, 600) }
|
149
|
+
let(:too_right) { Entity::Block.new(1001, 600) }
|
150
|
+
let(:too_high) { Entity::Block.new(600, 199) }
|
151
|
+
let(:too_low) { Entity::Block.new(600, 1001) }
|
152
|
+
it "returns all entities bordering that space" do
|
153
|
+
subject.put(1, 1, above1)
|
154
|
+
subject.put(1, 1, left1)
|
155
|
+
subject.put(1, 1, too_left)
|
156
|
+
subject.put(2, 1, above2)
|
157
|
+
subject.put(2, 1, right1)
|
158
|
+
subject.put(2, 1, too_right)
|
159
|
+
subject.put(1, 2, below1)
|
160
|
+
subject.put(1, 2, left2)
|
161
|
+
subject.put(1, 2, too_high)
|
162
|
+
subject.put(2, 2, below2)
|
163
|
+
subject.put(2, 2, right2)
|
164
|
+
subject.put(2, 2, too_low)
|
165
|
+
result = subject.entities_bordering_entity_at(600, 600)
|
166
|
+
expect(result).to eq(
|
167
|
+
[above1, above2, below1, below2,
|
168
|
+
left1, left2, right1, right2].to_set
|
169
|
+
)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
describe "#entities_overlapping" do
|
174
|
+
let(:upperleft) { Entity::Block.new(201, 201) }
|
175
|
+
let(:upperright) { Entity::Block.new(999, 201) }
|
176
|
+
let(:lowerleft) { Entity::Block.new(201, 999) }
|
177
|
+
let(:lowerright) { Entity::Block.new(999, 999) }
|
178
|
+
let(:too_left) { Entity::Block.new(200, 600) }
|
179
|
+
let(:too_right) { Entity::Block.new(1000, 600) }
|
180
|
+
let(:too_high) { Entity::Block.new(600, 200) }
|
181
|
+
let(:too_low) { Entity::Block.new(600, 1000) }
|
182
|
+
it "returns entities that intersect with an entity at that position" do
|
183
|
+
subject.put(1, 1, upperleft)
|
184
|
+
subject.put(1, 1, too_high)
|
185
|
+
subject.put(2, 1, upperright)
|
186
|
+
subject.put(2, 1, too_right)
|
187
|
+
subject.put(1, 2, lowerleft)
|
188
|
+
subject.put(1, 2, too_left)
|
189
|
+
subject.put(2, 2, lowerright)
|
190
|
+
subject.put(2, 2, too_low)
|
191
|
+
result = subject.entities_overlapping(600, 600)
|
192
|
+
expect(result).to eq(
|
193
|
+
[upperleft, upperright, lowerleft, lowerright].to_set
|
194
|
+
)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
describe "#cells_overlapping" do
|
199
|
+
it "returns cells that intersect with an entity at that position" do
|
200
|
+
result = subject.cells_overlapping(600, 600)
|
201
|
+
expect(result).to eq(
|
202
|
+
[Cell.new(1,1), Cell.new(2,1), Cell.new(1,2), Cell.new(2,2)]
|
203
|
+
)
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
describe "#add_entity_to_grid and #remove_entity_from_grid" do
|
208
|
+
let(:thing) { Entity::Block.new(600, 600) }
|
209
|
+
it "populates and de-populates the correct cells" do
|
210
|
+
expect(subject.at(1,1)).to be_empty
|
211
|
+
expect(subject.at(2,1)).to be_empty
|
212
|
+
expect(subject.at(1,2)).to be_empty
|
213
|
+
expect(subject.at(2,2)).to be_empty
|
214
|
+
subject.add_entity_to_grid(thing)
|
215
|
+
expect(subject.at(1,1)).to include(thing)
|
216
|
+
expect(subject.at(2,1)).to include(thing)
|
217
|
+
expect(subject.at(1,2)).to include(thing)
|
218
|
+
expect(subject.at(2,2)).to include(thing)
|
219
|
+
subject.remove_entity_from_grid(thing)
|
220
|
+
expect(subject.at(1,1)).to be_empty
|
221
|
+
expect(subject.at(2,1)).to be_empty
|
222
|
+
expect(subject.at(1,2)).to be_empty
|
223
|
+
expect(subject.at(2,2)).to be_empty
|
224
|
+
expect { subject.remove_entity_from_grid(thing) }.to raise_exception
|
225
|
+
end
|
226
|
+
end
|
227
|
+
describe "#update_grid_for_moved_entity" do
|
228
|
+
it "works when going from one cell to two" do
|
229
|
+
thing = Entity::Block.new(400, 400)
|
230
|
+
subject.add_entity_to_grid(thing)
|
231
|
+
expect(subject.at(1,1)).to include(thing)
|
232
|
+
expect(subject.at(2,1)).to be_empty
|
233
|
+
expect(subject.at(1,2)).to be_empty
|
234
|
+
expect(subject.at(2,2)).to be_empty
|
235
|
+
thing.x = 401
|
236
|
+
subject.update_grid_for_moved_entity(thing, 400, 400)
|
237
|
+
expect(subject.at(1,1)).to include(thing)
|
238
|
+
expect(subject.at(2,1)).to include(thing)
|
239
|
+
expect(subject.at(1,2)).to be_empty
|
240
|
+
expect(subject.at(2,2)).to be_empty
|
241
|
+
end
|
242
|
+
it "works when going from one cell to four" do
|
243
|
+
thing = Entity::Block.new(400, 400)
|
244
|
+
subject.add_entity_to_grid(thing)
|
245
|
+
expect(subject.at(1,1)).to include(thing)
|
246
|
+
expect(subject.at(2,1)).to be_empty
|
247
|
+
expect(subject.at(1,2)).to be_empty
|
248
|
+
expect(subject.at(2,2)).to be_empty
|
249
|
+
thing.x = thing.y = 401
|
250
|
+
subject.update_grid_for_moved_entity(thing, 400, 400)
|
251
|
+
expect(subject.at(1,1)).to include(thing)
|
252
|
+
expect(subject.at(2,1)).to include(thing)
|
253
|
+
expect(subject.at(1,2)).to include(thing)
|
254
|
+
expect(subject.at(2,2)).to include(thing)
|
255
|
+
end
|
256
|
+
it "works when going from four cells to one" do
|
257
|
+
thing = Entity::Block.new(410, 410)
|
258
|
+
subject.add_entity_to_grid(thing)
|
259
|
+
expect(subject.at(1,1)).to include(thing)
|
260
|
+
expect(subject.at(2,1)).to include(thing)
|
261
|
+
expect(subject.at(1,2)).to include(thing)
|
262
|
+
expect(subject.at(2,2)).to include(thing)
|
263
|
+
thing.x = thing.y = 400
|
264
|
+
subject.update_grid_for_moved_entity(thing, 410, 410)
|
265
|
+
expect(subject.at(1,1)).to include(thing)
|
266
|
+
expect(subject.at(2,1)).to be_empty
|
267
|
+
expect(subject.at(1,2)).to be_empty
|
268
|
+
expect(subject.at(2,2)).to be_empty
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
describe "#register" do
|
273
|
+
it "adds the object to the registry and entity list" do
|
274
|
+
thing = Entity::Block.new(0, 0)
|
275
|
+
thing.registry_id = :A
|
276
|
+
expect(subject.npcs).to be_empty
|
277
|
+
expect(subject[:A]).to be_nil
|
278
|
+
expect(subject.registered?(thing)).to be false
|
279
|
+
subject.register(thing)
|
280
|
+
expect(subject.npcs).to eq([thing])
|
281
|
+
expect(subject[:A]).to equal(thing)
|
282
|
+
expect(subject.registered?(thing)).to be true
|
283
|
+
end
|
284
|
+
it "allows the same object to be registered twice" do
|
285
|
+
thing = Entity::Block.new(0, 0)
|
286
|
+
thing.registry_id = :A
|
287
|
+
subject.register(thing)
|
288
|
+
subject.register(thing)
|
289
|
+
expect(subject.npcs).to eq([thing])
|
290
|
+
expect(subject[:A]).to equal(thing)
|
291
|
+
expect(subject.registered?(thing)).to be true
|
292
|
+
end
|
293
|
+
it "rejects another object with the same ID" do
|
294
|
+
thing1 = Entity::Block.new(0, 0)
|
295
|
+
thing1.registry_id = :A
|
296
|
+
subject.register(thing1)
|
297
|
+
thing2 = Entity::Block.new(0, 0)
|
298
|
+
thing2.registry_id = :A
|
299
|
+
subject.register(thing2)
|
300
|
+
expect(subject.npcs).to eq([thing1])
|
301
|
+
expect(subject[:A]).to equal(thing1)
|
302
|
+
expect(subject.registered?(thing1)).to be true
|
303
|
+
expect { subject.registered?(thing2) }.to raise_exception
|
304
|
+
end
|
305
|
+
end
|
306
|
+
describe "#deregister" do
|
307
|
+
it "removes the object from the registry and entity list" do
|
308
|
+
thing = Entity::Block.new(0, 0)
|
309
|
+
thing.registry_id = :A
|
310
|
+
subject.register(thing)
|
311
|
+
subject.deregister(thing)
|
312
|
+
expect(subject.npcs).to be_empty
|
313
|
+
expect(subject[:A]).to be_nil
|
314
|
+
expect(subject.registered?(thing)).to be false
|
315
|
+
end
|
316
|
+
it "refuses to remove the wrong object" do
|
317
|
+
thing1 = Entity::Block.new(0, 0)
|
318
|
+
thing1.registry_id = :A
|
319
|
+
subject.register(thing1)
|
320
|
+
thing2 = Entity::Block.new(0, 0)
|
321
|
+
thing2.registry_id = :A
|
322
|
+
expect { subject.deregister(thing2) }.to raise_exception
|
323
|
+
expect(subject.npcs).to eq([thing1])
|
324
|
+
expect(subject[:A]).to equal(thing1)
|
325
|
+
expect(subject.registered?(thing1)).to be true
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
describe "#<<" do
|
330
|
+
it "registers the entity and adds it to the grid" do
|
331
|
+
thing = Entity::Block.new(200, 400)
|
332
|
+
thing.registry_id = :A
|
333
|
+
subject << thing
|
334
|
+
expect(subject[:A]).to equal(thing)
|
335
|
+
expect(subject.at(0, 1)).to include thing
|
336
|
+
end
|
337
|
+
it "checks for conflicts" do
|
338
|
+
thing1 = Entity::Block.new(200, 400)
|
339
|
+
thing1.registry_id = :A
|
340
|
+
subject << thing1
|
341
|
+
thing2 = Entity::Block.new(0, 100)
|
342
|
+
thing2.registry_id = :B
|
343
|
+
subject << thing2
|
344
|
+
expect(subject[:B]).to be_nil
|
345
|
+
end
|
346
|
+
end
|
347
|
+
end
|
metadata
ADDED
@@ -0,0 +1,246 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: game_2d
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Greg Meyers
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-11-25 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: facets
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 2.9.3
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 2.9.3
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: gosu
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 0.8.5
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.8.5
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: json
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.8.1
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.8.1
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: renet
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 0.1.14
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 0.1.14
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: trollop
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '2.0'
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '2.0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: bundler
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ~>
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '1.7'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '1.7'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: rake
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '10.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '10.0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: rr
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ~>
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: 1.1.2
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ~>
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 1.1.2
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: rspec
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ~>
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: 3.1.0
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ~>
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: 3.1.0
|
158
|
+
description: Client/server sandbox game using Gosu and REnet
|
159
|
+
email:
|
160
|
+
- cmdr.samvimes@gmail.com
|
161
|
+
executables:
|
162
|
+
- game_2d_client.rb
|
163
|
+
- game_2d_server.rb
|
164
|
+
extensions: []
|
165
|
+
extra_rdoc_files: []
|
166
|
+
files:
|
167
|
+
- .gitignore
|
168
|
+
- Gemfile
|
169
|
+
- LICENSE.txt
|
170
|
+
- README.md
|
171
|
+
- Rakefile
|
172
|
+
- bin/game_2d_client.rb
|
173
|
+
- bin/game_2d_server.rb
|
174
|
+
- game_2d.gemspec
|
175
|
+
- lib/game_2d/client_connection.rb
|
176
|
+
- lib/game_2d/client_engine.rb
|
177
|
+
- lib/game_2d/complex_move.rb
|
178
|
+
- lib/game_2d/entity.rb
|
179
|
+
- lib/game_2d/entity/block.rb
|
180
|
+
- lib/game_2d/entity/owned_entity.rb
|
181
|
+
- lib/game_2d/entity/pellet.rb
|
182
|
+
- lib/game_2d/entity/titanium.rb
|
183
|
+
- lib/game_2d/entity_constants.rb
|
184
|
+
- lib/game_2d/game.rb
|
185
|
+
- lib/game_2d/game_space.rb
|
186
|
+
- lib/game_2d/game_window.rb
|
187
|
+
- lib/game_2d/hash.rb
|
188
|
+
- lib/game_2d/menu.rb
|
189
|
+
- lib/game_2d/move/rise_up.rb
|
190
|
+
- lib/game_2d/player.rb
|
191
|
+
- lib/game_2d/registerable.rb
|
192
|
+
- lib/game_2d/serializable.rb
|
193
|
+
- lib/game_2d/server_connection.rb
|
194
|
+
- lib/game_2d/server_port.rb
|
195
|
+
- lib/game_2d/storage.rb
|
196
|
+
- lib/game_2d/version.rb
|
197
|
+
- lib/game_2d/wall.rb
|
198
|
+
- lib/game_2d/zorder.rb
|
199
|
+
- media/Beep.wav
|
200
|
+
- media/Space.png
|
201
|
+
- media/Star.png
|
202
|
+
- media/Starfighter.bmp
|
203
|
+
- media/brick.gif
|
204
|
+
- media/cement.gif
|
205
|
+
- media/crosshair.gif
|
206
|
+
- media/dirt.gif
|
207
|
+
- media/pellet.png
|
208
|
+
- media/pellet.xcf
|
209
|
+
- media/player.png
|
210
|
+
- media/player.xcf
|
211
|
+
- media/rock.png
|
212
|
+
- media/rock.xcf
|
213
|
+
- media/steel.gif
|
214
|
+
- media/tele.gif
|
215
|
+
- media/titanium.gif
|
216
|
+
- media/unlikelium.gif
|
217
|
+
- spec/client_engine_spec.rb
|
218
|
+
- spec/game_space_spec.rb
|
219
|
+
homepage: ''
|
220
|
+
licenses:
|
221
|
+
- MIT
|
222
|
+
post_install_message:
|
223
|
+
rdoc_options: []
|
224
|
+
require_paths:
|
225
|
+
- lib
|
226
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
227
|
+
none: false
|
228
|
+
requirements:
|
229
|
+
- - ! '>='
|
230
|
+
- !ruby/object:Gem::Version
|
231
|
+
version: 1.9.3
|
232
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
233
|
+
none: false
|
234
|
+
requirements:
|
235
|
+
- - ! '>='
|
236
|
+
- !ruby/object:Gem::Version
|
237
|
+
version: '0'
|
238
|
+
requirements: []
|
239
|
+
rubyforge_project:
|
240
|
+
rubygems_version: 1.8.23
|
241
|
+
signing_key:
|
242
|
+
specification_version: 3
|
243
|
+
summary: Client/server sandbox game using Gosu and REnet
|
244
|
+
test_files:
|
245
|
+
- spec/client_engine_spec.rb
|
246
|
+
- spec/game_space_spec.rb
|