Showing posts with label roguelike-dev. Show all posts
Showing posts with label roguelike-dev. Show all posts

Saturday, March 12, 2016

ShoppyRL day one: "I'm the map, I'm the map..."

So today I made a map! It's similar to the TriQuest map (2013 7DRL) in that it's composed of "danger zones", but this time the danger zones are "fuzzed" a bit so they're not perfectly square. Well, actually they have holes cut out of them!

I've also created some creatures which are placed on the map: 5 heroes and a bunch of monsters. The terrain and the creatures can be edited in data files!

I also made a basic combat system; not sure how balanced it is, but it's similar to the one I used in TriQuest. Hopefully balancing it will require only tweaking creature stats...

Finally, there's a console app which displays the map and simulates some combat (though creatures can attack each other from across the map). I think I'll have to use some other sort of GUI, though, as the console app is way too slow then displaying the map. No idea why the Windows console can't just display a grid of characters... isn't that what it's for?

I think I'm basically on track for today, though I'll be rather busy the rest of the week so I don't really have high hopes of completing this game on time. I would have continued on with tomorrow's goals, but I'd already spent enough time programming for one day! (Even though I borrowed a lot of utility code from other projects of mine...)

Speaking of tomorrow's goals...

  • Create a real GUI
  • Oops, I forgot to finish this... let me go publish it now!

ShoppyRL day 8: "Game over, boys! No, wait, career over..."

So, I wasn't able to complete ShoppyRL this week. I already knew it on day 2 - I just had too much going on, and I was also fed up with trying out different UI frameworks. The Windows console was too slow after all (seriously Microsoft, how hard it is to make a freaking CONSOLE?!) and I tried WPF but I don't know enough about it to make anything happen in the "proper" way without what felt like gigabytes of repetitive view-model code. I could have hacked together a "fake" WPF app, or switched over to WinForms in which that sort of coding style is actually considered acceptable, but at that point I didn't really care anymore; I didn't have time for any more messing around, so I gave up. Sorry folks! Maybe I'll pick this up again someday, but I kind of doubt it... I don't even think I want to be a programmer anymore! Well, I could do it if I didn't have to write user interfaces, but good luck finding a job or open-source project like that...

Friday, March 4, 2016

ShoppyRL day zero: "Once more unto the breach..."

Time for another 7DRL! This time I'll be doing an idea that Nick (my friend who helped me with polishing up Beware of Strange Warp points a few years ago) and I have been discussing.

This one's called "ShoppyRL", and it's inspired by the PC game Recettear as well as the Android game Merchant. In ShoppyRL, you play the role of a shopkeeper by day, and switch over to controlling an adventurer by night to fend off the monster incursion.

As a shopkeeper, you'll be buying, selling, and crafting items with various town citizens, including adventurers, craftsmen, and other such folks. You want to make a decent profit, but be sure not to overcharge the adventurers, as you want them to have enough money to buy more gear later!

As an adventurer, you'll patrol the area outside the town in search of the demon gates, which are spawning the invading monsters. If you destroy the demon gates, you win the game, but of course they are well guarded by monsters, so you'll need to gather loot to improve your adventurers. Wait too long, though, and the monsters will overrun the town!

That's right, "adventurers". There will be several adventurers, and you'll be able to switch between them at any time, with the ones you're not controlling being run by the AI. I'm hoping to get some sort of "hunting pack" mechanic in there that keeps the adventurers close together (stay near the strongest ally, for instance) while also attacking nearby enemies, so they don't run off and get killed too easily. Of course, the monsters will employ this algorithm as well, so prepare for some epic battles!

Stay tuned over the next week as I develop ShoppyRL!

Oh, yeah, goals for tomorrow...
  • Create "creature", "townsperson", "hero", and "monster" classes
  • Create a map, and populate it with terrain, heroes, and monsters
  • Implement basic combat mechanics (not movement yet, just combat)
  • Create unit tests to make sure the map and combat work (since there won't be a GUI yet)

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.

Friday, March 15, 2013

7DRL 2013 day 7: ITS OV4R!!!

Well, I finally completed my 7DRL for this year You can go and download it here:

http://edkolis.exofire.net/triquest.php

Things that are new since yesterday:

  • Added a user manual
  • Added victory conditions (as yet untested, the game's kinda hard!)
  • Added "memory sight" (you can see terrain that you've already explored on the minimap)
And as always, you can check out the source code here:


Enjoy!

Thursday, March 14, 2013

7DRL 2013 day 6: Itemized Deductions

Today I implemented items for TriQuest. Since this is a 7DRL and I wanted to get things done quickly, though, I took a slightly unconventional approach to the inventory. Instead of being able to carry around duplicates of all your items, each item type just has a flag to say if the party has found it or not. If it's been found, you can equip it; otherwise, you can't until you find one. Also, consumables (health and mana potions) can't be stored; they're used immediately as soon as you step onto the tile containing them. If you want to save them, you'll have to avoid stepping on that tile until you need them!

That said, there are a few interesting inventory mechanics. For instance, there are two kinds of health and mana potions you can find. The "pack of small potions" restores the health or mana of all party members by 20 points, while the "large potion" restores the health or mana of the most injured or depleted party member by 60 points. Also, no item is designed to be superior to any other item; they all have their strengths and weaknesses. (Though I might want to increase the defense penalty on the warrior's heavy weapons since I bumped up the positive stats of just about everything during testing to make the midgame more survivable! And I still haven't found the final boss yet - I hope he's at least theoretically beatable, not to mention extant!)

Again, no screenshot today, because not much has changed visually - all you'd see different is maybe a blue % sign indicating a pack of small mana potions lying somewhere on the map!

Wednesday, March 13, 2013

7DRL 2013 day 5: Skilled Labor

Today I added skills to TriQuest. Skills are basically special abilities that a hero can use that affect a whole formation. Most of them are used against enemies, although the Priest's Heal Wounds skill is used on the heroes, naturally enough.

To use a skill, first you need to maneuver your party so that it is directly adjacent to and facing whatever enemy formation you want to use it against. Then you press the "s" key to bring up the skill menu. Next you choose which hero is going to use his skill - only one skill can be used per turn, even though there are three heroes. Finally you choose which skill the hero is going to use - each hero has two to choose from.

No screenshots today, since the game hasn't really changed much - OK, I did add a display of how much mana your heroes have next to their health (mana is used to perform skills), but that's nothing to write home about! Instead, I'll describe each of the skills, though a short description is also available in-game in the skill menus.

Warrior skill 1: Omnislash - This attack hits all targeted enemies with a physical attack which never misses, regardless of range.

Warrior skill 2: Berserk - This skill temporarily increases the Warrior's Attack and Body stats, at the expense of his Defense and Mind stats. Using it again while it is still in effect will extend the duration.

Mage skill 1: Fireball - This attack hits all targeted enemies with a magical attack which never misses, regardless of range.

Mage skill 2: Slow - This skill permanently reduces the speed of all targeted enemies by half. Note however that it only works once on each target; casting it twice on the same target will not slow it any further. It would be wise to save some mana to use this on the final boss...

Priest skill 1: Heal Wounds - This skill heals some HP to all of the heroes. Heroes with more Body stat will be healed more, though, so it will be hard to heal the Mage and easy to heal the Warrior.

Priest skill 2: Banish - This skill teleports the targeted enemies to a random location. Handy for when you're surrounded!

Tuesday, March 12, 2013

7DRL 2013 day 4: The wombat of combat

Day 4, and I've got basically a fully functional game! Sure, a few pieces are missing, but they're not essential to having a working roguelike. (Though it would be nice to have some sort of victory message when you defeat the final boss... not that I've actually found him yet! Probably some sort of healing potions would be nice, too, so you can survive long enough to find him...)

So, combat. Formation definitely matters now. Place the heroes you want to do the damage dealing (and the damage receiving) near the enemy; place the others (or the ones with the longer ranged attacks) in the back. You can attack someone who's out of range, by the way - you just take a rather large accuracy penalty: you have a 1 in 3 chance to miss for each subtile out of range that the target is! But the same penalties apply to monsters, too... except that for some reason the monsters sometimes like to target heroes in the back instead of in the front! Not sure what's causing this, but it seems to be related to the way you're facing, or maybe they way they're facing...

Since now you have hitpoints to keep track of, I also added a stats box, which shows the stats of each hero in your party. Later I plan to let you look at enemy formations to see their stats, too.

Here's a screenshot of the game - not much has changed, but if you're actually playing it (which you totally can, in case you forgot - just check out the code at https://bitbucket.org/ekolis/triquest) you'd notice lots more messages in the log pertaining to combat!


Oh, and one bug that I think I'll leave in as an interesting game mechanic - monsters will literally kill each other to get to you! If you're fighting one group of monsters, and another group of monsters that's farther away sees you, they will begin fighting the monsters you're fighting, from the rear!

Monday, March 11, 2013

7DRL 2013 day 3: Monsters! Raar!

Now TriQuest has monsters! Unfortunately, they just appear as ASCII symbols, and since there's no combat besides moving onto the monsters to kill them (or being moved onto yourself and dying), you can't really tell what is what. They do have names and stats, I swear!

I also added the formation change mechanic I'd alluded to yesterday. You can press F to change formation; then you're prompted to place each of the characters in turn using the numpad. Doing so consumes a turn (don't do it on rough terrain or it will cost more time), but if you change your mind you can press F again to cancel without wasting a turn.

Here's a screenshot of the game with some monsters:


The blank area up top is the message log. I couldn't capture any messages because it seems that pressing a key (such as to take a screenshot) clears the log, even if the key is not an actual game command. Oh well.

Tomorrow, combat! I've got some interesting ideas for how I'll do that - I've already got some stats set up for the heroes and monsters, and basically fighting will involve rolling dice based on a pair of stats, one for the attack type (physical or magical), and one for the role one is playing in combat (attacker or defender). Attackers will use the attack type that is likely to inflict more damage, so (for instance) the mage will only attempt a physical attack if the target has a high magic stat. And then there's range - attacks will be degraded based on the range to the target (in subtiles), so that's where the formations come in! Just like in Final Fantasy, your characters will be able to rush to the front lines to inflict more damage, or retreat to the back to lessen the damage they take - except that enemies will come from all four sides, so the lines of battle constantly shift!

Sunday, March 10, 2013

7DRL 2013 day 2: Heroes on the move

Well, now I've got some heroes in the game, and you can move them around on the map. Since this is a tactical game, and it would be a pain to have to adjust your formation every time you want to fight monsters coming from a different direction, the game has two movement modes: normal and strafe. In normal mode (just pressing the arrows), the formation will automatically rotate to face the direction you pressed if you are not already facing that direction; if you are facing that direction it will just move there. (Note that rotation costs a turn - don't get flanked!) In strafe mode (shift-arrows), on the other hand, your formation does not try to rotate when it moves.

Here's what the game looks like thus far:


I also wanted to add the ability to rearrange your formation today, but I'm getting a bit sick of programming for now. Maybe I'll do that later this afternoon. I ran into a lot of issues with slow rendering; it turned out that just rendering a 100x100 map with each tile being a 3x3 grid of characters is actually pretty slow! So for now I'm just rendering stuff in line of sight. Eventually I'll have to add a proper fog of war, and find some other way to clip stuff that you've seen before but that's currently offscreen. Or I could just show the fogged-but-previously-seen tiles on the minimap, and not on the tactical map...

Saturday, March 9, 2013

7DRL 2013 day 1: I'm the map, I'm the map, I'm the MAP!

Well, I got map generation working today! It wasn't all that hard, since I'm doing a natural overworld style map instead of a dungeon, so if things aren't lined up perfectly - hey, it's nature!

Here's a screenshot of what I've accomplished so far. It looks better than I'd anticipated!


Tomorrorow I'll implement heroes, so that will require subtiles, since the heroes will be traveling together. I'm not sure if I'll do the subtiles today or tomorrow - just have to see if I feel like working on this some more later on today! Should be pretty simple, since I'm not planning on doing anything like allowing different subtiles within the same tile to have different terrain. Just a 3x3 array or something!