AN0TH3R CiTY
Download Here
AN0TH3R City (Another City) is probably the most technically complex XNA game prototype I have worked on so far. I decided I wanted to further explore the genre of 3D platformers – as I have previously played about with some basic platformer mechanics for the Enforcer and The Junkie game prototypes. I was inspired by the visual style of games and movies such as Oni, Ghost in the Shell and Tron. I was particularly interested in re-creating the classic “glow” effect featured in the movie Tron, as well as other numerous cyberpunk visual style media. I also decided to implement basic MD2 character model animation, so that I could create and use more complex animations for the game characters.
AN0TH3R CiTY takes place in a cyber space reality (Neuromancer comes to mind as another token popular culture reference). The players assume the role of a female avatar belonging to an unknown hacker. The player has to fly around in cyberspace, and collect enough “energy packs” in order to win the game. The back story is that the energy packs actually represent encryption key components which the hacker needs in order to break the encryption of a fire wall set up by a rival mega corporation that is involved in making a genetically modified virus that has the potential to destroy humanity – all very cliché cyberpunk, I know.
In terms of gameplay mechanics I wanted to experiment with the idea of an “energy variable driven gameplay environment”. I use the term “energy variable” to describe the concept of the player’s character abilities being controlled by how much energy they have at any given moment during the game. Certain actions in the game, such as flying, shooting or getting hit by enemy projectiles, deplete the player’s energy. Ok so at this point you may be thinking that once the players energy is depleted, they die. Well, not quite – as I decided to implement the feature of the players energy regenerating over time. So the players energy can get depleted (in which case they can’t shoot or fly), but it can be regenerated back to its full value. So how can the player lose the game? Since the game focuses on platformer mechanics, the game environment that I created for this prototype conforms quite rigidly to the principals of the said genre. In other words, the level I created for this prototype is very minimal and made up entirely of platforms. So now the player can fly, shoot, and go from platform to platform. But what happens when they deplete their energy and can’t fly to another platform in order to regenerate their energy? Well the only two ways the player can lose the game is either by falling to the bottom base of the level or going outside of the level bounds. Simple.
On the contrary, in order for the player to win the game, they must collect 64 energy packs that are randomly scattered through the level. The energy packs are placed quite far above the platforms, so the only way the player can get to them is if they fly over to them. Since flying uses up the players energy, when the player collects an energy pack their energy is restored by a variable amount (there are four different energy pack types that restore different amounts of the player’s energy). However, collecting all of the energy is not so simple. There are also 12 enemies that randomly fly around the level. Visually and characteristically, these enemies represent computer viruses (or counter-hacker programs). If the player is within a certain distance of an enemy, the enemy will begin shooting at the player. When the player gets hit by an enemy’s projectile, some of the player’s energy is depleted. The players can shoot back at the enemies – but they can’t kill them. Instead, if the player shoots enough at an enemy, the enemy will get scared, turn blue and flee from the player during the rest of the game. Thus the player can defeat all of the enemies without killing them.
In terms of the technical details, as I mentioned above I decided to implement basic MD2 character model animation. I decided to use the MD2 file format because it’s fairly simple to implement (and I found some good resources for using it with XNA), and because I’m quite familiar with the process of making low polygon 3D characters for old-skool 3D shooters (Half Life, Quake, Quake 2 and Quake 3). Due to time constraints I decided not to implement vertex interpolation for smooth mesh morphing, but this is something I plan on implementing in the near future (because of the fast frame-rate of the game, the non-interpolated animation is not too noticeable).
For implementing the visual style of the game I decided to use my “old-skool” post processing framework (you can download the example source code for it from my portfolio page) – in addition to implementing the new glow post-processing effect. The glow post processing effect rendering is accomplished by creating a separate “glow texture” for each model in the game that is affected by the glow pass. The glow texture contains high-intensity colours for certain parts of the mesh (such as the glowing stripes on the players character body suit). The models with the glow texture assigned to them are rendered in a separate render pass to a texture that is passed to the main post-processing shader. In the post processing shader, the rendered glow texture pass of the scene is exponentially brightened before being blurred using a simple 3x3 Gaussian blur filter. The final adjusted glow render pass texture is then merged together with the other post processing passes to create the final render pass for the scene.
Additional Credits:
Paulius Domarkas (ChoiceParalysis) - Main gameplay music track
James "Axyss" Webb - Game intro and game over music tracks
Matthew Lynch, Jason Lanford and Angel Arcoraci - XNA 4.0 Quake MD2 model loader code reference
Luke Rymarz - XNA 4.0 GUI progress bar code reference
AN0TH3R CiTY takes place in a cyber space reality (Neuromancer comes to mind as another token popular culture reference). The players assume the role of a female avatar belonging to an unknown hacker. The player has to fly around in cyberspace, and collect enough “energy packs” in order to win the game. The back story is that the energy packs actually represent encryption key components which the hacker needs in order to break the encryption of a fire wall set up by a rival mega corporation that is involved in making a genetically modified virus that has the potential to destroy humanity – all very cliché cyberpunk, I know.
In terms of gameplay mechanics I wanted to experiment with the idea of an “energy variable driven gameplay environment”. I use the term “energy variable” to describe the concept of the player’s character abilities being controlled by how much energy they have at any given moment during the game. Certain actions in the game, such as flying, shooting or getting hit by enemy projectiles, deplete the player’s energy. Ok so at this point you may be thinking that once the players energy is depleted, they die. Well, not quite – as I decided to implement the feature of the players energy regenerating over time. So the players energy can get depleted (in which case they can’t shoot or fly), but it can be regenerated back to its full value. So how can the player lose the game? Since the game focuses on platformer mechanics, the game environment that I created for this prototype conforms quite rigidly to the principals of the said genre. In other words, the level I created for this prototype is very minimal and made up entirely of platforms. So now the player can fly, shoot, and go from platform to platform. But what happens when they deplete their energy and can’t fly to another platform in order to regenerate their energy? Well the only two ways the player can lose the game is either by falling to the bottom base of the level or going outside of the level bounds. Simple.
On the contrary, in order for the player to win the game, they must collect 64 energy packs that are randomly scattered through the level. The energy packs are placed quite far above the platforms, so the only way the player can get to them is if they fly over to them. Since flying uses up the players energy, when the player collects an energy pack their energy is restored by a variable amount (there are four different energy pack types that restore different amounts of the player’s energy). However, collecting all of the energy is not so simple. There are also 12 enemies that randomly fly around the level. Visually and characteristically, these enemies represent computer viruses (or counter-hacker programs). If the player is within a certain distance of an enemy, the enemy will begin shooting at the player. When the player gets hit by an enemy’s projectile, some of the player’s energy is depleted. The players can shoot back at the enemies – but they can’t kill them. Instead, if the player shoots enough at an enemy, the enemy will get scared, turn blue and flee from the player during the rest of the game. Thus the player can defeat all of the enemies without killing them.
In terms of the technical details, as I mentioned above I decided to implement basic MD2 character model animation. I decided to use the MD2 file format because it’s fairly simple to implement (and I found some good resources for using it with XNA), and because I’m quite familiar with the process of making low polygon 3D characters for old-skool 3D shooters (Half Life, Quake, Quake 2 and Quake 3). Due to time constraints I decided not to implement vertex interpolation for smooth mesh morphing, but this is something I plan on implementing in the near future (because of the fast frame-rate of the game, the non-interpolated animation is not too noticeable).
For implementing the visual style of the game I decided to use my “old-skool” post processing framework (you can download the example source code for it from my portfolio page) – in addition to implementing the new glow post-processing effect. The glow post processing effect rendering is accomplished by creating a separate “glow texture” for each model in the game that is affected by the glow pass. The glow texture contains high-intensity colours for certain parts of the mesh (such as the glowing stripes on the players character body suit). The models with the glow texture assigned to them are rendered in a separate render pass to a texture that is passed to the main post-processing shader. In the post processing shader, the rendered glow texture pass of the scene is exponentially brightened before being blurred using a simple 3x3 Gaussian blur filter. The final adjusted glow render pass texture is then merged together with the other post processing passes to create the final render pass for the scene.
Additional Credits:
Paulius Domarkas (ChoiceParalysis) - Main gameplay music track
James "Axyss" Webb - Game intro and game over music tracks
Matthew Lynch, Jason Lanford and Angel Arcoraci - XNA 4.0 Quake MD2 model loader code reference
Luke Rymarz - XNA 4.0 GUI progress bar code reference