Friday, March 14, 2014

7DRL 2014 day 7: ITS OV4R!!!

And another exciting 7DRL challenge draws to a close, with the completion of Beware of Strange Warp Points! You can download it over at the Bitbucket page. I added a pretty comprehensive user manual this morning, so hopefully folks won't be too confused by the myriad stats and abilities!

Now to announce it over on /r/spaceempires, and maybe the roguelike subreddits, if other folks are spamming them with 7DRL announcements too...

And then I think I'm going to email Aaron Hall about this thing, and see what he has to say about it!

Thursday, March 13, 2014

7DRL 2014 day 6: Rise of the robots

So, today I worked on a bunch of little issues that I'd noticed throughout the week - bugs, minor features, and the like. Here's a quick overview:

  • Fixed a bug where enemy build rate was dependent, for some reason, on the player ship's speed. Meaning that the faster your ship gets, the faster the enemy shipyards build!
  • Changed the .NET runtime version of the game from 4.5 to 4.0, so it will run on Windows XP without using Mono.
  • Enemies are now more intelligent - they will attempt to stay at a range where they can hurt you, but you can't hurt them. Or, failing that, they'll flee (if their weapons are destroyed) or close to the range of their shortest ranged weapon (if they don't outrange you).
  • My favorite feature so far - now there are range indicators on the map for player and enemy weapons! No longer do you have to guess who's in range of whom!
  • The galaxy map now shows indicators for interesting stationary objects, such as allied colonies and enemy shipyards.
  • To go along with the weapon range indicators, there's also a range indicator for your scanners, so you can tell which enemies you can click to scan.
  • Sectors that have been swept with sensors are now shown as dark gray dots, making it easy to see where you've checked for cloaked shipyards and where you still have to check.
  • Most everything in the game has some sort of tooltip now. GameHunter won't be confused when he tries to play this 7DRL!
  • Crew and thrust counters are highlighted in red if losing another crew quarters or engine would cripple your ship. Remember to have backups!
Tomorrow, a manual and final release! But for now, a screenshot of the sweet looking range indicators:

Wednesday, March 12, 2014

7DRL 2014 day 5 - Imma firin mah LAZZ0R!

So today I added a variety of new components to BOSWP, to make the game more interesting. Not all of them behave exactly as they did in SE4, though. For instance, missile weapons have shorter range, armor is leaky, and ECM stacks, albeit with diminishing returns.

Also, the enemy shipyards are now cloaked, since I added sensors to the game. You'll have to deduce their location based on the direction ships tend to be appearing from! They also will no longer automatically build ships whenever possible when you're in their system, unless you can actually see them. You do get a free sensor range of 1, so you don't actually have to bump enemy shipyards to detect them, though. Still, a sensor range of 1 is pretty pathetic, so you'll want to buy a tachyon sensor or two when you get a chance.

The game's actually starting to be a bit fun now, though I'm not entirely sure if it's all that winnable. If you spend too much time searching for allied colonies early on, the enemy shipyards will start cranking out cruisers and battleships, which are quite difficult to take out without upgrades - and you won't be able to afford anything without killing enemies anyway! So I imagine the optimal strategy might be to pick off the scouts and destroyers, and search a bit for shipyards, then when you start taking too much damage, search for a colony to repair and upgrade at.

I've also got a list of issues I've collected which I plan to address tomorrow, now that the game is basically feature complete. And then, on Friday, I'll write some documentation, though that might not be all that necessary if I add copious tooltips!

Tuesday, March 11, 2014

7DRL 2014 day 4 - Buy somethin', will ya?

Today's task was much easier than I'd anticipated. I generally don't care much for UI work because it involves lots of fiddly data binding, but most of the UI work I did today for the shop screen, I was able to copy over from yesterday's ship report. So I don't have a screenshot today, because it's not really all that interesting!

As for game mechanics, you get salvage equal to half the cost of any remaining components on destroyed enemy ships, and half the saved build rate of destroyed enemy shipyards. I might have to adjust this (or make the starting player ship weaker), though, if this makes the game too easy. You don't get free minerals when you discover an allied colony, but once you discover it, you can bump it at any time that there aren't enemies in the system to get free repairs and to buy new components. Don't worry, the game won't let you buy a component if it would make your ship go derelict due to lack of engines or crew!

Each colony has a random selection of 5 components that you can buy from it, with infinite stock of each. Of course, there are only 3 components defined in the data files so far, so all colonies sell the same things for now! But things will get interesting tomorrow once I start adding more components!

Monday, March 10, 2014

7DRL 2014 day 3: Gotta go fast!

Today I added components to BOSWP. I actually didn't do it quite the way I planned - I'd originally intended to have separate classes and data files for each type of component (e.g. engine, weapon, shield), but I realized I could just make one generic component class which can have all the various component attributes. This way you can make a component that's both a weapon and an engine, for instance! (Thraddash afterburner from Star Control much?)

I am storing the component data in a JSON file, though. Components have a name, description, cost, mass, and max hitpoints, and then the optional abilities, which are currently limited to crew, thrust, and weapon, though I'll eventually add more like shields and scanners. I was going to have a "bridge" component which destroys the ship when lost, but that seemed a bit unfair, so I limited ship destruction to reduction of speed to zero (dead in space) or crew count below mass (drifting away aimlessly). Or of course loss of all components, but in pretty much all cases, one of the other scenarios will happen first!

It's interesting to note that as your ship (or an enemy ship) loses components other than engines, it will actually go faster, since its mass is reduced but the thrust stays the same.

Enemy ship designs are stored in a JSON file as named lists of components. (The player's starting ship is of course stored in its own file.) I replaced the generic red "J" for enemy ships with the first letter of the ship name, so scouts will appear as "S", destroyers as "D", etc. This should help with threat analysis! Of course they won't change to other letters as they lose components, so you'll have to keep track of them. Enemy shipyards will tend to save up for the most expensive ship possible (currently a battleship), though they have a small chance each turn of splurging on whatever they can afford on any given turn. (Might want to check that that's game turn, not player turn, now that I have a proper speed system!) They will also build immediately (if possible) to defend themselves when the player ship is present in their system.

Sunday, March 9, 2014

7DRL 2014 day 2 - Real time enemies, turn based player

So, today I implemented enemies, and a very basic form of combat. Basically, your ship automatically fires at the nearest enemy that's within 3 squares (though it prioritizes shipyards over ships - if you want to attack a ship, just retreat from the shipyard and the ship will gladly follow you). The enemy ships will of course fire at you, too, and they will try to pursue you. Eventually when I add different weapons, I might have them try to stay at some optimal range, but for now they just try to get right up in your face. If you're not in the same system as an enemy ship, it will instead randomly patrol the galaxy, going from warp point to warp point.

There really aren't all that many enemies spawning at the moment, but the game is still pretty hard, if not impossible, because there's no way to repair your ship between battles. I guess when I add friendly colonies, I'll have to add repairs, too. Since destroyed components will be permanently lost, I think giving the player free repairs to any components that are damaged but not destroyed should be reasonable, assuming there aren't too many friendly colonies. And maybe the player can only be repaired while there are no enemies in the system...

A funny thing happened with the enemies, actually. As soon as I added the enemy shipyards, the game froze! At first I thought it was because the code to build enemy ships was extremely inefficient, but I optimized it, and it still froze. Then I noticed that the shipyards were churning out ships very fast, and their saved build rate was shooting up to ridiculous numbers! (It costs 1000 points to build a ship right now; I saw a shipyard with over 200,000 build rate saved!) Then it occurred to me - I was letting the enemies take turns continuously between player turns! So I made it so the enemies could only take one turn per player turn, and that solved my problem. Of course, tomorrow when I add components like engines, I'll implement a proper speed system, but for now, a 1:1 player/enemy speed ratio should be good.

Saturday, March 8, 2014

7DRL 2014 day 1 - Beware of warp points leading nowhere!

So, I think I accomplished my goals for today. And it's only 8 in the morning, how about that! I've got a cave-like grid of star systems, and each system contains a star, some planets, and warp points leading to the adjacent systems. The player can move his @ about on the star system map, and moving onto a warp point teleports him to the next star system over. (I decided to make warping automatic instead of requiring a keypress just to keep things simple, and not require that the game allow more than one space object per sector.)

If you'd like to check out my code, you can grab it over at Bitbucket. I've also got a screenshot in case you just want a quick glimpse at the game: