Wednesday, December 31, 2008

Day 9: Where is my Easy Button?

Happy New Year!

Project:
Space Game (Untitled)
Code Budget: 120 Hours, 56 Spent
Media Budget: 200 Hours, 8 Spent
Day Breakdown: 9 Hours of Code, 1 Media

I honestly figured that developing a particle system was going to be more difficult that it actually was. I used the Authoring Particle Systems Using XML and the Content Pipeline tutorial as my baseline, but I changed up how things worked in order for it to adapt to the flexibility of a game's needs. I added in an option to change the fx script factor, and more importantly I wrapped the entire system inside a manger that handles the individual particle systems. Now when the game goes to add a new particle the manager checks to make sure it is already managing that specific particle system, if it's not that system is created at run time and added to the manager. The advantages of this is the game ends up with a single particle system manager and not a new object that has to be managed in a seperate thread for every effect that will be used on the game (even when not being used).

I went through and added effect data to the following events, which effect to display is loaded by the XML Level file where applicable:
  1. Enemy Ship Explosion
  2. Bullet Travel Emitters
  3. Bullet Collission Explosions
  4. Player Explosion
  5. Shield Collission
  6. TODO: Model Tag Emitters
Going into today I thought that I was only going to be able to get the system in place and that pretty new screen screen shots of the effects actually playing themselves out in the game was going to have to wait...boy was I wrong! I thought about making a movie, as screen shots are no longer really doing the game justice, but a game really just doesn't feel right without sounds and music. That will be coming tomorrow, and hopefully I'll be able to put together a movie!

Goals for Tomorrow: Sound and Music System!


Shield Being Hit, Notice the Missile's Smoke Trails

General Action With Energy Weapons and Ship Explosions!

More General Action, Looks Like I'm going DOWN!

Tuesday, December 30, 2008

Day 8: Let There Be HUD

Project: Space Game (Untitled)
Code Budget: 120 Hours, 47 Spent
Media Budget: 200 Hours, 7 Spent
Day Breakdown: 7 Hours of Code, 2 Media

Well, working with the 2D Side of XNA isn't so bad and the HUD went together as it should have. Most of the time today was spent coding in the power mechanics of the game and tying up some lose ends. (Keeping Track of Score, Deaths, Invulnerability, and the Like) The HUD now provides a look into the players state and gives feedback via the score. As you'll see from the screen shots there is a lot going on.

The main portion of the HUD is the power and armor/shield displays. The power display in the low level depletes as you fire your weapon or use your speed boost to better maneuver and it replenishes quickly over time. The faint blue bar under the power indicator shows how much power is currently being sent to regenerate the ships shields, this can be anywhere from 10% to 50%, however the more power being diverted to the shields the slower the power bar will replenish itself. The second bar shows the status of your shields and armor, shields are always damaged first and will restrengthen slowly over time, faster if you divert more power to your shields, however your armor can only be repaired via special power ups.

Most of the rest of the HUD is self explanatory, you have the name of the current level, number of lives, number of currency collected (you'll spend currency to upgrade your weapons, engines, shields), and your current score. The format of these is a throwback to old arcade games that always used to display zeros for the entire length of the field. The green targeting cross hairs helps will aiming your weapons down range, though additional steps may be needed once game play testing begins.

Goals for Tomorrow: Particle System Foundation

Note that the Power Going to the Shields is Low

Note that the Power Going to the shields is High

Monday, December 29, 2008

Day 7: It's a GAME!!!

Project: Space Game (Untitled)
Code Budget: 120 Hours, 40 Spent
Media Budget: 200 Hours, 5 Spent
Day Breakdown: 8 Hours of Code

Well, the most difficult part of the game is now behind me. Collision detection is now in the game and working wonderfully. The player can fire their weapons and even fly into the enemy ships in an effort to destroy them, and the enemy ships can fire back in an attempt to destroy the player. I've created a virtual world that the user can interact with complete with goals and challenges: in other words, it is now officially a game!

As you'll probably be able to tell from the screen shots I used Oriented Bounding Boxes for my collision detection. I thought about using sub spheres, but decided against it because most of the ships will be a single model mesh making using sub spheres more difficult. The computational cost of the Bounding Boxes is actually quite low when I realized that 95% of all checks are going to fail on the basic Z component check, which can programmed in to be the first check. I've shown the Debug level code in the screen shots here which allows for the drawing of the bounding boxes.

Goals For Tomorrow: HUD, Player Shield/Power Regen

Eep, I need to dodge all those bullets now!

Looks like I need to get better, Red Box indicates I'm dead! QQ

Sunday, December 28, 2008

Day 6: Emitters are a Go!

Project: Space Game (Untitled)
Code Budget: 120 Hours, 32 Spent
Media Budget: 200 Hours, 5 Spent
Day Breakdown: 2 Hours of Code

The Ship Emitters are a Go! The XML Level Data is getting rather complex (see level file, the C# Reader and Writer), but the emitters will assist in level creation, intensity, and replayability as they can generate random streams of ships. I added a couple of emitters that spawn left and right moving ships right at the start of the level and it really kicked up the intensity of playing the level, Screen Shot Below.

Goals For Tomorrow: Collision Detection, Bullet and Ship Collision Damage

Saturday, December 27, 2008

Day 5: Fire Away!

Project: Space Game (Untitled)
Code Budget: 120 Hours, 30 Spent
Media Budget: 200 Hours, 5 Spent
Day Breakdown: 5 Hours of Code

Well, Bullets are now flying. The bullet manager handles incoming and outgoing, straight and homing, and the ship AI was adjusted to handle 3 different firing mechanics. Bullets can be fired by the enemy ship based upon step intervals, fixed duration, or randomly: best part is that all of the information to control these aspects are already present in the XML Level Data I've been working so hard on.

I wasn't able to get into the collision detection portion of things as of yet as I just ran out of time tonight and it looks like it's going to have to wait until Monday. I'll only have about 5 hours to code on Sunday and I'd rather give myself more time to code in the collision detection.

While playing with the game today and looking at the Level Data I did notice something that I want to add in tomorrow: Ship Emitters! Right now individual ships have to be placed in the level, but adding in emitters would let me create an emitter that will spawn X number of ships at set intervals. The current level is described as 15 individual ships, but it could be described as 3 emitters. Also the Emitters could randomly pick from a list of provided ships and AIs helping to make levels a bit more random and unpredictable.

Goal For Tomorrow: Ship Emitters

Outgoing and Incoming Bullets, Some Player's are Homing


Incoming Homing Bullets, boy are they tough to dodge!

Friday, December 26, 2008

Day 4: The Stage is Set!

Project: Space Game (Untitled)
Code Budget: 120 Hours, 25 Spent
Media Budget: 200 Hours, 5 Spent
Day Breakdown: 8 Hours of Code, 1 Media

I'm now about a quarter of the way through my coding budgeting and the game is already starting to take shape. The Level loader is working beautifully and I'm glad that I took the time to learn about the Content Pipeline and how to use it to load data into the game. After three short days of working with the Content Pipeline I now have the background, enemy ships, and some basic scripted AI all loading from an XML File (See the Level XML File).

I only coded in three basic types of "AI" currently in the game and none of them have them firing their weapon yet. I'm reluctant to call this AI as there is no real Intelligence behind the movements yet; it is just playing a movement and rotation script. Still more advanced scripting will be coded in once the core of the game is finished and I start working on boss fights.

I'm very happy with how far the game has progressed in just four short days. The Stage is set for the player to interact with the enemy ships and for them to fight back, at which point the core of the game is finished.

Goals for Tomorrow: Bullet System, maybe even Collision Detection

Basic Up and Down Linear (Ships in the Foreground)


Accelerated Side to Side Movement (Ships in the Foreground)


Random Movement that has the Ships Moving Randomly to the Corners

Thursday, December 25, 2008

Day 3: More Fun With XLM Levels

Project: Space Game (Untitled)
Code Budget: 120 Hours, 16 Spent
Media Budget: 200 Hours, 4 Spent
Day Breakdown: 4 Hours of Code

Wow, the Content Pipeline is Anal. I spent most of the day working on getting the large background objects to load up from my XML Level File (See XML Level File). The Content Pipeline does a fantastic job of checking your classes and making sure that everything you declare as a public variable is included in the XML data, it even has to be in the same order as it is declared in your code. I spent the better part of the day figuring out why it was throwing an error saying that XML Element "Model" not defined. Turns out it was part of the parent class, so I ended up trimming out a lot of unneeded public information from my basic game object class.

All told I'm happy with how things turned out today. I have a sky box in place and a very extensible background object system that will let me add planets, space stations, even a tunneling or ground level. Here are a couple of screen shots and you can see the game is starting to look like a game! The object field that was present in the screen shots from Day 2 gets lost in the still images with the sky box, however when the game is running they still do a fantastic job of giving the player the feeling of flying through space. In the screen shots you'll note that the planet is rotating and moving slowly towards the player.

Calling things a bit early today with it being Christmas Day and all.

Goals for Tomorrow: Load ship and AI data, hopefully getting some enemy ships to show up!



Day 2: XLM Content Loading

Project: Space Game (Untitled)
Code Budget: 120 Hours, 12 Spent
Media Budget: 200 Hours, 4 Spent
Day Breakdown: 8 Hours of Code, 1 of Media

After spending most of my first day on a basic player model and setting the foundation for the game code, my second day proved to be a bit more of an uphill struggle as I learned the ins and outs of extending the XNA content pipeline to read a custom XML file. My goal for the day was to lay the foundation for a XML based level loading system, create an objectfield to help simulate motion along with a sky box.

Setting the Foundation of the level loading system proved to be a bit more work than I was hoping for, probably because I've never worked with XNA or C# before. However, in the end I found this fantastic tutorial that helped me out greatly. In the end I was able to get the Content Pipeline Loading the Level Data and the Objectfield that the player flys through working. Below are some screen shots of the game in the current state. Not to much to see here of yet, and you can't even get the feel for the random objects flying at you and spinning at random rates.

Goals For Tomorrow: Level Loading of a Skybox, Larger Background Models, Set the Foundation For the Loading of Ships/AI