score padding
authorFrank DeMarco <frank.s.demarco@gmail.com>
Thu, 23 Jul 2015 10:33:20 +0000 (06:33 -0400)
committerFrank DeMarco <frank.s.demarco@gmail.com>
Thu, 23 Jul 2015 10:33:20 +0000 (06:33 -0400)
config
electric_sieve/ElectricSieve.py
resource/aud/Heat-quiet.ogg [new file with mode: 0644]
resource/high-scores

diff --git a/config b/config
index 9aca235..c5d5b1e 100644 (file)
--- a/config
+++ b/config
@@ -34,7 +34,7 @@ triangles = aud/777.ogg
 hit = aud/Skinball.wav
 miss = aud/0Sj-99_Em.wav
 end = aud/Sarcophagus-Soar-and-to-Commune.ogg
-noise = aud/Heat.ogg
+noise = aud/Heat-quiet.ogg
 
 [interpolate]
 volume = C 0.0 0.0, 16.0 0.61, 80.0 1.0
index c11bebc..617bb4a 100644 (file)
@@ -183,6 +183,8 @@ class Scoreboard(GameChild):
     SPACING = 70
     MARGIN = 30
     BLINK_INTERVAL = 400
+    PADDING = 6
+    BORDER = 1
 
     def __init__(self, parent):
         GameChild.__init__(self, parent)
@@ -198,7 +200,7 @@ class Scoreboard(GameChild):
             scores.append((float(fields[0]), int(fields[1]), fields[2]))
         self.sprites = sprites = []
         font_path = self.get_resource("display", "scoreboard-font-path")
-        sizes = [14] * 5
+        sizes = [24] * 5
         for ii, score in enumerate(sorted(scores, key=lambda score: score[1],
                                           reverse=True)[:len(sizes)]):
             font = Font(font_path, sizes[ii])
@@ -214,14 +216,14 @@ class Scoreboard(GameChild):
             rect.center = surface.get_rect().center
             surface.blit(score_plate, rect)
             sprites[ii][1].add_frame(render_box(font, score_text, False, color,
-                                                self.BACKGROUND, self.FOREGROUND, 1, 2))
+                                                self.BACKGROUND, self.FOREGROUND, self.BORDER, self.PADDING))
             sprites[ii][0].add_frame(render_box(font, score[2], False, color,
-                                                 self.BACKGROUND, self.FOREGROUND, 1, 2))
+                                                 self.BACKGROUND, self.FOREGROUND, self.BORDER, self.PADDING))
             if score[1] == self.most_recent_score:
                 sprites[ii][1].add_frame(render_box(font, score_text, False, self.NEW,
-                                                    self.BACKGROUND, self.FOREGROUND, 1, 2))
+                                                    self.BACKGROUND, self.FOREGROUND, self.BORDER, self.PADDING))
                 sprites[ii][0].add_frame(render_box(font, score[2], False, self.NEW,
-                                                    self.BACKGROUND, self.FOREGROUND, 1, 2))
+                                                    self.BACKGROUND, self.FOREGROUND, self.BORDER, self.PADDING))
             sprites[ii][0].location.left = self.MARGIN
             sprites[ii][1].location.right = self.get_display_surface().get_rect().right - self.MARGIN
             y = self.get_display_surface().get_rect().centery + self.SPACING * (ii - len(sizes) / 2)
@@ -559,8 +561,8 @@ class Total(Sprite):
     def __init__(self, parent):
         Sprite.__init__(self, parent, 68)
         self.deactivate()
-        self.font = Font(self.get_resource("display", "score-font-path"), 48)
-        self.font.set_italic(True)
+        self.font = Font(self.get_resource("display", "score-font-path"), 72)
+        self.font.set_italic(True)
 
     def deactivate(self):
         self.active = False
@@ -570,8 +572,8 @@ class Total(Sprite):
         score = ""
         for ch in str(int(round(self.get_game().triangles.score))):
             score += ch + " "
-        colors = (255, 255, 80), (80, 255, 255), (255, 80, 255), \
-                 (255, 120, 60), (60, 255, 120), (120, 60, 255)
+        colors = (255, 255, 180), (180, 255, 255), (255, 180, 255), \
+                 (255, 220, 160), (160, 255, 220), (220, 160, 255)
         template = Surface((self.display_surface.get_width(), 100))
         transparent_color = (255, 0, 255)
         template.fill(transparent_color)
@@ -584,17 +586,18 @@ class Total(Sprite):
         template.fill((255, 128, 128), (0, 78, tr.w, 1))
         template.fill((255, 0, 0), (0, 79, tr.w, 1))
         for _ in xrange(20):
-            surface = template.copy()
-            polygon(surface, choice(colors), ((tr.centerx - 7, 19),
-                                              (tr.centerx, 0),
-                                              (tr.centerx + 7, 19)))
+            # surface = template.copy()
+            surface = Surface(template.get_size(), SRCALPHA)
+            # polygon(surface, choice(colors), ((tr.centerx - 7, 19),
+            #                                   (tr.centerx, 0),
+            #                                   (tr.centerx + 7, 19)))
             text = self.font.render(score, True, choice(colors))
             rect = text.get_rect()
             rect.center = tr.centerx, tr.centery + 2
             surface.blit(text, rect)
-            polygon(surface, choice(colors), ((tr.centerx - 7, 80),
-                                              (tr.centerx, tr.h - 1),
-                                              (tr.centerx + 7, 80)))
+            polygon(surface, choice(colors), ((tr.centerx - 7, 80),
+                                              (tr.centerx, tr.h - 1),
+                                              (tr.centerx + 7, 80)))
             self.add_frame(surface)
         self.location.center = self.display_surface.get_rect().center
         self.active = True
diff --git a/resource/aud/Heat-quiet.ogg b/resource/aud/Heat-quiet.ogg
new file mode 100644 (file)
index 0000000..25ee7ab
Binary files /dev/null and b/resource/aud/Heat-quiet.ogg differ
index c5c40c1..2dfdd3c 100644 (file)
@@ -3,6 +3,5 @@
 1398631170.296798 45 SIV
 1398635621.7 25 SIV
 1398635792.99 10 SIV
-1437514837.26 206 SIV
-1437514932.23 22 SIV
-1437514988.25 88 SIV
+1437647034.17 214 SIV
+1437647409.07 32 SIV