rate
authorFrank DeMarco <frank.s.demarco@gmail.com>
Thu, 29 May 2014 17:51:17 +0000 (02:51 +0900)
committerFrank DeMarco <frank.s.demarco@gmail.com>
Thu, 29 May 2014 17:51:17 +0000 (02:51 +0900)
config
lake_of_heavenly_wind/LakeOfHeavenlyWind.py
resource/high-scores

diff --git a/config b/config
index 83a0836..b921c51 100644 (file)
--- a/config
+++ b/config
@@ -11,6 +11,7 @@ init-script = lake-of-heavenly-wind
 package-root = lake_of_heavenly_wind
 
 [display]
+font = wt009.ttf
 dimensions = 640, 480
 caption = ☱☰☴
 
@@ -18,13 +19,10 @@ caption = ☱☰☴
 visible = False
 
 [keys]
-release-left = K_z
-release-right = K_x
 advance = K_RETURN
+release-right = K_x
 quit = K_ESCAPE
-
-[display]
-font = wt009.ttf
+release-left = K_z
 
 [image]
 plateau = img/B59-plus.png
@@ -32,25 +30,27 @@ paddle = img/Old-Bag-of-Bones.png
 pulp = img/Burns-1930/
 
 [audio]
-inner = aud/Sunpeak-Capsaicin.ogg
-outer = aud/Fever-for-Immolation-Ruins.ogg
 fx = aud/Knife-Glory/
+outer = aud/Fever-for-Immolation-Ruins.ogg
+inner = aud/Sunpeak-Capsaicin.ogg
 
 [text]
-scores = high-scores
 book = Book-of-Changes
+scores = high-scores
 
 [interpolate]
-deviation-1 = C 0.0 0.0, .5 1.1, .75 -.3, 1.0 0.0
+spawn = C 0.0 0.01, 1.3 0.03, 10.0 0.077, 15.0 0.1
+deviation-11 = L 0.0 -1.0, 0.25 -0.5, 0.5 1.0, 0.75 1.5, 1.0 0.0
+deviation-10 = C 0.0 0.0, 0.12 -0.25, 0.25 0.25, 0.38 -0.25, 0.5 0.25, 0.62 -0.25, 0.75 0.25, 0.88 -0.25, 1.0 0.0
+deviation-13 = C 0.0 0.3, 0.5 -0.75, 1.0 0.0
+deviation-12 = C 0.0 0.0, 0.5 2.0, 1.0 0.0
+deviation-9 = L 0.0 0.0, 0.75 1.2, 1.0 0.0
+deviation-8 = C 0.0 0.0, 0.5 1.5, 0.8 0.0, 1.0 0.0
+step = C 0.0 0.0025, 2.8 0.0035, 12.0 0.0046, 15.0 0.005
+deviation-1 = C 0.0 0.0, 0.5 1.1, 0.75 -0.3, 1.0 0.0
+deviation-3 = L 0.0 -0.75, 1.0 0.0
 deviation-2 = L 0.0 3.0, 1.0 0.0
-deviation-3 = L 0.0 -.75, 1.0 0.0
-deviation-4 = L 0.0 0.0, .5 2.5, 1.0 0.0
-deviation-5 = C 0.0 -1.0, .25 -.8, .5 0.0, .75 .7, 1.0 0.0
-deviation-6 = C 0.0 2.0, .8 .75, 1.0 0.0
-deviation-7 = L 0.0 0.0, .1 .35, .2 -.35, .3 .2, .4 -.2, .5 .1, .6 -.1, .7 .05, .8 -.05, .9 .0125, 1.0 0.0
-deviation-8 = C 0.0 0.0, .5 1.5, .8 0.0, 1.0 0.0
-deviation-9 = L 0.0 0.0, .75 1.25, 1 0.0
-deviation-10 = C 0.0 0.0, .125 -.25, .25 .25, .375 -.25, .5 .25, .625 -.25, .75 .25, .875 -.25, 1.0 0
-deviation-11 = L 0.0 -1.0, .25 -.5, .5 1.0, .75 1.5, 1.0 0.0
-deviation-12 = C 0.0 0.0, .5 2.0, 1.0 0.0
-deviation-13 = C 0.0 .3, .5 -.75, 1.0 0.0
+deviation-5 = C 0.0 -1.0, 0.25 -0.8, 0.5 0.0, 0.75 0.7, 1.0 0.0
+deviation-4 = L 0.0 0.0, 0.5 2.5, 1.0 0.0
+deviation-7 = L 0.0 0.0, 0.1 0.35, 0.2 -0.35, 0.3 0.2, 0.4 -0.2, 0.5 0.1, 0.6 -0.1, 0.7 0.05, 0.8 -0.05, 0.9 0.013, 1.0 0.0
+deviation-6 = C 0.0 2.0, 0.8 0.75, 1.0 0.0
index 9670130..afd30a6 100644 (file)
@@ -273,6 +273,7 @@ class GameScreen(GameChild):
         self.display_surface = self.get_display_surface()
         self.music = Sound(self.get_resource("audio", "inner"))
         self.previous_palette = None
+        self.wave = 0
         self.deactivate()
         self.set_background()
         self.pulp = Pulp(self)
@@ -914,6 +915,9 @@ class Rails(GameChild, list):
         self.depth = self.display_surface.get_height() + 4
         self.stray = 128
         self.view_y = 0
+        interpolator = self.get_game().interpolator
+        self.spawn_nodeset = interpolator.get_nodeset("spawn")
+        self.step_nodeset = interpolator.get_nodeset("step")
         margin = 32
         limit = self.display_surface.get_width() - margin
         step = (limit - margin) / 16
@@ -938,20 +942,21 @@ class Rails(GameChild, list):
         self.set_background()
 
     def reset(self):
-        self.spawn_rate = .008
-        self.phage_step = .0025
+        self.increase_spawn_rate()
         self.clear_phages()
 
     def clear_phages(self):
         self.phages = []
 
     def increase_spawn_rate(self):
-        if self.spawn_rate < .065:
-            self.spawn_rate += self.spawn_rate * .3
-            self.phage_step += self.phage_step * .05
-        else:
-            self.spawn_rate += 1e-3 / self.spawn_rate
-            self.phage_step += 3e-7 / self.phage_step
+        self.spawn_rate = self.spawn_nodeset.get_y(self.parent.wave)
+        self.phage_step = self.step_nodeset.get_y(self.parent.wave)
+        # if self.spawn_rate < .065:
+        #     self.spawn_rate += self.spawn_rate * .3
+        #     self.phage_step += self.phage_step * .05
+        # else:
+        #     self.spawn_rate += 1e-3 / self.spawn_rate
+        #     self.phage_step += 3e-7 / self.phage_step
 
     def set_background(self):
         end = self.parent.link.background.location.bottom
@@ -1012,6 +1017,8 @@ class Phage(GameChild):
                 surface.fill([(255, 255, 255), (31, 31, 31)][(size + ii) % 2])
                 segment.add_frame(surface)
             body.append(segment)
+        center = self.parent.phage_step
+        self.step = random() * .002 - .001 + center
 
     def get_center(self):
         return self.body[0].location.bottomright
index 31f1404..38e03cc 100644 (file)
@@ -3,3 +3,4 @@
 1000
 1200
 1500
+1429