Study break is here which means I finally have some free time! These past few weeks have been very busy for me so I haven’t had a lot of free time to develop a new game. This break week is the perfect opportunity to start a new project.
My friend Clinton and I were thinking about developing a game during the break to gain more game programming experience. The first step would be to figure out what kind of game it would be and how it would play. As our ambitions grew bigger, the more complex the project became. We ended up scrapping a lot of our ideas to get the right combination. We settled with a 2D side-scrolling game set in space. With the basic game idea down, we had to start adding more features and game play elements. That is when Clinton found our idea online.
Clinton stumbled upon this blog post which had a simple but original game idea. You play as a space ship that can swap colors and shoot rockets. Obstacles move towards the ship and you have to shoot them in order to pass safely. What is unique about this game is how you can maneuver through the level. You can pass through blocks the same color as your ship, since you can swap the ship colors you can maneuver through the level a lot easier. There are also grey blocks which you have to destroy because you cannot pass through, however, the closer the color is to you ship color the more damage you will to do the block. With this exciting game idea Clinton and I started to lay out a basic design document.
The design document is a very poor design document, it is meant as a rough guideline to our game. The design document is as follows
Ship Switch: a single player, multi playing field variation on the side-scrolling shooter theme.
In Ship Switch,1 Ship, 2 Colors, 1 Field. The fields are identical except in the color and behavior of the ships within. Obstacles appear and scroll in typical side scrolling fashion, but the player must react differently to these obstacles based on the color of each ship. The goal is to simply scroll through the entirety of the level with both ships intact. The challenge is in properly reacting to the conflicting interpretations between the two fields.
A) Colors that match the ship color are passable.
B) Opposing colors are impassable and cannot be destroyed. Contact with these obstacles kills the player and ends the game.
C) Mid-tones can be shot and destroyed.
D) Darker mid-tones are easier for the dark ship to destroy and lighter mid-tones easier for the light.
E) Special blocks could be included to increase variety, difficulty, and depth of play. This one, for example, would switch the positions of the playing fields. The white ship would be forced to contact the special block. Will the player think and react quickly enough to have the black one contact it as well, thereby canceling out the effect?
Higher levels could include:
– More playing fields
– Faster scroll
– More obstacles
– Colors
– Tougher penalties from special blocks
MapGenerator
ParticleManager
– Particle
– Bloom… (maybe)
Some basic code thrown together in the design document. Nothing here is final or correct, it is simply a basis to visualize what would be needed for the game.
Player
{
PlayerState state;
PlayerColor color;
Texture2D texture;
Vector2 pos;
Vector2 velocity;
private Rectangle BoundingRectangle
{
get
{
int left = (int)Math.Round(Position.X * Tile.Width);
int top = (int)Math.Round(Position.Y * Tile.Height);
return new Rectangle(left, top, playerTexture.Width, playerTexture.Height);
}
}
Draw();
Update();
LoadContent();
CheckCollision();
private readonly MapManager mapManager;
private readonly ParticleEmitter particleEmitter;
}
internal enum PlayerState
{
None,
Swapping,
Dieing,
CompletingMap
}
internal enum PlayerColor
{
Black,
White
}
Map
{
12 tiles = 32 * 12 = 384 tall
width: 1280 / 32 = ???
0x0 = space
0x64-0xC8 = range of colors
(100, 200)
}
public const int TileSizeX = 32;... same with Y
Tile
{
float color;
//0 for black, 0.1-0.9 greys.., 1 for white
//0.9 -- easy for white, hard for black
float opacity;
Vector2 tilePosition;
//stores tile x and y, not actual coordinates
}
//Game Screen size
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 720;
public struct Tile
{
public char Type;
public TileCollision Collision;
public Color Color;
public float Opacity;
public static int Width = 32;
public static int Height = 32;
public Tile(char type, Color color, TileCollision collision, float opacity)
{
// Height = texture.Height;
// Width = texture.Width;
Type = type;
Collision = collision;
Color = color;
Opacity = opacity;
}
public Tile(Tile t, float opacity)
{
this.Type = t.Type;
this.Color = t.Color;
this.Collision = t.Collision;
this.Opacity = opacity;
}
}
With our very basic design document finished, we started to work on the game right away. As some of you may have noticed from the little bit of code above, the game will be XNA based. After a little bit of work we got base classes finished and a menu screen.
Space Swap Main Menu
That’s about it! Tomorrow I will start working on the player and bullets and hopefully we can get a rough working game finished soon.