Mar 03

GearHead-1 v1.201: The Inevitable Bugfix


I’ve just uploaded a bugfix release of GearHead-1 to GitHub. It fixes a crash that occurs at the conclusion of the kidnapping story. You can download it from here:

This version also includes several of Michael Deutschmann’s patches and fixes some minor scripting problems.

Important note for Windows users: I’ve moved the gharena save+cfg files from the config folder to the user folder because the config folder is a PITA to get to in Windows. When upgrading to the new release you can find the old folder by doing a search for file “gharena.cfg” on C drive, then copy your save games and config file to the new gharena folder that will be created in your home folder the first time you run v1.201. Sorry for the inconvenience.

Mar 02

Lessons GH1 can learn from Dungeon Monkey Eternal


Over the past few years I haven’t been able to do much programming, but I did cobble together a new entry in the Dungeon Monkey series, Dungeon Monkey Eternal. It’s a fun tactics RPG which is played in short coffeebreaklike adventures. This was my first major project in Python, and a big motivation behind its development was to test some of the systems I plan to use in the next GearHead. Here are some of the things I’ve learned.

Know where you’re going

I dove into the development of both GearHead-1 and GearHead-2 without any clear plan. I knew that I wanted to make a mecha RPG set in a sandbox world, but I didn’t have a clear picture of what the completed state of the game would be. Instead I just kept building and building, occasionally painting myself into a corner.

With Dungeon Monkey Eternal, on the other hand, I decided what features the final game would have before I started coding. Although these plans changed several times throughout development, simply having an end state to work towards was a big help. I could anticipate the effects of things that were not finished yet. This brings me to the next point…

Finish one thing before moving on to the next

Make sure that a newly added thing works well before charging ahead and adding more stuff. A lot of GearHead’s features were added with the expectation that I’d go back and improve them later… then I never did because I kept jumping ahead to the exciting bits. It’s best to get things working well the first time. Then you can relax and forget about them, at least until conflicts with another feature start causing problems…

A little bit of beautification can go a long way

Graphics is one of those not-so-fun things I kept putting off. I kept telling myself that making GearHead look good would take too much work, or that I wasn’t very good at graphics (despite the fact that by day I’m a cartoonist; young Joe was a contradictory guy). Well, I’m happy to announce that you don’t need a million hours (or dollars) to make a game look presentable. Just a little effort can make a big difference to a game’s appearance.

Ugly memo browser from GearHead-1 and ugly console display from GearHead-2.

Ugly memo browser from GearHead-1 and ugly console display from GearHead-2.

Compare the two GearHead examples above to the Dungeon Monkey Eternal examples below.

Dungeon Monkey Eternal popup menu and text display box.

Dungeon Monkey Eternal popup menu and text display box.

It didn’t take very long to add a border and textured background to the Dungeon Monkey Eternal panels, but it looks far nicer than simply dropping a colored rectangle on the screen. The same goes for making sure that the size of the panel matches the content that will be placed in it. Next look at the use of terrain:


There are several different versions of each ground type and the forest tile. This breaks up the shapes and stops those areas from having an obviously repeating pattern. There is a transition between the grass and the dirt, unlike the abrupt change seen in GearHead. The walls have been decorated so you can tell at a glance which building is the library and which is the armor store. None of these features are particularly hard to implement, but they make the map look much better.

Better AI beats bigger baddies

All NPCs in GearHead use the same combat AI, and consequently they are all relatively predictable. Dungeon Monkey Eternal uses several different AI types. Individually they are still rather stupid, but the presence of types means that the player has to be ready to use different tactics.

Good AI can make a monster more dangerous than simply increasing its level or abilities. An archer who attacks at range but doesn’t flee from the player characters is kind of dangerous. An archer who attempts to stay away from the party while still maintaining line of sight is more dangerous. An archer who stays away from the party, maintaining line of sight while hiding behind cover, who specifically targets the party’s mage or other vulnerable characters, is super dangerous.

Procedurally generated text is what is good in life


Currently, the way personality traits are handled in GH1 is that for any dialogue line that should be variable, there’s a list of alternate versions corresponding to different personality traits. So for instance, the same greeting should have a default version, a shy version, a sociable version, a cheerful version, yadda yadda yadda. Writing multiple versions of every line of dialogue is extremely labor intensive, and it ignores the fact that most NPCs will have more than one personality trait.

Dungeon Monkey Eternal makes good use of procedurally generated text. Several techniques are combined: a context free grammar expander is used to expand tokens into sentences, then a phrase substitution function swaps words based on the character’s dialect. This happens for both the PCs and NPCs. Dwarves talk like dwarves, orcs talk like orcs, and fuzzies talk in LOLspeak. It works pretty well.

This technique could probably be implemented in GH1. It would require reworking much of the existing dialogue to add tokens, but even that would be less work than trying to fill out all personality trait variations in the old system.

Make the information easy to get


One of the big problems with GearHead is that a lot of information is effectively hidden from the player. More information needs to be visible, and just as importantly the ways this information can be used should be more obvious.

Feb 29

Current GearHead1 Goals

Mikki, Watu, and Seok-hyun from "How to be Human"

As I’ve said before, my current goal for GearHead-1 is to polish up what’s there rather than to expand the game. Here are my top priorities for things that need improvement.

  • The plots and other scripts should work consistently and without too many errors. I realize that it is probably literally impossible to eliminate all errors, but at the very least I can systematically go through the contents of the Series folder and make sure some minimal standards are met. For now: make sure the combat missions use the threat function, set memos correctly, and clean up on exit.
  • As far as I know the GH1 core story can’t reach a deadend state, but I want to run some tests to make sure.
  • The SDL version of the game should be better looking. Everything that needs graphics should have graphics- there are still a number of things which don’t have a proper sprite. The graphics should serve their intended purpose of conveying information to the player. They should look unified and attractive. I plan to use some of the lessons I’ve learned from Dungeon Monkey Eternal here. For now: draw sprites for each of the wall types, add sprites for the props and monsters that don’t currently have one.
  • The interface could use a checkup. The most commonly used interfaces- Character screen, Field HQ, Inventory, and Message browser- need to play nicely with one another. Mouse handling could be more intelligent.
  • Sexuality in GH1 is really really weird. There is no such thing as homosexuality, but being bisexual is basically a superpower. This can be improved.
  • Some of the improvements from GearHead-2 should be imported, such as the inventory/part browser info display and the personadex. At the same time, the improvements I’m making to GearHead-1 need to be ported into GH2.
  • Speaking of GH2, the SDL mode map display should take up the entire screen just like in that game. There’s no reason for over half the screen to be filled with panels that are usually not in use. Also, the SDL screen ought to be resizable, and fullscreen mode should query the video card to start in a sensible mode. Have you ever peeked inside the sdlgfx.pp unit? I obviously had no idea what I was doing. Seriously, look at GHFlip and tell me if you can figure out what I was thinking.

Note that this list leaves out various improvements and refactorings that would maybe improve the code base but have zero impact on the user experience. For instance, did you know that it’s possible to declare objects in FPC without switching to ObjPas or Delphi mode? Turning the gear records into objects would simplify the code immensely, but it would take a long time to do and it wouldn’t improve the game in any way that would be visible to players.

I think this list of goals is quite achievable. Is there anything else you think I need to do?

Feb 28

GearHead-1 v1.200

Seargent Huff from The Last Human AliveI’ve just uploaded a new release of GearHead-1 to Github. You can download compiled versions for Windows and Linux, as well as the source code, from here. Let me know if you have any trouble… I haven’t done this in ages and just hope I packed everything right.

Version 1.200 compiles with the latest release of Free Pascal. It now uses the FPC SDL units, so you no longer need to download JEDI SDL separately. Linux uses should have SDL 1.2, plus the associated SDL_ttf and SDL_image packages, installed. For Windows users, all the needed dlls are included in the precompiled zip.

Try it out and let me know what you think. The complete list of changes is beneath the fold. Continue reading

Feb 25

Xiap Victorious

Xiap and his lancemates in the wreckage of Typhon's fortress.I just completed my recent playthrough of GearHead1. Xiap and his lancemates- the robot Omega 1004, guardian Meskyfer, and combat medic Joyjen- defeated Typhon and the Clan Ironwind army. During the final battle Xiap also managed to shoot down Yjin’s neko, which was a nice bonus.

Overall I really enjoyed this playthrough. I think the game successfully captures the mood of 80s/90s mecha shows; there’s an ever-present feeling of peril and loss without any sort of grimdark affectation. There are so many things to do. The world feels active and vibrant.

Xiap was created as a basic mode character since I haven’t played the game in ages and chose to play it like a newbie. He didn’t learn mecha engineering for the same reason. I didn’t use save file backups or other cheats because I wanted to see how badly the game could kick my arse.

GearHead is a lot more forgiving than most roguelike games, but this is not to say that it lacks challenge, exactly. Losing a prized mecha can be almost as bad as dying; losing a lancemate can be worse than that. Xiap lost plenty of both over the course of the campaign. I guess I just like that feeling of peril and loss mentioned above? The only time I was ever tempted to cheat was during the great Namok bus stop pineapple salad incident, but I kept going and soon formed a new lance (who probably had lots of difficult questions about what happened to my previous lance). It might be a good idea to add a difficulty setting like DoomRL, though I have no idea right now how that would work in practice.

I didn’t encounter any truly game-breaking bugs, but found plenty of small ones. The homebrew scripting language that all the plots are written in is just as hateful as I remember, but fortunately I remember it better than I thought I would. The same goes for Pascal, honestly.

My goal now is to fix problems and polish up the rough edges. I will probably want to add some new content later- there have been requests for the rusty scepter quest, and there really ought to be more than four guaranteed lancemates- but for right now the emphasis will be on making sure the stuff that’s there works well. There are a number of things which I now regard as bad design decisions that will be left in the game because that’s just the way GearHead-1 is. It’s a fine line between problems that ought to be fixed and problems that are essential identity.

Victory file below the fold. Continue reading

Feb 22

Comic World Busan 96

This slideshow requires JavaScript.

This weekend I tabled at Comic World Busan 96. I met a bunch of people, ate a whole bunch of food, and sold out of four books. It was a good time.

Unfortunately, it was the last ComicWorld for Belli-buttons and Puppyshaker (for now), leaving me the last foreigner at Korean comikets (for now). I wish the two of them good luck in their future endeavors, and thank them for all the help and advice they’ve given me. Incidentally, everyone who tables at ComicWorld has a cool trucker-esque nickname. Mine is 펭귄아저씨.

One thing I noticed is that there’s no mecha at Comic World Busan. In Seoul there’s Kim Yura (aka GoddessMechanic) and sometimes a few other artists, but they never seem to make it down this way. I really ought to look into putting together some GearHead swag. I thought about making illustration cards with a mecha on one side and its pilot on the other. Another good idea would be papercraft mecha; I’d love to have some models of the GH mecha myself, and this would be a reason for me to try and improve my 3D modeling skills.

Feb 17

New Walls and Template

Just in case there’s any interest, here is the new rusty steel wall spritesheet:


And here is a blank wall template:

GH1_NewWallTemplateThe remaining walls that need to be done are Residential Wall, Stone Wall, Hospital Wall, Plain Wall, Gold Wall, Wooden Wall, Stainless Steel Wall, Earth Wall, Shop Wall, Fortress Wall, Industrial Wall, Neon Wall, Restaurant Wall, Garage Wall, and Organic Wall.

Feb 16

New Walls

Picture of the new rusty steel wall

I am going to try to add thinwall sprites for all of the wall types. The former thinwall sprites were so large that they completely hid the tile behind them, so I’ve reduced the height of the new ones a little bit. The color scheme of the new walls is inspired by the Sunrise real robot cartoons of the 80s.

There are many improvements that could be made to the map display. As seen in the door tiles above, there’s some mismatch between the walls and the ground tiles underneath them. This could be fixed by giving ground types a border, so the tile next to the door could have carpet on one side and dirt on the other. Borders would also fix the patchwork problem ground tiles currently have. Another big improvement would be to add signs or some other way of telling the purpose of a building just by looking at it. Although some walls are already associated with specific businesses (shop walls, garage walls, hospital walls), this is not applied consistently and doesn’t cover all building types.

Feb 13

Bad Plot Behavior in GearHead1

NPC saying "I think Cahewroi needs a mecha pilot to protect some trucks."

Does she really?

One thing that’s very clear about GearHead1 is that I was making everything up as I went along. Several features that would go on to become very important (such as email, memos, and factions) were not introduced until well into development, meaning that many of the plots and missions that were created earlier either lack them or use them poorly. On a related note, it took me a long time to figure out standards for plots, so many missions are just plain weird. Here are some of the bad plot behaviors I’m going to try to fix:

  • Not giving a memo when a mission is granted, or losing the memo before the player collects the reward.
  • Plots setting wrong or inappropriate memos. Several core story episodes are guilty of this.
  • If a rumor tells me that a certain NPC is offering a job, speaking to that NPC should never lead to random chatter. If the PC has no chance to get the job this should be communicated through dialogue.
  • Missions should be described, and the PC given a chance to accept or decline, before the NPC launches into the “Are you ready to go?” spiel.
  • Most of the try-to-get-a-mission sequences allow two tactics: sound tough with Intimidation skill or sound concerned with Conversation skill. This should probably be made more explicit, and the weirder mission checks reworked.

Please let me know in the comments if you encounter any of these problems in the wild; an exact quote taken from the plot involved should allow me to identify it. Also, let me know if you have any other mission problems or pet peeves.

Feb 10

Young Joe was an arse.

One of these guys is a bit more of an arse than the other.

Young Joe vs Old Joe

Through playing GearHead-1 I’ve come to realize something many of you probably already know: my twentysomething self was a bit of an arse.

I mean, in many ways he was also quite brilliant, but when my lancemates die of poisoning on the bus to downtown Snake Lake, despite the fact that they had plenty of quick fix pills and first aid packs, I want to pull Young Joe aside and punch him. Same deal when my lance, which includes an expert repairman, discovers Omega-1004 stuck in a cave and is unable to revive him because the character with the repair skills is not the leader of the group.


I seem to recall that I had reasons for these design decisions. I can’t remember what they were. So, I’ve decided to fix them.

Starting from the latest git commit, status effects will have no effect while the PC is jumping forward in time and cannot react to them. The skills menu will allow use of skills known by all lancemates. I’m sure there are still lots of arbitrary unfairness and interface shenanigans- so far I’ve lost two mecha from entering combat overburdened after forgetting about autopillaged loot- but hopefully this is a step towards making sure that all your future deaths are the result of human error rather than machine contrariness.