Friday, March 15, 2013

Miracles vs. Magic: What's the diff?

Years ago, I remember being annoyed at the depiction of religion in the computer game Space Empires IV. Even though I was an atheist at the time, I somehow saw it as almost offensive that you could just build religious buildings and get some sort of supernatural benefits from them. So when I went to make my own mod for Space Empires IV, I wound up explaining this away by treating the effects of the buildings as, well, basically magic in the descriptive text. "It's so because we believe it to be so", in other words - the placebo effect in action! That was probably even more offensive to people who were actually religious, though...

But then if religion isn't magic, how do we explain miracles? I think the answer is clear - it's divine intervention with the laws of nature. What about actual magic, though? Is it real? And if so, where does it come from?

If it is real, I'd have to say it's probably Satan's attempt to mimic God's miracles. We see this in Exodus, where God, through Moses, sends the ten plagues upon Egypt; the Egyptian magicians in turn try to duplicate them (why they would want more plagues, I don't know, maybe they just wanted to show that they were powerful magicians?) but their attempts are nowhere near as impressive as God's. We also have Elijah's competition with the priests of Ba'al; Elijah is so confident that God will set his offering ablaze that he douses it with water first to prove that it really was God and not some parlor trick! The priests of Ba'al of course are unable to duplicate this marvel.

So what does this say about portrayals of magic in games and media? Do we need to stop playing D&D and reading Harry Potter because they're "satanic"? I don't think so. People are capable of telling fantasy from reality, and there's nothing wrong with a little escapism so long as it doesn't consume one's life. Does playing Grand Theft Auto turn people into criminals? Does watching Jackass turn them into idiots? No, it's just entertainment. Mostly harmless, as Douglas Adams would say.

Back to Space Empires IV, then. What's up with the religious buildings providing wide-ranging effects such as bonuses to ship combat effectiveness (War and Death Shrines) and renewal of planets' natural resources (Nature Shrines)? I'd have to say that it's simple - Space Empires IV is set in a polytheistic universe, so there are actual gods answering the prayers of the worshipers at these shrines. But the gods are unnamed, for whatever reason. Maybe someone will make a mod which expands on the religion system, naming the gods. Maybe someone will even make a mod for Space Empires V which has scripted "religion spreading" events, sort of like Civilization IV and V. (You couldn't do that for Space Empires IV because it didn't support scripting.) Who knows? But again, it's just escapist entertainment.

7DRL 2013 day 7: ITS OV4R!!!

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

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:


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 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!

Friday, March 8, 2013

7DRL 2031 day 0 redux: Bitbucket!

I've created a Bitbucket repository for TriQeust:

Check back tomorrow and onward to follow my progress!

Thursday, March 7, 2013

7DRL 2013 day 0: Intro to TriQuest!

So I'm going to be participating in the 7DRL challenge again. If you don't know what 7DRL is, it's 7 Day Roguelike, where "roguelike" is a genre of single player adventure/roleplaying game with minimal graphics and intricate gameplay mechanics. The goal of the 7DRL challenge is to write a roguelike in 7 days. No prizes or anything (apart from some neat logos you can put on your blog or whatever), but it's fun to build a game and play the games that other folks build. I've participated four times before, and succeeded twice; you can see my completed games on my website: - Decimation, my 2009 entry, a very simple game where you're the number zero and you use math to eliminate the other numbers. - Smash Arena, my 2010 entry, an arena battle game where you try to knock enemies out of the arena; the more you damage them, the further they fly when you hit them, sort of like in Super Smash Bros.

I also participated in 2008 (tried to make a game called Rogue Battalion that had driveable vehicles, but got in over my head since it was my first time) and 2011 (tried to make a game called Into the Darkness that was a metaphor for spreading the Gospel, but was too busy with work). I didn't participate in 2012 because I didn't have any good ideas for games that year.

But this year I've got an idea! A bit ambitious, but if I plan it out, I think I can accomplish it. My idea is called TriQuest, and basically it's a hybrid roguelike and turn based tactics game. Instead of controlling one character, you control three - a Warrior, a Mage, and a Priest. Now there have been other roguelikes where you control multiple characters, but these have always either had you controlling one character directly, with an AI controlling the others, or required you to move each character in turn. My idea simplifies the mechanics a bit, while adding a new level of tactics to the genre.

You know how in roguelikes, it's one character or monster per tile? Well, in TriQuest, this rule no longer holds. Each tile will be split up into nine subtiles arranged in a 3x3 grid (hmm, like the numpad? how convenient!), and you can arrange your three heroes in a formation in any way you like (using the numpad of course). Monsters, too, will appear in formation. You might run up against a squad of up to nine goblins!

I haven't got all the mechanics worked out quite yet, but I do have a few ideas on how they will work. For instance, I think that weapons will have a "length" or "range" attribute. This range will be measured in subtiles, and attacking a monster outside of your weapon's range (say, from the back of the formation) will reduce your accuracy and/or damage. Of course, hanging out at the back of the formation will protect you from monsters' attacks in the same way (assuming they don't have long-range weapons), so it's sort of like Final Fantasy with the front and back rows. Except that monsters can attack you from all four sides, so you'll have to adjust your formation on the fly to deal with threats from every direction! I'm thinking there might also be an additional penalty (or maybe even inability to attack, but also inability to be attacked except by area of effect spells) for hiding directly behind another character.

Also, I was thinking of having not the traditional "dungeon levels", but instead a sprawling Zelda-style overworld with a gradient noise mapped "threat level", with the final boss lurking at the maximal point on the noise map. You might be fleeing from some level 3 monsters, and unwittingly stumble into a level 4 zone... eek!

So, what's the plan? Well, here it is:

  1. Saturday: Map generation
  2. Sunday: Heroes and movement
  3. Monday: Monsters
  4. Tuesday: Combat
  5. Wednesday: Magic and skills
  6. Thursday: Items and weapons
  7. Friday: Polish, testing, and bugfixes
Oh, and technically I guess this post should be titled "day -1", since today's Thursday, but whatever... :)