Category Archives: Game Development

Noodling the Numbers

Been working on creating some better combat mechanics and options for Auto Fire lately. One of the factors I was working on was tangibly having hit chance be affected by tactical choices such as “painting” a target with radar for more accuracy, or on the other side moving faster to avoid getting hit. I got those systems in but it didn’t really seem to matter.

I had to seriously think of how I’m dealing with accuracy, range and speed. My initial version of the combat system in Auto Fire was inspired by the system in Diablo II. It used this sort of calculation:

Chance =200% * AttackRating /

(AttackRating + DefenseRating)

Consider AttackRating to include things like gunnery skill, weapon accuracy, and other targeting bonuses. DefenseRating in contrast is stuff like range, target speed, and target size.

Multiplying the value by 200% gives the player 100% hit chance whenever the Attack Rating is more than 50% the Defense Rating… So in the average case the player is guaranteed a hit. This was the system I used in X-Men Legends, and it feels pretty good in an action game where you are directly controlling your character and only want to have misses when your opponent clearly outclasses you.

The problem with this method is that the chance to hit tapers off because it never reaches zero… Thus, I was finding that there’s only a small sweet spot where hit bonuses mattered between 100% chance and maybe 60% chance.

If you like numbers, here are the results of that sort of calculation.

I made some changes and pushed the system more towards a classic “opposed totals” method more akin to D&D or most pen and paper games.

Chance = (base + AttackRating – DefenseRating) * 10%

It’s not original, but what it did was make each bonus you earn through improved targeting, or sustained fire (or penalty from moving fast) has a pretty chunky impact on the hit result.

Here’s that table if you’re feeling nerdy.

I do put a minimum hit chance of 10% just so it’s not worthless to attack, and I’m not sure what increasing the miss chance is going to do to the feel of the game.

I have a mechanic where excess above 100% is used as a critical chance (That is, 130% chance is an automatic hit with a 30% crit chance). I might consider doing the same on the bttom so a “miss” is a glancing blow that still does a little damage, progressing to a real miss based on the percentage. (For example, -30% is a 30% chance of a real miss and a 70% chance of a glancing blow).

I’m wrapping that back into weaponry definitions and looping back around to where I can try the new system in the wild. From there we’ll see what happens.

Auto Fire v0.5.08 – Controls! Citadels! Courier Missions!

I’ve had a pretty busy last month (and some weather drama), but luckily I did get some meaty things done on Auto Fire.

Controls

Many people have lamented that it is difficult to control Auto Fire because the “forward” key also accelerates. Responding to feedback, the new controls are thus: If you press forward, your speed is capped at 40 MPH (that is, 2 actions per second). This way you can manage most maneuvers without crashing into everything around you (previously a popular activity in urban areas).

Speed is still king however, especially out in the badlands! A separate Boost key is used to accelerate beyond 40, up to your vehicle maximum.

Citadels

A citadel is a civilized city where you can take a break, get repairs, and buy/sell items. Eventually different citadels will have their own specific functions, depending on which corporation owns it.

The cool thing is that you can now load up courier missions at a loading dock, giving you a non-combat way to earn more cash.

Cool Stuff

Gaw’bless Unity. It took like a half hour to put ragdolls on the soldiers.

I’ve also got some transition improvements, added new features in the overworld and improved the entrance/exit of areas.

We now save out fog of war between maps. (Whew that was annoying).

Quests work better! They’re improving all the time… but in this case I needed to create a quest on the fly when the player had to deliver cargo. This way I can use all the quest features like lists of rewards, player tracking, unique generated descriptions, and hooking into triggers such as arriving at a destination and showing quest markers.

Lame Stuff

Some significant bugs were also dealt with… I had previously been very diligent about properly and safely deleting entities, so that I wasn’t deleting them from a list I was parsing through. Unfortunately I wasn’t doing so when adding entities to the list. Thus C# was complaining at me nonstop, and it was nice to deal with that.

I also had a few remaining Entity pointers that I was saving across frames, which was not safe. I had changed everything over to a unique token method of tracking entities, but I had missed a few things previously. Again, good to get that out of the way and run some stress tests!

Snowmageddon and ‘splosions

Seattle was pretty well snowed in for the last 4-ish days, so I was hoping for a long weekend to work on the game (between back-breaking bouts of shoveling). Welp. I got it, but did I end up with a ton of progress? Well, I got some new points of interest in on the maps, improved the roads, threw exploding cars based on attack angle and its velocity and some other fun things…

Unfortunately, I ended up battling stale pointers and strange issues for most of the time. Ugh. A more robust system that doesn’t poop out exceptions every blue moon is good, but I am sooooooo ready to get back to the fun stuff.

But on the upside, I was able to cap off the weekend fixes with a stress test… 🙂

Tiles, tiles and Tools

I was just thinking about the challenges of generating a city map for Auto Fire and realized that I’ve accomplished a whole lot and haven’t really discussed it in a long while.

City layout workspace

Really early on in development I created some tools to generate block templates that get placed during map generation. This allows me to work with actual crafted sections of map (with variant buildings and other things that can be adjusted after the template is laid down). It’s more or less a requirement for cities since the classic “cave-style” procgen or even dungeon layout techniques don’t work as well as I’d like.

I create template patch objects that have a bunch of data attached to them such as exit points (for cities) as well as a variety of variable bits like spots for random decor and building styles (depending on the generation profile I’m using).

The block data that I save out actually even supports 9-slice scaling, so I can declare borders to be of a fixed size, but the center to be a repeating tile section that can be any size. It’s really useful in some situations like when I want a long crafted section of wall, or a large 4-lane boulevard on a city map.

For cities, however, I actually work mostly in blocks that are 4×4 in size, with street connectors that are 1, 2 or 4-lanes in size. If I want to make a larger block such as 4×8 or 12×16 I can do that as well. Getting the whole system to rotate blocks properly was probably the hardest part (you can see in the build right now that I have a few multi-tile objects that don’t yet collide properly… my work is never done).

I’ve got several workspace maps that I use to create these blocks of content (desert outpost, city, overworld, etc), and it’s a scalable system that could support a whole ton of layouts. When I say “damn I gotta work on content”, making 10x the tile variations and cities with specific flavors are ways that I could take advantage of the systems I’ve created.

Anyway, this approach isn’t particularly new but it works great for my needs… It deserves a more crunchy article dedicated to it, but it’ll have to go on the to-do list for sometime in the future. For now, hope the peek at the approach was a little interesting.

Auto Fire – Version 0.5.7

Some smaller updates to Auto Fire today… But since a good friend put the game through its paces on his stream, I discovered a number of bugs that I wanted to squash but quick:

Watch TANGLEDEEP PASSED LOTCHECK let’s play games from PlayDungeonmans on www.twitch.tv

Visuals/Fluff

  • All menus use standardized buttons and fonts now
  • Music for the garage
  • Screen darkens behind popups, drawing your attention to the UI when necessary
  • Adjusted the vehicle view in the UI to reduce visual noise.

Bugs

  • All cars now have everything socketable and swappable.  Locking equipment slots with fixed components is a feature, but not something I wanted to lay onto players at this early stage.
  • The equip popup now has a functional scrollbar, so you can use whatever you pick up.
  • Fixed hover information getting stuck if you exited the menu from the inventory screen
  • Fixed boss taunt popup issue

As always, it’s free right now, so go check it out on Itch!

Auto Fire Update: v0.5.6

Some new Auto Fire coming in! Check out what’s new:

New Equipment:

  • Mines: When anybody (including you!) moves adjacent to one, it arms and then explodes 1 second later. Be careful!
  • Oil Slick: Lay down a strip of this, and any cars that hit this immediately lose their grip… perfect for tight quarters like the city.
  • Flaming Oil:  Leave behind a trail of flaming death. Sets whatever enters it on fire.
  • Wide Smokescreen: Create a whole volume of smoke, 3 across

Gameplay:

  • The player can choose one of three cars at start with different weapon and equipment loadouts:
    • The Stallion has 3 Junkthrowers, a smokescreen and an oil slick. Good starter vehicle if you’re just getting familiar with the firing arcs
    • The Panther puts 2 Bolt Rifles, one front and back, as well as a minedropper and smokescreen. Its longer range makes for stronger hit, but you’ll need to pay a bit more attention to your facing.
    • The Cricket is small but has a short-range machinegun on its front. It also can spray flaming oil behind it. Good vehicle if you wish to stay mobile.
  • Things can now be set on fire, for continuing DOT. Right now just hooked to the Flaming Oil, although other weapons including the flamer will definitely be dealing this out.
  • There are now two sizes of cities… There’s a medium-sized 64×64 city, and the old huge 100×100 city (which is much rarer). The appearance of the smaller city in the overworld map is different.
  • The default boss is far less overpowered now. Sorry ’bout that!

User Interface:

  • Automap icons for exits and garages
  • Title screen popup allows player to enter name and choose starting vehicle.
  • Health and armor UI over various enemies only appear when that component is damaged… reduces UI spam overall.
  • Took a unifying pass on my amateur-hour HUD, so that everything has a more consistent look. Thanks to my developer friends for the feedback!
  • The vehicle display is now unified with weapons and armor in a single location.
  • Weapon names now pop up on the vehicle display so you are clear what weapon (and what side) you’re firing.
  • Updated icons for some equipment
  • Status icons are larger and more attention-grabbing.

Audio:

  • New sounds for rockets, flamers, and cannons.
  • Stingers and music now doesn’t start until a map is fully loaded.
  • Ram and explosion sounds are replaced with less terrible ones.
  • Vehicle acceleration (and visual effects) only play when speed is actually gained, rather than when you press forward (so it adjusts to “coasting” once you hit max speed).

Visuals:

  • Rockets have new effects and sound
  • Car body shakes when moving at high speed, camera shakes less.
  • Overworld cars now visually swerve and arc like the cars in tactical maps.
  • The borders on terrain maps look a hair better.

Bugs:

  • Fixed some elements of map generations on height-mapped terrain (although there still is a bug in there).
  • The Homestead and Walled City (both of which were ugly temp maps with very little functionality) cannot be entered. Will be replacing them soon. They are marked as not being able to be entered in the overworld.
  • The Boss site in the city (which announced, temporarily and rather cheesily, “Here Comes the Boss”) no longer can be seen. It was intended to be a marker for system use, not player facing.

I’m starting to enhance the equipment now, and am looking forward to new usable items and updating the inventory for its use. The future is bright!

Content Flow

Not a lot of talk coming from me lately, but Auto Fire is coming along as always.  I’ve been trying to bind all these systems I’ve created into some structure that pulls the player through the game more effectively.  Driving around and blowing things up is great, but there’s no goal yet.

I’ve been working on a faction system that allows various groups to occupy each location and sector on the map.  These factions have unique names and a variety of bosses under their employ, and each owns a location.  Various types have different types of bosses and relationships with other factions, etc etc.

On the upside, I was able to mess around with some more procedural generation and come up with boss names and even randomly-generated quotes.

In addition, I realized that I was going to hate playing through progression without having an automap, so I set down to work on that last night……..

It took all of two hours.

Dammit, I should have done this a year ago.

I owe everyone a build, and I’m hoping that a real content flow will warrant that.

Roguelike Celebration 2018

This past weekend I attended the Roguelike Celebration, which I had heard was more of a fan gathering as compared to the developer-focused IRDC…  Still, it’s a pretty cheap flight down to SF so I decided to attend based on the recommendation of friends.  We thought it would be a good place to show off Auto Fire and gather good feedback from people that are dedicated to the genre.

What I wasn’t prepared for was that it was the single best developer’s conference I’ve ever attended, whether that was the focus or not.  Informative, entertaining, comfortable, stylish, professional… It was filled with some legendary creators and you’d be hard pressed to find even a shred of ego anywhere. Nothing but mutual respect and support, wall to wall.

These people were accessible and open.  They were humble and eager to learn themselves.  They shared openly.  Everyone was positive, whether we were discussing a text-based passion project with the classic @ for the player, or a high-falutin’ mass-market-friendly game using roguelike principles.  (Which is good, because I’m aiming slightly for the latter, although I want to stop short of making a “Roguelite”).

There was talk after talk after talk, and most of the presentations were pretty relevant to general game creation beyond Roguelikes.  In particular, Roguelike developers are intensely focused on two things…

The first is (of course) procedural generation.  This includes not just map generation, but encounter/trap creation, procedural storytelling, god/pantheon/myth/food/whatever generation, and so on.  What started as a passion for building noodly dungeon spaces has turned into a community dedicated to crafting entire universes through intensely clever processes.

The second is creating a flexible game architecture that allows for nearly infinite rule expansion.  A trademark of Roguelikes is that the creators just add on feature after feature for years and years, which lead to so many interconnected systems that have to elegantly support (for example) the player getting polymorphed into some new form that has extra arms, which allows you to wield more weapons, or being able to animate any world object including bookcases and walls, then charming them to becoming your faithful pets.

The approach for solving this issue mostly shakes out to a couple core philosophies, but the humility, willingness to learn, and eagerness to share was pretty amazing from these creators…  young or old, aspiring or legendary.

You can find the videos posted here.  Check ’em out.

At the end of the first day, they set us up in GitHub’s phenomenal common area with drinks and food and let whomever set up whatever they were working on and showing it off.  I had a potato-level laptop that barely ran Auto Fire at 2 FPS, but a fantastic soul named Jaxon (whose last name I unfortunately never discovered) was amazingly cool enough to let me use his super-baller laptop for the night.  Jim spectacularly scrounged up a giant TV and we were able to show it at around 100 fps x 55 inches.

It was a blast and tremendously inspiring to he feedback was awesome.  I got some really good comments on the game and came back with a big list of what sorts of things I wanted to take care of.

I am working on the skid model most of all. I just showed it at the Roguelike Celebration conference and got a lot of good feedback. I want players to be keenly aware of how close they are to skidding out, and to be able to better influence their skids once the tires break loose. I think a combination of feedback and control tweaks will help that.

I am eager to push into more content so that I get more of a game loop, but UI and feedback will be visited up front.  I want to get another update out before I head to Wisconsin next week.