In Pacewar, there are two teams of ships. The two teams fight in a nebula. Each time a team wins, a meter moves towards that team's direction, and the other team gets more ships. The team that gets its meter filled on its side first wins the game.
So, what does this have to do with "one room"? Well, it's a technicality. I chose to define a "room" as the SGE Game Engine's definition, which is basically a single "location" in the game, kind of like the "rooms" in many adventure games, or levels. I only used one of the SGE's "rooms" in this game; even the main menu doesn't have its own separate room. The arena is also very room-like in that there are barriers at the edge.
Pacewar homepage (includes some post-Pyweek updates): http://pacewar.nongnu.org
Ratings (show detail)
3% of respondents wished to disqualify the entry.
Pacewar 1.5.2 (Windows 32-bit)
Pacewar 1.5.2 (GNU/Linux 32-bit)
Pacewar 1.5.2 (GNU/Linux 64-bit)
Pacewar 1.5.2 (source code)
Pacewar 1.4 (low-quality music)
Pacewar 1.3 (low-quality music)
Pacewar 1.2 (low-quality music)
Version 1.1 (low quality music)
The final version of Pacewar - LD version
The final version of Pacewar - HD version
Pacewar 0.1 with low-quality music
Title screen/main menu
AI ships fighting in a suicidal way
Screenshot from 2014-10-07 20:14:49.png
Screenshot showing the nebula colors correctly
Visual enhancements: nebula and thrusters
Early base engine of Pacewar, with a single ship controlled by the player and several random ships that do nothing.
Well, reviewing is over, and some people didn't like this game, but oh well. I think it turned out great, and it has been a fantastic testing ground for the SGE Game Engine.
After the submission period ended, I made several improvements to Pacewar, and I want to report them here:
- Pacewar 1.4 and below had a bug with d-pad recognition. If you ever tried to use a d-pad, it crashed the game. This was fixed in version 1.5.
- Pacewar 1.5 also added a "colorblind" mode, activated by pressing F7. This displays a diamond shape over the green ships, and an hourglass shape over the red ships, and also displays the sameships on the appropriate sides of the score bar.
- A couple of you went ahead and tried to run the game with Python 2 even though Pacewar 1.4 and below supported only Python 3. Obviously, these people were not successful. However, Pacewar 1.5 added Python 2 support.
- Because of the added Python 2 support, I was able to build Windows binaries and 32-bit GNU/Linux binaries.
- Control configuration is now saved as of Pacewar 1.5.2.
Pacewar 1.5.2 can be found here:
- Windows (32-bit): https://pyweek.org/media/dl/19/onpon4/pacewar-1.5.2-win32.7z
- GNU/Linux (32-bit): https://pyweek.org/media/dl/19/onpon4/pacewar-1.5.2-gnulinux-i686.tar.xz
- GNU/Linux (64-bit): https://pyweek.org/media/dl/19/onpon4/pacewar-1.5.2-gnulinux-x86_64.tar.xz
- Source code: https://pyweek.org/media/dl/19/onpon4/pacewar-1.5.2-src.tar.gz
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:
And there's a version with low-quality music here:
Distant sounds, configurability, and the "joys" of Windows executables
I decided to make yet another update, again largely based on feedback. Version 1.3 adds two things: first, when explosions and shooting happen off-screen, you hear it at a lower volume rather than not hearing it at all. Second, you can choose how many points are needed to win (from 1 to 6), and the default is 3.
Then, I decided to try to build a Windows executable using someone else's Windows computer. Boy, was that an adventure. First I tried to use Python 3.1 + Pygame 1.9.1, but that failed because that build of Pygame seemingly doesn't support PNG images. So then I tried to use Python 3.4, but then cx_Freeze produced an executable that just caused an error. So then I used a slightly older version of cx_Freeze with Python 3.3, and my Ogg sound effects couldn't be found by the exe version.
Jesus, this is frustrating. I don't remember building executables on Windows being this awful. Anyway, I gave up and decided to stick to a plain source code release. I don't understand why I'm having so much trouble building an executable on Windows; I was able to build a GNU/Linux one just fine. Oh well. If any Windows user wants to take a stab at it, the setup.py I used is included in Pacewar 1.3.
Pacewar 1.3 with low-quality music:
Version 1.2 adds an indicator for your ship. Someone pointed out in the comments that it was missing, and it was something I was thinking it could be of use anyway. The graphic I ended up using is one of the target icons from Ardentryst.
Low-quality music version:
Well, that's it. Pacewar is finished. The final version, 1.1 (unless I develop it more):
And here's a version with low-quality music if you want a smaller download:
I indeed ended up finishing the AI. It's a lot less dumb now, and my brother found it to be convincing. So, yay!
The difference between version 1.0 and 1.1 is 1.1 makes your current key state transfer over to the next ship when you take control of a new one. That it didn't do this was a complaint my sister had.
Pacewar 0.1 is right here:
It turns out that it's quite big! Most of the size comes from the music, so I decided to package an alternative version with the music re-encoded in low quality:
This very well might be the final result; it depends on whether I succeed at the self-preservation behavior of the AI. We'll see. :)
While I still haven't finished the AI, I decided that polish is more important than intelligent AI, so I did that.
Firstly, when you start up the game, you now see the title and a little menu:
Secondly, every aspect of the game has been made fully functional. So yes, that 2-player option works:
And yes, that "controls" option (for configuration of controls) works:
There is one small bug that hasn't been worked out where you occasionally get control of two ships at once, and the controls aren't saved to a file, but other than that and a more intelligent AI, Pacewar is now basically entirely finalized.
Explosions and meters and endings, oh my!
Since the AI is working on a basic level, I decided to make the game actually a game, rather than just some sort of free-form piloting toy. It's approximately the game I was going for now. Each team starts with 10 ships, and gains two ships each time it loses. So in the final round, the winning team has to beat 18 ships with 10. Given how hard I'm finding it to win, I might soften this to one ship per loss.
For now, when the game ends, the music slowly fades out.
The AI of Pacewar is going to consist of two basic behaviors: aggression, and self-preservation. I have implemented the latter behavior first. The result is something of an uncontrolled bloodbath.
The aggression behavior is rather simple: every few seconds or so, the closest enemy ship is chosen as the target to attack, and as long as there are no current threats (a threat will be defined later as either a bullet nearby or an enemy ship pointing at it), the default behavior is to thrust towards the target and shoot when in range.
Next up is the self-preservation behavior, which should give the AI the nuance it needs to be an actual threat.
After moving and shooting was done, the obvious next step was... getting the AI to do something other than shooting constantly. But I held off on that and went with doing visual enhancements first, instead.
First came exhaust for when ships are thrusting. Each ship got its own exhaust sprite, and that was simply displayed in the same place as the ship (by creating objects for them). Piece of cake. There was one hiccup, but that turned out to just be me being dumb and making the exhaust objects "inactive", which in the SGE causes animations to not happen (among other things). Easy fix.
But it still looked kind of depressing, a simple black background with ships on it, so I decided to add on the most important graphical touch: the background. I had already planned to use a nebula effect. At first I was going to just paste together some nebula images into a background, but then I decided it would be a lot cooler if the nebula was randomly generated, so I did just that. I generated nebulae nearby and away to create a nice parallax scrolling effect (and was excited when I found out that this previously untested feature only had one very simple bug), but then I decided to also generate nebulae in the foreground as well. The screenshot doesn't do the result justice; it looks amazing in motion.
Edit: I don't know why parts of the nebula show up as purple and light green. In fact, these parts are blue and yellow-orange, respectively. This screenshot shows the correct colors:
Next up is the AI, which I assume will be the hardest part, so it's a good thing I still have quite a bit of time left. I might end up adding some powerups as well later on; we'll see.
Optimizations, shooting, and more bugs!
Adding shooting, I noticed that the flight controls weren't perfect before, after all. In fact, the ships were flying backwards, and there was a bug in the SGE that caused rotation to be clockwise instead of counter-clockwise. Long story short, I ended up fixing that bug and implementing shooting, finally.
Then came a little problem: shooting a lot of shots at a time was causing the game to slow down. My first step towards solving this problem was to put a limit on your firing rate, but that wasn't enough; every ship (out of 24) shooting was causing slowdown. What to do? Off to cProfile! Using this, I determined that, of all places, the collision function in the SGE was being slowed down by property calls! In fact, these calls were slowing down the collision function so much, that after optimizing them, collision detection time was cut in half. Imagine that! So I optimized them and sent the optimizations to the SGE repo.
Early Technical Difficulties
As I begin to make the base engine for Pacewar, I am reminded of why the SGE is still considered a beta release as I discover a few bugs that either crash the game or wreck basic behavior. I patch the copy of the SGE used for Pacewar, then send the same fixes to the SGE Git repo to be included in a release later.
At the same time, I am reminded of the reason I made the SGE in the first place. Despite the hiccups, I now have the basic engine for Pacewar basically completed. Flight controls are working perfectly (though I'll probably adjust the the speed constants in the future), and all that's left in that area is guns, and adding the AI to control non-player ships.
I opted to make the arena an enclosed space. This decision was made for two reasons: one, because it makes it more like a room; and two, because it'll be a lot easier to do the parallax scrolling effect I want to do if I don't have to deal with screen wrapping.
The idea and preparation: some technicalities
I really did not want the theme to be "one room". This is the one that I had no interesting ideas for.
In the end, I'm going to have to resort to a technicality: I'm using my SGE Game Engine, which defines a "room" as something like a level. So I'm going to technically be using only one room (one SGE "room") in the process of developing a game. Because I have a great idea for a game that can fit in that category, but no particularly interesting ideas for games taking place in one literal room. (The best idea I could think of was squishing ants.)
So, this is my idea: a space game. We'll have two teams of ships that shoot lasers. When one team is destroyed, it gets replaced by more ships, and the winning team gets its team only partially replenished. We'll have a sort of meter indicating victories, e.g. it will start at 0, then one team's victories will decrease it and the other team's victories will increase it. When it gets to a certain number, probably either 5 or -5, the respective team wins. Controls will be much like Asteroids, or Spacewar: top-down, with rotation, thrusting, and shooting.
At first I was thinking of making a single-player game that goes on forever, and I wanted to give a nod to Spacewar, so I considered the name "Perpetual Space War", or "PSpaceWar". But that's kind of lame, and I changed the idea anyway. So I decided on "Pacewar". This name makes sense: as you win more and more, you start to have a disadvantage in ship numbers, so you need to destroy the other team faster than your team gets destroyed. This also gives the nod to Spacewar I want to give.
Scouring OpenGameArt.org, I found that I want to use these:
Additionally, I'm taking the shoot sound effect from an old scrapped game I did, ITAD S.G..
I also need something for the meter tracking wins. this one might be good. I'll focus more on that later.