Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

more levels, finetuned gfx, easier to edit/play

  • Loading branch information...
commit 4893142fbd12b5294b172734b2e5baa8a4fe3a18 1 parent b6bfed5
ippa authored
View
2  build.bat
@@ -1,2 +1,2 @@
-ocra start_game.rb --console media\** src\** lib\**
+ocra start_game.rb --console media/* src/* lib/* levels/*
View
81 levels/empty_level.yml
@@ -0,0 +1,81 @@
+---
+- GrassBlock:
+ :x: 0.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 80.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 160.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 240.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 320.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 400.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 480.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 560.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 640.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 720.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
View
30 levels/level1.yml
@@ -143,19 +143,35 @@
:factor_x: 2.28571428571429
:factor_y: 2.58064516129032
:color: 4294967295
-- BigPixel:
- :x: 218.0
- :y: 128.6
+- Brick:
+ :x: 112.0
+ :y: 320.0
:angle: 0
- :zorder: 30
- :factor_x: 4
- :factor_y: 4
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
:color: 4294967295
- Brick:
- :x: 112.0
+ :x: 320.0
:y: 320.0
:angle: 0
:zorder: 100
:factor_x: 1.5
:factor_y: 2.0
:color: 4294967295
+- SmallPixel:
+ :x: 336.0
+ :y: 160.0
+ :angle: 0
+ :zorder: 31
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- BigPixel:
+ :x: 112.0
+ :y: 128.0
+ :angle: 0
+ :zorder: 30
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
View
193 levels/level10.yml
@@ -0,0 +1,193 @@
+---
+- GrassBlock:
+ :x: 0.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 80.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 160.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 240.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 320.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 400.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 480.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 560.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 640.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 720.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- BigPixel:
+ :x: 80.0
+ :y: 368.0
+ :angle: 0
+ :zorder: 30
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- SmallPixel:
+ :x: 768.0
+ :y: 464.0
+ :angle: 0
+ :zorder: 31
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- SmallPixel:
+ :x: 576.0
+ :y: 464.0
+ :angle: 0
+ :zorder: 31
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- SmallPixel:
+ :x: 672.0
+ :y: 464.0
+ :angle: 0
+ :zorder: 31
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- RightBrick:
+ :x: 528.0
+ :y: 528.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- RightBrick:
+ :x: 528.0
+ :y: 512.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- RightBrick:
+ :x: 528.0
+ :y: 496.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- RightBrick:
+ :x: 528.0
+ :y: 480.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- RightBrick:
+ :x: 528.0
+ :y: 464.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- LeftBrick:
+ :x: 512.0
+ :y: 464.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- LeftBrick:
+ :x: 512.0
+ :y: 480.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- LeftBrick:
+ :x: 512.0
+ :y: 496.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- LeftBrick:
+ :x: 512.0
+ :y: 512.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- LeftBrick:
+ :x: 512.0
+ :y: 528.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
View
185 levels/level4.yml
@@ -0,0 +1,185 @@
+---
+- GrassBlock:
+ :x: 240.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 320.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 400.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 160.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 80.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 0.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 480.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 560.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 640.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 720.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- Brick:
+ :x: 336.0
+ :y: 432.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 384.0
+ :y: 432.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- TinyPixel:
+ :x: 576.0
+ :y: 480.0
+ :angle: 0
+ :zorder: 32
+ :factor_x: 1.77777777777778
+ :factor_y: 1.77777777777778
+ :color: 4294967295
+- Brick:
+ :x: 432.0
+ :y: 432.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- TinyPixel:
+ :x: 672.0
+ :y: 464.0
+ :angle: 0
+ :zorder: 32
+ :factor_x: 1.77777777777778
+ :factor_y: 1.77777777777778
+ :color: 4294967295
+- RightBrick:
+ :x: 480.0
+ :y: 432.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 288.0
+ :y: 432.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- LeftBrick:
+ :x: 272.0
+ :y: 432.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- BigPixel:
+ :x: 256.0
+ :y: 176.0
+ :angle: 0
+ :zorder: 30
+ :factor_x: 1.37142857142857
+ :factor_y: 1.37142857142857
+ :color: 4294967295
+- BigPixel:
+ :x: 480.0
+ :y: 160.0
+ :angle: 0
+ :zorder: 30
+ :factor_x: 1.37142857142857
+ :factor_y: 1.37142857142857
+ :color: 4294967295
+- RightBrick:
+ :x: 112.0
+ :y: 272.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 64.0
+ :y: 272.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- LeftBrick:
+ :x: 48.0
+ :y: 272.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
View
249 levels/level5.yml
@@ -0,0 +1,249 @@
+---
+- GrassBlock:
+ :x: 0.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 80.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 160.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 240.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 320.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 400.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 480.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 560.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 640.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 720.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- Brick:
+ :x: 176.0
+ :y: 272.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 224.0
+ :y: 272.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 272.0
+ :y: 272.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 320.0
+ :y: 272.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 368.0
+ :y: 272.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 416.0
+ :y: 272.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 464.0
+ :y: 272.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 256.0
+ :y: 432.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 304.0
+ :y: 432.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 352.0
+ :y: 432.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 400.0
+ :y: 432.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 448.0
+ :y: 432.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 512.0
+ :y: 272.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- RightBrick:
+ :x: 560.0
+ :y: 272.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- LeftBrick:
+ :x: 160.0
+ :y: 272.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- RightBrick:
+ :x: 496.0
+ :y: 432.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- LeftBrick:
+ :x: 240.0
+ :y: 432.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- SmallPixel:
+ :x: 348.0
+ :y: 202.9
+ :angle: 0
+ :zorder: 31
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- SmallPixel:
+ :x: 476.0
+ :y: 202.9
+ :angle: 0
+ :zorder: 31
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- BigPixel:
+ :x: 128.0
+ :y: 128.0
+ :angle: 0
+ :zorder: 30
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- TinyPixel:
+ :x: 572.0
+ :y: 488.9
+ :angle: 0
+ :zorder: 32
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
View
217 levels/level6.yml
@@ -0,0 +1,217 @@
+---
+- GrassBlock:
+ :x: 0.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 80.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 160.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 240.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 320.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 400.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 480.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 560.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 640.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 720.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- Brick:
+ :x: 272.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 320.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 368.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 416.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 464.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- BigPixel:
+ :x: 128.0
+ :y: 128.0
+ :angle: 0
+ :zorder: 30
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- BigPixel:
+ :x: 224.0
+ :y: 130.2
+ :angle: 0
+ :zorder: 30
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- Brick:
+ :x: 224.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 512.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 176.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.5
+ :factor_y: 2.0
+ :color: 4294967295
+- LeftBrick:
+ :x: 160.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- RightBrick:
+ :x: 560.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- SmallPixel:
+ :x: 464.0
+ :y: 176.0
+ :angle: 0
+ :zorder: 31
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- TinyPixel:
+ :x: 368.0
+ :y: 176.0
+ :angle: 0
+ :zorder: 32
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- BigPixel:
+ :x: 608.0
+ :y: 128.0
+ :angle: 0
+ :zorder: 30
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- RightBrick:
+ :x: 640.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- LeftBrick:
+ :x: 624.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
View
153 levels/level7.yml
@@ -0,0 +1,153 @@
+---
+- GrassBlock:
+ :x: 0.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 80.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 160.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 240.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 320.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 400.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 480.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 560.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 640.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 720.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- BigPixel:
+ :x: 620.0
+ :y: 319.400000000002
+ :angle: 0
+ :zorder: 30
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- BigPixel:
+ :x: 666.0
+ :y: 312.900000000001
+ :angle: 0
+ :zorder: 30
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- BigPixel:
+ :x: 544.0
+ :y: 326.500000000002
+ :angle: 0
+ :zorder: 30
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- Brick:
+ :x: 304.0
+ :y: 416.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 368.0
+ :y: 416.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- RightBrick:
+ :x: 496.0
+ :y: 416.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- LeftBrick:
+ :x: 288.0
+ :y: 416.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 432.0
+ :y: 416.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- BigPixel:
+ :x: 84.0
+ :y: 293.800000000001
+ :angle: 0
+ :zorder: 30
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
View
433 levels/level8.yml
@@ -0,0 +1,433 @@
+---
+- GrassBlock:
+ :x: 0.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 80.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 160.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 240.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 320.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 400.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 480.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 560.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 640.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 720.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- Brick:
+ :x: 176.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- Brick:
+ :x: 240.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- Brick:
+ :x: 304.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- GrassBlock:
+ :x: 0.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 80.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 160.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 240.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 320.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 400.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 480.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 560.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 640.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 720.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- Brick:
+ :x: 176.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 240.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 304.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 432.0
+ :y: 144.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- GrassBlock:
+ :x: 0.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 80.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 160.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 240.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 320.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 400.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 480.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 560.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 640.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 720.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- Brick:
+ :x: 176.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 240.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 304.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- GrassBlock:
+ :x: 0.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 80.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 160.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 240.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 320.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 400.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 480.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 560.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 640.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 720.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- Brick:
+ :x: 176.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 240.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 304.0
+ :y: 240.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
+- Brick:
+ :x: 432.0
+ :y: 144.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2.0
+ :factor_y: 2.0
+ :color: 4294967295
View
233 levels/level9.yml
@@ -0,0 +1,233 @@
+---
+- GrassBlock:
+ :x: 0.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 80.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 160.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 240.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 320.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 400.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 480.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 560.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 640.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- GrassBlock:
+ :x: 720.0
+ :y: 544.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 1.9047619047619
+ :factor_y: 2.06451612903226
+ :color: 4294967295
+- BigPixel:
+ :x: 112.0
+ :y: 128.0
+ :angle: 0
+ :zorder: 30
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- LeftBrick:
+ :x: 0.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- Brick:
+ :x: 16.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- Brick:
+ :x: 80.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- Brick:
+ :x: 224.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- RightBrick:
+ :x: 144.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- LeftBrick:
+ :x: 208.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- Brick:
+ :x: 288.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- RightBrick:
+ :x: 352.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- LeftBrick:
+ :x: 416.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- Brick:
+ :x: 432.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- Brick:
+ :x: 496.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- RightBrick:
+ :x: 560.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- LeftBrick:
+ :x: 640.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- Brick:
+ :x: 656.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- Brick:
+ :x: 720.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- RightBrick:
+ :x: 784.0
+ :y: 224.0
+ :angle: 0
+ :zorder: 100
+ :factor_x: 2
+ :factor_y: 2
+ :color: 4294967295
+- BigPixel:
+ :x: 320.0
+ :y: 128.0
+ :angle: 0
+ :zorder: 30
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
+- SmallPixel:
+ :x: 480.0
+ :y: 128.0
+ :angle: 0
+ :zorder: 31
+ :factor_x: 4
+ :factor_y: 4
+ :color: 4294967295
View
BIN  media/die2.wav
Binary file not shown
View
BIN  media/fire.gal
Binary file not shown
View
BIN  media/fire2.bmp
Binary file not shown
View
BIN  media/fire2.gal
Binary file not shown
View
BIN  media/grass_test.bmp
Binary file not shown
View
BIN  media/walk.bmp
Binary file not shown
View
BIN  media/walk.gal
Binary file not shown
View
28 src/level.rb
@@ -2,6 +2,12 @@ class Level < GameState
trait :timer
attr_reader :game_object_map, :player
+ def initialize(options = {})
+ super
+
+ @player = Player.create(:x => $window.width/2, :y => $window.height - 75)
+ end
+
def setup
self.input = { :e => :edit, :esc => MenuState, :p => GameStates::Pause }
@@ -11,10 +17,15 @@ def setup
@to = Color.new(0xFF1E5D5F)
@grid = [16,16]
+ game_objects.select { |game_object| !game_object.is_a? Player }.each { |game_object| game_object.destroy }
@file = File.join(ROOT, "levels", self.filename + ".yml")
load_game_objects(:file => @file)
- @player = Player.create(:x => $window.width/2, :y => $window.height - 80)
+ if Block.size == 0
+ puts "* Loading boiler-plate level!"
+ load_game_objects(:file => File.join(ROOT, "levels", "empty_level.yml"))
+ end
+
@game_object_map = GameObjectMap.new(:grid => @grid, :game_objects => Brick.all + Block.all)
game_objects.pause!
@@ -38,6 +49,8 @@ def update
@player.each_collision(Pixel) do |player, pixel|
player.hit_by(pixel)
$window.lives -= 1
+ during(500) { @player.mode = (@player.mode == :default) ? :additive : :default }
+
game_objects.pause!
@player.collidable = false
after(500) { switch_game_state(self.class) } # Restart level
@@ -62,17 +75,24 @@ def update
#game_objects.destroy_if { |game_object| game_object.outside_window? }
- if Pixel.size == 0
+ if Brick.size > 0 && Pixel.size == 0
$window.next_level
end
- $window.caption = "PixelPang - #{self.class}! Score: #{$window.score}. FPS: #{$window.fps} - Game objects: #{game_objects.size}"
+ $window.caption = "PixelPang - #{self.class}! Score: #{$window.score}. FPS: #{$window.fps} - Pixels: #{Pixel.size}"
end
end
class Level1 < Level; end
class Level2 < Level; end
class Level3 < Level; end
+class Level4 < Level; end
+class Level5 < Level; end
+class Level6 < Level; end
+class Level7 < Level; end
+class Level8 < Level; end
+class Level9 < Level; end
+class Level10 < Level; end
class ScoreText < Text
traits :velocity
@@ -83,7 +103,7 @@ def setup
def update
self.alpha -= 2
- destroy if self.alpha == 0
+ destroy if self.alpha == 0
end
end
View
1  src/pixel.rb
@@ -98,7 +98,6 @@ def initialize(options)
self.velocity_x = (-5 + rand(10)) * 2
self.acceleration_y = 0.50
self.mode = :additive
- #self.color = Color::WHITE.dup
self.alpha = 100
Sound["pop.wav"].play(0.2)
end
View
18 src/player.rb
@@ -1,6 +1,6 @@
class Player < GameObject
traits :velocity, :timer, :collision_detection
- trait :bounding_box, :scale => 0.60, :debug => DEBUG
+ trait :bounding_box, :scale => 0.60, :debug => false
attr_accessor :score
@@ -16,14 +16,14 @@ def initialize(options)
@speed = 4
@cooling_down = false
- @anim = {}
- @anim[:full] = Animation.new(:file => "walk.bmp", :size => [42, 42], :delay => 40)
+ @anim = {}
+ @anim[:full] = Animation.new(:file => "walk.bmp", :size => [29, 41], :delay => 40)
@anim[:walking] = @anim[:full][0..2]
@image = @anim[:walking].first
- @anim[:fire] = Animation.new(:file => "fire.bmp", :size => [42, 42], :delay => 40)
+ @anim[:fire] = Animation.new(:file => "fire2.bmp", :size => [32, 48], :delay => 40)
- self.zorder = 20
+ self.zorder = 30
self.acceleration_y = 0.50
cache_bounding_box
end
@@ -64,24 +64,24 @@ def fire
end
def hit_by(object)
- Sound["die.wav"].play(0.1)
+ Sound["die2.wav"].play(0.2)
end
end
class Laser < GameObject
traits :collision_detection, :timer
- trait :bounding_box, :scale => 0.80, :debug => DEBUG
+ trait :bounding_box, :scale => 0.50, :debug => false
def setup
Sound["player_fire.wav"].play(0.1)
@factor_seed = 0.1
@image = Image["laser.png"]
- self.zorder = 20
+ self.zorder = 25
self.rotation_center(:top_center)
every(50) { self.mode = (self.mode == :additive) ? :default : :additive }
every(100) { Star.create(:x => @x, :y => @y) }
- cache_bounding_box
+ #cache_bounding_box
end
def update
View
2  src/terrain.rb
@@ -10,3 +10,5 @@ def setup
class GrassBlock < Block; end
+class GrassTest < Block; end
+
View
6 start_game.rb
@@ -3,8 +3,8 @@
#
begin
- require '../chingu/lib/chingu'
raise LoadError if defined?(Ocra)
+ require '../chingu/lib/chingu'
rescue LoadError
require 'chingu'
end
@@ -40,13 +40,13 @@ def initialize
Sound["pop.wav"] # <-- lame caching untill chingu gets "cache_media()" or simular
Sound["player_fire.wav"] # -""-
- Sound["die.wav"] # -""-
+ Sound["die2.wav"] # -""-
push_game_state(MenuState)
end
def reset_game
- @levels = [Level1, Level2, Level3]
+ @levels = [Level1, Level2, Level3, Level4, Level5, Level6, Level7, Level8, Level9, Level10]
@score = 0
@lives = 3
end
Please sign in to comment.
Something went wrong with that request. Please try again.