Flame and Frost: Orbital Defense is a computer game that combines the space blasting action of Asteroids with the orbital mechanics of Kerbal Space Program.
The player controls a ship, armed with a blaster, given the task of defending the planet from incoming icy comets (the frost) and flaming asteroids (the flame), all while having to deal with the gravitational pull of nearby celestial bodies and other cosmic disasters.
Definition of Done
While I don't expect this game to make me rich or anything, my real goal here is to make a game that has a reasonable scope and actually put it on the market. Like I said, I don't expect to make tons (or any) money on this thing, but I'm really only going to count myself successful on this game if it actually reaches the market.
Since I know that leaves a lot of logistical things to do, I'm going to have to have a playable version of this game very early on. I have a goal of having a working version (with UI and everything) by the time the first three day weekend ends. (That's also when the first playable demo should be available, even if I don't quite get all of the features I wanted up and running.)
This download requires .NET 4.6, which is the one that hasn't actually come out yet. (I'm sorry! I'm just too excited about the new features!) I think it will download that automatically, but if it doesn't, you could always go install the Visual Studio Community 2015 release candidate, which comes with it.
I also don't think this installer will install the XNA redistributable. I'm assuming that basically everybody who is in the competition has had XNA installed at one point or another, but if not, give it a try anyway. It might work. If it doesn't work, then you can go hunt down the XNA 4.0 Redistributable from Microsoft.
If you have any problems with the download, please let me know so I can get it fixed.
Thinking Ahead: Spend time before the start of the competition planning your game.
Happy Accident: You accidentally create a bug that leads to humorous results. Post the video or screenshot in the Happy Accident thread.
Moral Support: Leave a comment on somebody else's game thread with (constructive) feedback.
Lonely: Program on a Friday or Saturday evening.
Game Over: You implement the ability for players to lose the game. (Also, you just lost the game.)
Vincent van Gogh: You create your own artwork for your project.
10 Hours: You spend at least 10 hours programming your game during the month.
25 Hours: You spend at least 25 hours programming your game during the month.
50 Hours: You spend at least 50 hours programming your game during the month.
½KLOC: Your game reaches 500 lines of code. You're off to a great start!
1KLOC: Your game reaches 1000 lines of source code. Making progress! Excellent!
2KLOC: Your game reaches 2000 lines of source code. Keep it up!
3KLOC: Your game reaches 3000 lines of source code. Your game definitely has some weight behind it!
5KLOC: Your game reaches 5000 lines of source code. Well done!
Silence is Not Golden: Add sound effects or background music to your game. 8 is Enough optional.
Less is More: Lines of code ain't everything. Sometimes, the best solution is to refactor to eliminate redundant lines of code, leaving you with less but better designed code. Do this and unlock this achievement.
Time Machine: Worked for over an hour on code that you rip out later that day.
The Tinker: Fiddle with a complicated piece of code and get it to work only after a lot of failed tweaks.
Headbanger: Use recursion in some form or another in your game.
Prototype: You have something that could loosely be called a working game by the end of the first weekend.
Way to Brag: Claim at least 15 achievements.
The Great Unveiling: Provide a download for your game.
"Research": You spend a few hours playing a game when you should have been making one.
Leveled Up: You learned something that you didn't know that you can reuse in other games or other programs.
Two Can Play This Game! You make your game multiplayer (same computer/device, LAN, or Internet all count).
- Got some key pieces up and running, including planets, the player ship, velocity, gravity, and basic keyboard input.
- I seem to have a problem with precession—where the periapsis (the closest part of an orbit) is different in each orbit. That shouldn't be happening with a single celestial body. (Hm. Just had a thought. Maybe I need to remove the mass of the ship from the equation, and calculate the acceleration due to gravity, not the force.)
- Fixed the precession bug from yesterday.
- Added bullets.
- Added comets and asteroids that rotate slowly and are affected by gravity. (No practical difference between them yet, just visual.)
- Made it so bullets weren't affected by gravity.
- Bullets expire with a time-to-live feature (10 seconds).
- Things can collide, asteroids break apart, and the player can die by hitting a planet or an asteroid.
- Added in some sound effects for firing, destroying things, and dying.
- Players now have lives and a score (+100 points for hitting an asteroid, -500 for hitting a planet, subject to further tweaking).
- Markers show where asteroids and planets are off screen.
- Respawning new asteroids, reworked later in the day to spawn more continuously (up to a certain amount).
- Cities were added, but will likely be removed. I want every planetary impact to be bad for you. So the planet as a whole needs some sort of health system.
- Orbital path preview, shows you where you're going and turns red if you're about to hit a planet. This makes it much easier to see if your current orbit has you headed for trouble.
- Got rid of the second planet. It's gravity messes with things. I need to revamp the way gravity works to have a finite range for it to work very well.
- Added a minimap in the lower left corner, showing you the whole world and where planets and asteroids are within that.
- Made it so the player wraps around to the opposite side if you get too far away. Asteroids, however, despawn.
- Got some work done on my UI stuff.
- Added a button to reset the game back to the starting point.
- Lots of work in the UI code that made only a tiny amount of visual or functional difference in the game. (Kinda disappointing, honestly.)
- When you run out of lives, the game starts over.
- Added line drawing to the game. The world's outer edge (where you wrap around) is now drawn, as is a circle around the planet. I have plans to push this a little further, as a stylistic thing. It looks strange for now, but it will probably look nicer when I add more in.
- I'm now drawing a logo at the bottom of the screen. That probably won't stay once I have a main menu.
- Download is now available (which I give only a 50/50 chance of actually working for people, but give it a try anyway).
1/6 of the way done already. I was busy doing book stuff, and didn't really even get a chance to work on my game. So… guess that's my update!
- Fixed a bug in the logo at the bottom (didn't draw the horizontal line).
- Planets now have health, not based on cities.
- Planets now have a health ring that shows their health. I still like the idea of the planet having cracks that move towards the center, but I'm not sure on the mechanics of doing that just yet. This is a simple solution for the short to medium term.
- If a planet runs out of health, it goes away.
- Asteroids do damage to a planet based on their size, and bullets also do a small amount of damage.
- I added an outer range for gravity for planets. Outside of this, gravity has no effect, but it should be far enough away it wasn't doing much anyway.
- The keyboard input now has a fine-tuning feature. Hold LeftCtrl down and you won't turn or accelerate as fast. This is great for getting into tight orbits or fine tuning your aiming at little asteroids that are far away and drifting further.
- Introduced two bugs:
- If you destroy a planet that another one is orbiting around, the program crashes. What should actually happen to a planet who's parent goes away? Should I just switch to having all planets follow gravity instead of using a perfect circle? That feels like a good direction to head…
- The arc drawing is somewhat… unperformant. Rather than generating new geometry and sending it to the graphics card every update, maybe saving it and only regenerating it when something changes is better.
We're now a full week into the competition, and I feel like I've still got so much to do.
- Fixed the arc drawing performance, though there's still probably room for improvement.
- Fixed the orbiting bug, this still requires some additional thinking to get it right, but the crash is gone.
- Added in a second ship that is controlled with WASD. Pressing F7 lets you switch views. This is the beginning of multiplayer.
The second weekend has arrived! I got quite a bit done tonight, but I'm hoping for even more tomorrow and the next day.
- I did a lot of the cleanup that I was hoping to do, and I like where things sit.
- I kept making changes to the rendering to allow it to be drawn at a size besides full screen and in a location besides the top corner.
- I added in a second view (vertically split) for a second player. So they now both get their own screen!
- The performance was suffering a bit, so I added in a debug mode (F3) that lets you see the frame rate. The performance bottleneck appears to be the part that draws those arcs (still) and the course plotter (the dots that show you where you're heading).
I didn't get as much done as I had hoped, but I guess I shouldn't complain. Things came along well enough today.
- I fixed the performance bugs, and learned how to use the Profiler that is built into VS. I've been using a 3rd party profiler that I haven't liked and isn't free anymore, so this is a nice change.
- Added support for the Xbox controller as an input device.
- Lots of particle effect framework code, and working particle effect for the engine thrust!
We're now 1/3 of the way done with the competition, and 2 of 5 weekends in. I still feel like there's a ton left to do, but I'm liking what I've got so far.
- Fixed a whole pile of bugs.
- Added in audio for engine thrust, which I then managed to break just before the download was put together. It's fixed now, but not in the download.
- Changed the ship icon.
- Particle effects for the asteroids themselves and when they hit the planet. I don't like the way they look, but I do like the way they function.
- While I should have done something along the lines of UI, I didn't feel like it, so I didn't do it.
- Built the framework for secondary weapons.
- Added in the first type of secondary weapons: orbital mines! When you hit Enter, they deploy at the same spot and orbit of your ship. When an asteroid gets within a certain range, it detonates, creating a shockwave. When the shockwave hits the asteroid, it destroys it. When an orbital mine hits a planet, it detonates and creates a larger shockwave (which can still destroy asteroids) but also deals a lot of damage to the planet. You only can carry 5 orbital mines in your ship. (All secondary weapons will be limited somehow.)
- I feel like I'm actually really close to a pluggable API. With a little work, I could easily make an API that would allow other people to make their own secondary weapons and other mods. I'm tempted to do that…
- Lots of UI refactoring. Still lots more that probably ought to be done.
- Got rid of the logo at the bottom of the screen and made it only appear when paused.
- Moved the paused menu to the middle of the screen.
- Put a border around it.
- Felt bad that it seems like all I did was shift some UI stuff around for the day, but it was a lot of work, I promise!
- Added the option to choose between one and two player games from the pause menu.
- The game starts with 1 player now (haven't seen that in a while, and it feels a little strange to get the full window to myself) and if you die, it also reverts back to single player.
- Some work out of the code to figure out how I'm going to structure the game setup. Nothing official to show for this yet. It's all on a whiteboard.
- No new screenshot. Nothing changed visually. In fact, not much changed at all today.
- Pulled the world-related generation stuff out into a separate class so that I could swap it out with different world generation algorithms without affecting the rest of the game round setup (rules, players, ships, etc.)
- Began work on parsing systems (the game world) from a file.
- Multiple systems defined:
- Terra: A single medium sized planet.
- Luna: A single medium sized planet with an orbiting small moon.
- Gemini: Two medium-to-large planets.
- Colossus: A single off-center gigantic planet.
- Added in a Star System selection screen, where you can choose from the above.
- Created a bunch of bugs in the mean time. Yay.
It's actually a ton of fun to play on Colossus. There's so much gravity that you and the asteroids get cruising at very fast speeds, and if you're not careful, DEATH BY COLOSSUS! I'm excited to have people play it, but it probably won't be until Sunday night when I do my normal update.
- Lots of cleanup of my UI framework. I do like it better now than before. (I was starting to kind of dislike it.)
- Fixed a small set of bugs that have come up from all of the refactoring I've been doing.
- Made it so the pause menu doesn't have a One/Two player option.
- Added in a screen where you can choose one or two players, which is now the starting point and also the point where you end up when you press New Game on the pause menu.
- You can now land on a planet if you're travelling slowly enough.
- You can take off by pressing the Fire key (Space).
- When you land, your secondary weapon refills.
- Planets can now have atmospheres. When you're in at atmosphere, the game exerts a drag effect on you, as a function of your altitude. Low altitude creates a lot of drag, high altitude at the edge of space has very little. Drag is applied to your ship and asteroids.
- If you're on course to land, the path is drawn green instead of red or white.
- You can now choose your input device.
- Full Keyboard (best for 1 player): Arrow keys, Fire is Space, Secondary is Enter, Fine Tuning is Left Control
- Player 1 Keyboard (best for two player): Arrow keys, Fire is Space, Secondary is Enter, Fine Tuning is Right Alt.
- Player 2 Keyboard: WASD for movement, Left Control is fire, Left Shift is fine tuning, Q is secondary.
- Xbox Game Pad: Left thumbstick to turn, left trigger to accelerate forward, A for firing, B for secondary.
- You can choose your secondary weapon.
- New secondary: Stationary Mines. Unlike the earlier orbital mines, stationary mines attempt to hold their position. Gravity might be too strong for that to happen, but it will try anyway. The eventual plan is for them to have a limited supply of fuel and to self destruct when they run out.
- Large asteroids and comets don't disappear immediately when they hit a planet or mine shockwave. They break apart into smaller pieces like when a bullet hits them. This means a mine won't instantly destroy an asteroid in all cases. Fragments might escape. And hitting a planet now behaves more like a cluster bomb with multiple impacts, and a few escapee rocks.
- You now get points when your mines destroy things.
- Mines have a chain reaction effect. A mine shockwave will trigger nearby mines as well.
- Added background music, which can be muted with F1. (Eventually it will be done in settings, not with a key press.) F2 still toggles full screen and F3 still toggles debug mode.
- You can now back up in the menu with Escape.
- Changed the background from purple to black. I'd love feedback based on the pictures, but I think the ultimate intention is to allow different levels to have different colored backgrounds. There will be variety, and probably stars and nebulae in the background at some point.
- No playable download today. I'm tired, but I should get to it tomorrow.
I didn't get nearly as much done today as I had hoped, but I guess that's OK, considering it's a weekday.
- New download.
- Fixed a bug where the particle effect for comets was the wrong color.
- Gave stationary mines an exhaustible fuel supply. When it runs out, it can't fight gravity anymore and begins to fall. After 2 seconds of freefall, it will self-destruct.
Today was mostly art.
- Added fuel to the player's ship, and it is now drawn in the UI. Landing refuels your ship.
- Added in refineries, and made the art for depots/bases. They have no functionality yet, but cities will have people (in some scenarios) refineries will have fuel, and bases will have more secondaries. In other words, you'll have to land at particular spots to pick up the supplies you need.
- Made it so you could only resupply fuel at refineries.
- Made it so you could only resupply secondaries at depots. This still needs some work, because different types of secondaries need to reload faster than others.
All of that could use some refinement. I'd like it if surface features like these had a large but finite supply of things. I'd also like it if depots could supply only a certain type of secondary. There may be an option to allow you to switch secondaries, or maybe if they don't match the secondary type that your ship currently supports, it's just a useless depot for you.
- You can now pick up passengers at cities.
- When you leave the system (the wraparound point) you score 100 points for every passenger you've got, and they're removed from your ship so you can collect more.
- New Download! The final one for the competition.
- I'm hoping to keep working on this game over the next couple of months, but I do have a lot of other projects that need some attention. Not the least of which is the MonoGame tutorials here.