A slight paradigm shift: reduction instead of addition

Version 1.4 makes one major change to Pacewar: instead of adding ships to the losing player, it takes away ships from the winning player, down to a minimum of 1. This has two effects: one, the game doesn't become slower as the game progresses (it becomes faster as the game progresses instead), and two, it gives more of an advantage to the losing team (which is very slight, but adds up). Version 1.4 is available here:

https://pyweek.org/media/dl/19/onpon4/pacewar-1.4.zip

And there's a version with low-quality music here:

https://pyweek.org/media/dl/19/onpon4/pacewar-1.4-lq.zip

(log in to comment)

Comments

Cool game! Looks like you developed it using python 3. That's great. I have no problem with that at all. For those of us who are stuck with python 2, here's a patch:
diff -rupN pacewar-1.4/pacewar.py pacewar-patch/pacewar.py
--- pacewar-1.4/pacewar.py	2014-10-11 13:14:20.000000000 -0400
+++ pacewar-patch/pacewar.py	2014-10-13 17:58:30.584731479 -0400
@@ -612,7 +612,7 @@ class Room(sge.Room):
 class Ship(sge.Object):
 
     def __init__(self, team):
-        super().__init__(random.randrange(*START_X_RANGE[team]),
+        super(Ship, self).__init__(random.randrange(*START_X_RANGE[team]),
                          random.randrange(*START_Y_RANGE[team]),
                          sprite=random.choice(SHIPS[team]),
                          checks_collisions=False, regulate_origin=True,
@@ -769,7 +769,7 @@ class Explosion(sge.Object):
 class Bullet(sge.Object):
 
     def __init__(self, team, *args, **kwargs):
-        super().__init__(*args, **kwargs)
+        super(Bullet, self).__init__(*args, **kwargs)
         self.team = team
 
     def event_create(self):
@@ -801,7 +801,7 @@ class Bullet(sge.Object):
 class Controller(sge.Object):
 
     def __init__(self, parent):
-        super().__init__(0, 0, visible=False, tangible=False)
+        super(Controller, self).__init__(0, 0, visible=False, tangible=False)
         self.parent = weakref.ref(parent)
         self.team = parent.team
 
diff -rupN pacewar-1.4/sge/Color.py pacewar-patch/sge/Color.py
--- pacewar-1.4/sge/Color.py	2014-09-05 19:49:58.000000000 -0400
+++ pacewar-patch/sge/Color.py	2014-10-13 17:58:45.420730872 -0400
@@ -83,7 +83,7 @@ class Color(object):
 
     def __init__(self, value):
         self.alpha = 255
-        if isinstance(value, str):
+        if isinstance(value, basestring):
             value = COLORS.get(value, value)[1:]
             if len(value) == 3:
                 r, g, b = [int(value[i] * 2, 16) for i in range(3)]
Save that to a file, eg, pacewar.patch, and then run the following in your pacewar-1.4 directory:
patch -p1 Cool game! Looks like you developed it using python 3. That's great. I have no problem with that at all. For those of us who are stuck with python 2, here's a patch:
diff -rupN pacewar-1.4/pacewar.py pacewar-patch/pacewar.py
--- pacewar-1.4/pacewar.py	2014-10-11 13:14:20.000000000 -0400
+++ pacewar-patch/pacewar.py	2014-10-13 17:58:30.584731479 -0400
@@ -612,7 +612,7 @@ class Room(sge.Room):
 class Ship(sge.Object):
 
     def __init__(self, team):
-        super().__init__(random.randrange(*START_X_RANGE[team]),
+        super(Ship, self).__init__(random.randrange(*START_X_RANGE[team]),
                          random.randrange(*START_Y_RANGE[team]),
                          sprite=random.choice(SHIPS[team]),
                          checks_collisions=False, regulate_origin=True,
@@ -769,7 +769,7 @@ class Explosion(sge.Object):
 class Bullet(sge.Object):
 
     def __init__(self, team, *args, **kwargs):
-        super().__init__(*args, **kwargs)
+        super(Bullet, self).__init__(*args, **kwargs)
         self.team = team
 
     def event_create(self):
@@ -801,7 +801,7 @@ class Bullet(sge.Object):
 class Controller(sge.Object):
 
     def __init__(self, parent):
-        super().__init__(0, 0, visible=False, tangible=False)
+        super(Controller, self).__init__(0, 0, visible=False, tangible=False)
         self.parent = weakref.ref(parent)
         self.team = parent.team
 
diff -rupN pacewar-1.4/sge/Color.py pacewar-patch/sge/Color.py
--- pacewar-1.4/sge/Color.py	2014-09-05 19:49:58.000000000 -0400
+++ pacewar-patch/sge/Color.py	2014-10-13 17:58:45.420730872 -0400
@@ -83,7 +83,7 @@ class Color(object):
 
     def __init__(self, value):
         self.alpha = 255
-        if isinstance(value, str):
+        if isinstance(value, basestring):
             value = COLORS.get(value, value)[1:]
             if len(value) == 3:
                 r, g, b = [int(value[i] * 2, 16) for i in range(3)]
Save that to a file, eg, pacewar.patch, and then run the following in your pacewar-1.4 directory:
patch -p1 
In case you can't tell, that comment has a problem. It interrupts itself halfway through. Here's how the comment was supposed to end, after the patch text: Save that to a file, eg, pacewar.patch, and then run the following in your pacewar-1.4 directory:
patch -p1 In case you can't tell, that comment has a problem. It interrupts itself halfway through. Here's how the comment was supposed to end, after the patch text:

Save that to a file, eg, pacewar.patch, and then run the following in your pacewar-1.4 directory:
patch -p1 
Wow, okay, something weird is going on. Let me try one more time. The command to apply the patch is: patch -p1 < pacewar.patch

Indeed, I wrote it for Python 3.

Actually, looking at how little stuff is needed for Python 2 compatibility, and that it doesn't make it incompatible with Python 3, I think I'll make version 1.5 compatible with both. No sense in not doing it, really.