Tuesday, April 1, 2014

Beware of Strange Warp Points v1.1

With some help from a friend from the Space Empires community, I'm proud to announce the release of version 1.1 of Beware of Strange Warp Points! You can download it here. There are lots of new features and bug fixes (details are in the manual), so if you enjoyed the 7DRL release, be sure to check it out!

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:


Wednesday, February 26, 2014

7DRL 2014 plans

I figured it would probably be a good idea to set goals for myself for this year's 7DRL challenge, like I did last year, so here goes:

Day 1: Map generation. This involves creating a network of linked star system maps ("rooms"), connected by warp points ("doors"). They'll probably be laid out on a grid to simplify map generation code, and so I don't have to swipe code from FrEee to do that. And of course, the stereotypical @-ship running around on the galaxy-map!

Day 2: Enemies and combat! This means enemy shipyards (which will start off as visible, until I implement tachyon sensors) that spawn enemy ships. Combat will be simplified, since I won't have ship components yet.

Day 3: Ship components. For both the player and enemies! Will be defined in JSON files for easy moddability. Won't have generic "abilities" like in SE4; that's too much work for a 7DRL. Instead, each component will have a single function, and each JSON file will contain only components of a single function (e.g. weapons.json or engines.json). Not all components will be defined yet; only a basic subset of them as a proof of concept.

Day 4: Shopping shopping shopping shopping! Killing enemies should give the player minerals, as should discovering allied colonies. Allied colonies should also allow refitting of your ship using some sort of shop interface.

Day 5: More components! Just filling out the data files here with more components to make the game interesting, now that we have shopping. This is when the enemy shipyards become cloaked, since now you can buy tachyon sensors.

Day 6: Testing & bugfixes. Let's make sure the game is winnable, and it doesn't crash (very much)!

Day 7: Extra day planned into the schedule in case I'm not up to working on the game some other day!

Thursday, February 20, 2014

7DRL 2014 ponderings: Beware of Strange Warp Points

So I thought it would be fun to do a Space Empires themed roguelike for this year's 7DRL challenge. I think I'll call it "Beware of Strange Warp Points". It will play out sort of like the old DOS Trek games (could those perhaps be considered early roguelikes?), or like last year's KlingonRL - you're the captain of the last surviving ship of the Terran fleet, and it's your job to stop the Jraenar invasion!

I'm thinking the map will be laid out on a grid, with star systems being like "rooms" and warp points being like "doors". I say a grid and not a freeform warp point network because grids are easier to program. That said, I'd like for there to be "holes" in the galaxy map, so it resembles a cave level in a traditional roguelike.

The player will start with a basic ship, and will be able to upgrade it at a spacedock using minerals he collects, either from defeated enemies, or from allied colonies. Unlike in traditional Space Empires games, ship design will be a bit more freeform - there won't be any preset "hull sizes"; instead, you can just install whatever components you want. The more components you install, the heavier your ship becomes and the slower it goes, unless you install more engines to counter this effect. I guess it's kind of akin to a traditional roguelike's inventory system - you carry more equipment, it slows you down; you drink strength potions, it lets you carry more stuff!

Since most weapons in Space Empires are ranged, and targeting ranged weapons in a roguelike is a pain, I thought I'd do something a bit different with the combat system. Weapons will automatically fire at a randomly selected (or perhaps the closest, if there is ranged accuracy/damage loss) appropriate target every time they are reloaded. So all you have to worry about is maneuvering your ship to stay in range, but out of range of too many enemies' weapons!

I'm thinking the goal of the game will ultimately be to destroy all the Jraenar shipyards scattered around Terran space. Perhaps they will be cloaked, so you'll need to upgrade your ship with a tachyon sensor to detect them! Destroying the Jraenar ships is ultimately a diversion; once you take out all the shipyards, the game would only get easier from there, so there's no point in dragging it out.

I haven't decided how I'm going to handle missiles and units yet. Perhaps missiles will behave the same as they did in SE4 - move at a set speed toward their target, and be able to be shot down by specialized point defense weapons. Or, if I'm feeling lazy, they'll just be long-ranged weapons with 100% accuracy but high cost and low fire rate. Another alternative is a MOO2-style "missile evasion" stat, which the point defense weapons would increase, abstracting away the missile/PD balance while still keeping it in play.

As for units, I suppose there's really only a few kinds that I'd need to worry about. Troops and weapon platforms are pretty much irrelevant, unless I actually want to include planetary combat. Drones are basically just fancy missiles, so I don't really see the need to include them. Fighters would be interesting - have them controlled by AI and pursue the enemy (or you, if they're enemy fighters)? Mines would also be interesting, especially if they're invisible like in SE4! Satellites are basically just giant immobile fighters, so I'm not sure if they're really all that necessary.