petermorphose 2.0.1 → 2.0.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/README.md +19 -4
- data/objects.ini +3 -3
- data/src/en.yml +1 -0
- data/src/main.rb +2 -2
- data/src/objects/collectible_object.rb +1 -1
- data/src/objects/game_object.rb +8 -8
- data/src/objects/living_object.rb +7 -1
- data/src/states/game.rb +6 -6
- metadata +17 -3
data/README.md
CHANGED
@@ -1,10 +1,17 @@
|
|
1
1
|
# Peter Morphose
|
2
2
|
|
3
|
-
|
3
|
+
```bash
|
4
|
+
gem install petermorphose
|
5
|
+
petermorphose
|
6
|
+
```
|
4
7
|
|
5
8
|
## What is Peter Morphose?
|
6
9
|
|
7
|
-
Peter Morphose is a jump-and-run-and-survive platformer I wrote between 2000 and 2001, using Borland Delphi and the DelphiX library.
|
10
|
+
Peter Morphose is a jump-and-run-and-survive platformer I wrote between 2000 and 2001, using Borland Delphi and the DelphiX library.
|
11
|
+
|
12
|
+
To give you an idea about the style of the game, you can look at the screenshot map of a typical level here: http://www.petermorphose.de/biddy/level/diezweibaeume.png
|
13
|
+
|
14
|
+
It was available only for Windows and only in German. The integrated level editor was popular with fans, but I never managed to build a community site to share those levels. I made some available in a level pack, though.
|
8
15
|
|
9
16
|
## What is this repository?
|
10
17
|
|
@@ -15,7 +22,7 @@ This repository is a work-in-progress rewrite of Peter Morphose using Ruby and G
|
|
15
22
|
* Simplified controls
|
16
23
|
* Simplified gameplay
|
17
24
|
* Full gamepad support
|
18
|
-
* Level compatibility with the original game is retained
|
25
|
+
* Level compatibility with the original game is retained (but not all levels are tested & included yet)
|
19
26
|
|
20
27
|
## Why oh why remake such a frustrating game?
|
21
28
|
|
@@ -24,8 +31,16 @@ This repository is a work-in-progress rewrite of Peter Morphose using Ruby and G
|
|
24
31
|
* Translating from Delphi to Ruby sounded easy enough, given how similar the languages look like.
|
25
32
|
* I wanted to have a new toy Ruby game to try to get running in NaCl. I ran out of time just porting the game though.
|
26
33
|
|
34
|
+
## References
|
35
|
+
|
36
|
+
* The original website, http://www.petermorphose.de/
|
37
|
+
* The Gosu gamedev library, http://www.libgosu.org/
|
38
|
+
* KaiserBiddy’s German info page, with screenshots of many levels, http://www.petermorphose.de/biddy/
|
39
|
+
* Christopher Hauck’s German fansite, with more downloadable levels, http://www.christopherhauck.de/f2_pm.php
|
40
|
+
* Its lonely Facebook page I didn’t even know about, https://www.facebook.com/pages/Peter-Morphose/124840104250204
|
41
|
+
|
27
42
|
## But there is still so much wrong about the game!
|
28
43
|
|
29
44
|
Feel free to fork it or file issues :)
|
30
45
|
|
31
|
-
-- Julian
|
46
|
+
-- Julian
|
data/objects.ini
CHANGED
data/src/en.yml
CHANGED
data/src/main.rb
CHANGED
@@ -8,7 +8,6 @@ require_relative 'gosu-preview' # upcoming Gosu 0.8 interface wrapper
|
|
8
8
|
|
9
9
|
# Gosu related polish
|
10
10
|
# TODO Proper scaling
|
11
|
-
# TODO Packaging as gem
|
12
11
|
# TODO Deployment tasks
|
13
12
|
# TODO Better resource handling
|
14
13
|
|
@@ -30,7 +29,8 @@ Dir.chdir File.expand_path("#{__FILE__}/../..")
|
|
30
29
|
|
31
30
|
%w(localization script const helpers/graphics helpers/audio helpers/input
|
32
31
|
states/state states/title states/menu states/level_selection states/game
|
33
|
-
objects/object_def objects/game_object objects/living_object
|
32
|
+
objects/object_def objects/game_object objects/living_object
|
33
|
+
objects/collectible_object objects/effect_object
|
34
34
|
ini_file level_info map).each { |fn| require_relative fn }
|
35
35
|
|
36
36
|
# Not yet part of gosu-preview
|
@@ -38,7 +38,7 @@ class CollectibleObject < GameObject
|
|
38
38
|
# Cannot be collected...
|
39
39
|
return if game.player.action >= ACT_DEAD
|
40
40
|
|
41
|
-
if collide_with? game.player.rect(
|
41
|
+
if collide_with? game.player.rect(3, 3) then
|
42
42
|
case pmid
|
43
43
|
when ID_CAROLIN then
|
44
44
|
game.cast_objects ID_FX_FLYING_CHAIN, 8, 0, -1, 3, rect(1, -1)
|
data/src/objects/game_object.rb
CHANGED
@@ -263,8 +263,8 @@ class GameObject
|
|
263
263
|
|
264
264
|
def stuck?
|
265
265
|
rect = self.rect
|
266
|
-
map.solid?(rect.left, rect.top) or map.solid?(rect.right, rect.top) or
|
267
|
-
map.solid?(rect.left, rect.bottom) or map.solid?(rect.right, rect.bottom)
|
266
|
+
game.map.solid?(rect.left, rect.top) or game.map.solid?(rect.right, rect.top) or
|
267
|
+
game.map.solid?(rect.left, rect.bottom) or game.map.solid?(rect.right, rect.bottom)
|
268
268
|
end
|
269
269
|
|
270
270
|
def blocked? direction
|
@@ -291,39 +291,39 @@ class GameObject
|
|
291
291
|
emit_sound :turbo
|
292
292
|
fling 0, -21, 0, true, false
|
293
293
|
self.y -= 1 unless blocked? DIR_UP
|
294
|
-
self.x = x /
|
294
|
+
self.x = x / TILE_SIZE * TILE_SIZE + 11
|
295
295
|
self.vx = direction.dir_to_vx if pmid.between? ID_ENEMY, ID_ENEMY_MAX
|
296
296
|
game.cast_fx 0, 0, 10, x, y, 24, 24, 0, -10, 1
|
297
297
|
when TILE_AIR_ROCKET_UP_LEFT then
|
298
298
|
emit_sound :turbo
|
299
299
|
self.y -= 1 unless blocked? DIR_UP
|
300
300
|
fling -10, -16, 0, true, false
|
301
|
-
self.y = y / TILE_SIZE
|
301
|
+
self.y = y / TILE_SIZE * TILE_SIZE + 11
|
302
302
|
TILE_SIZE.times { if stuck? then self.vy -= 1 else break end }
|
303
303
|
game.cast_fx 0, 0, 10, x, y, 24, 24, -8, -8, 1
|
304
304
|
when TILE_AIR_ROCKET_UP_RIGHT then
|
305
305
|
emit_sound :turbo
|
306
306
|
self.y -= 1 unless blocked? DIR_UP
|
307
307
|
fling +10, -16, 0, true, false
|
308
|
-
self.y = y / TILE_SIZE
|
308
|
+
self.y = y / TILE_SIZE * TILE_SIZE + 11
|
309
309
|
TILE_SIZE.times { if stuck? then self.vy -= 1 else break end }
|
310
310
|
game.cast_fx 0, 0, 10, x, y, 24, 24, +8, -8, 1
|
311
311
|
when TILE_AIR_ROCKET_LEFT then
|
312
312
|
emit_sound :turbo
|
313
313
|
fling -20, -3, 0, true, false
|
314
|
-
self.y = y / TILE_SIZE
|
314
|
+
self.y = y / TILE_SIZE * TILE_SIZE + 11
|
315
315
|
TILE_SIZE.times { if stuck? then self.vy -= 1 else break end }
|
316
316
|
game.cast_fx 0, 0, 10, x, y, 24, 24, -10, 0, 1
|
317
317
|
when TILE_AIR_ROCKET_RIGHT then
|
318
318
|
emit_sound :turbo
|
319
319
|
fling +20, -3, 0, true, false
|
320
|
-
self.y = y / TILE_SIZE
|
320
|
+
self.y = y / TILE_SIZE * TILE_SIZE + 11
|
321
321
|
TILE_SIZE.times { if stuck? then self.vy -= 1 else break end }
|
322
322
|
game.cast_fx 0, 0, 10, x, y, 24, 24, +10, 0, 1
|
323
323
|
when TILE_AIR_ROCKET_DOWN then
|
324
324
|
emit_sound :turbo
|
325
325
|
fling 0, 15, 0, true, false
|
326
|
-
self.y = y / TILE_SIZE
|
326
|
+
self.y = y / TILE_SIZE * TILE_SIZE + 11
|
327
327
|
self.vx = direction.dir_to_vx if pmid.between? ID_ENEMY, ID_ENEMY_MAX
|
328
328
|
game.cast_fx 0, 0, 10, x, y, 24, 24, -10, 0, 1
|
329
329
|
when TILE_SLOW_ROCKET_UP then
|
@@ -554,7 +554,7 @@ class LivingObject < GameObject
|
|
554
554
|
end
|
555
555
|
end
|
556
556
|
|
557
|
-
def
|
557
|
+
def use_everything
|
558
558
|
return if busy?
|
559
559
|
|
560
560
|
# Lever behind player
|
@@ -569,6 +569,12 @@ class LivingObject < GameObject
|
|
569
569
|
return
|
570
570
|
end
|
571
571
|
|
572
|
+
use_tile
|
573
|
+
end
|
574
|
+
|
575
|
+
def use_tile
|
576
|
+
return if busy?
|
577
|
+
|
572
578
|
# Tile below player (magic floor tiles)
|
573
579
|
case map_tile = game.map[x / TILE_SIZE, (y + ObjectDef[pmid].rect.bottom + 1) / TILE_SIZE]
|
574
580
|
when TILE_ROCKET_UP, TILE_ROCKET_UP_2, TILE_ROCKET_UP_3 then
|
data/src/states/game.rb
CHANGED
@@ -137,7 +137,7 @@ class Game < State
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
140
|
-
return if not @result.nil?
|
140
|
+
return if not @result.nil? or @paused
|
141
141
|
|
142
142
|
@frame = (@frame + 1) % 2400
|
143
143
|
@message_opacity -= 3 if @message_opacity > 0
|
@@ -226,7 +226,7 @@ class Game < State
|
|
226
226
|
|
227
227
|
if frame > 2 then
|
228
228
|
player.jump if jump_pressed?
|
229
|
-
|
229
|
+
player.use_tile if use_pressed?
|
230
230
|
player.act if action_pressed?
|
231
231
|
end
|
232
232
|
|
@@ -299,10 +299,10 @@ class Game < State
|
|
299
299
|
elsif @paused then
|
300
300
|
@paused = false if id == Gosu::KbP
|
301
301
|
else
|
302
|
-
@paused = true
|
303
|
-
player.jump
|
304
|
-
player.
|
305
|
-
player.act
|
302
|
+
@paused = true if id == Gosu::KbP
|
303
|
+
player.jump if jump? id and fly_time_left == 0
|
304
|
+
player.use_everything if use? id and fly_time_left == 0
|
305
|
+
player.act if action? id
|
306
306
|
end
|
307
307
|
when :lost then
|
308
308
|
if menu_cancel? id then
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: petermorphose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 2
|
10
|
+
version: 2.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Julian Raschke
|
@@ -55,6 +55,20 @@ dependencies:
|
|
55
55
|
version: "2.0"
|
56
56
|
type: :runtime
|
57
57
|
version_requirements: *id002
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: require_relative
|
60
|
+
prerelease: false
|
61
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
hash: 3
|
67
|
+
segments:
|
68
|
+
- 0
|
69
|
+
version: "0"
|
70
|
+
type: :runtime
|
71
|
+
version_requirements: *id003
|
58
72
|
description: Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably
|
59
73
|
email:
|
60
74
|
- julian@raschke.de
|