Friday, 29 December 2017

Tests, Checks And Gameplay Balancing

It's that time of year again folks, when you feel like this ...

And end up looking like this ...

Of course some of us are still working hard on "muh gaem dev" - and this month it's been mostly playtesting to try and create game balance, and hunt down a few elusive bugs. And when I say "elusive", I of course mean badly/drunk coded.

Like the Rocketrix offensive smart bomb attack. It picks the most dangerous group of enemies so it can do the most damage, swoops in and ... blows the player to smithereens. Yep, pretty sure that is not supposed to happen. Turns out I was calling the attack from the enemy target instead of through the player. Simple mistake by passing the opposite variable, possibly explained by the following image:

One thing that extended playtesting has shown is that stacking powerups - repeatedly collecting the same swag - does not happen as often as I thought it would. Even with 15+ items available each level, there are a total of 108 seperate bonuses (including upgrades to weapon drones). Whilst this does not really effect offensive or defensive events (which are added to an array list for chance of activation during attacss/damage), it does mean that permanent bonuses (health, speed, energy, etc) to attributes do not happen as often as originally planned, and individual bonuses confer too little benefit to the player.

Boosting the effect of permanent bonuses is the obvious way to balance this unforeseen lack of reward. For instance increases to player health are now percentage driven rather than a stock value, and speed is now hiked much higher as the original gain was meaningless beyond the first few game levels.

Another event that did not quite live up to it's predictions is the "Momento Mori". This is a sort of "rage gauge" which fills each time the player kills an enemy, but reduces each second. Enemies killed by heavy attacks fill the gauge faster than light attacks, and all other attacks (drones, swag events, etc) even less. The bar can fill multiple times, changing colour and conferring a multiplication bonus to the player's scoring.

"Gore Gauge" - Orange Bar and x3 Text, top right

Originally the player would fill the "rage gauge/kill bar" three times - now forever to be known as the "Gore Gauge" ;) - at which point the player would be healed and for the next thirty seconds the Gauge would stick at 4, multiplying the player's scoring.

To make this more of an actual event for the player to aim for, I increased the fill trigger level to 4, at which point it leaps to score multiplication x8 (4 = death, 8 = wealth), the player is healed 100% and for the next 30 seconds whilst the Momento Mori lasts is also invulnerable to all damage, which is a really big help in crowded and frantic later game levels.

Momento Mori event triggered. Red bar and x8 text top right (GUI still needs some work)

The GUI incorporating the Gore Gauge needs a bit more work, such as an icon to show what it represents like the XP/LevelUp, health and energy bars top left (a small skull would probably be a good fit here).

Momento Mori in action from ~02:02. Gore Gauge starts at x3.

Of course, what was missing from the above video is an indicator for the player that the Momento Mori event is still on-going and not yet ended. After a quick bit of modeling, texuting and scripting, I created what I felt would be a suitable aura type object to mount on the player to signify that the event was active.

Behold, one visual indicator, brought to you in the format of GIF

There have also been numerous other bugfixes and tweaking of code and gameplay - it's not all been eat, drink and be merry this Decemeber. ;)

So, next up is more gameplay balancing, but I am at the stage of development that this requires creating the actual data for the enemies which the player will be encountering in the game worlds, and their unique attributes and characteristics for attack and movement. This also requires drawing up a list of boss types rather than the singular one which I have at the moment.

Roll on 2018 ...

Tuesday, 28 November 2017

Test Tweak Twiddle

With a basic level blocked out, the past month has been mostly about testing, tweaking and twiddling with gameplay. This meant a lot of playtesting followed by minor adjustments to scripts and code, as well as the usual "let's streamline everything" followed by the equally usual "oh god everything is broken now", followed by fixing it. None of this makes for particularly interesting pictures of videos.

One thing which is "screenshotable" is the new level based statistics screen which now pops up at the end of the level. Previously at the end of each level a continued game progress screen would display, giving various statistics on the player's progress that run. Now a minor version detailing statistics from the previously completed level displays with information and percentages relating to player activity.

From the top; time taken to complete level (or die a horrible death, whichever comes sooner), score for that level, swag parcels opened, cash looted, enemies killed, overall percentage for that level/world and finally the pre-existing, remaining cash on exit converted to points. Once art and animation are the priority "something interesting" will fill the left side of the screen too - probably the players character with a celebratory animation corresponding to level completedness.

This level statistic interface then fades into the standard game progress screen which gives a more indepth view of statistics which the player has achieved.

I had also started to list the various types of enemy and player characters and abilities which I want to feature in the game. Variation is the nemesis of repetition and thus a wide assortment of enemies and capabilities is something to strive for. Currently in the way of hostile attacks I have a simple melee enemy, a charging enemy and projectile shooting one. These are certainly the main themes for the opposition which can feature good variations. On top of this I have already coded "elite" enemies who have special abilities ranging from contact based damage to temporarily slowing the player for a few seconds. These elites carry a certain colour and aura to distinguish themselves to the player as extra inhospitable. They also carry more hit points.

Hit points carry cash which is used to open swag parcels for the player to gain powerups and useable items. Each level the cost of powerups increase, but as the player becomes more powerful and enemies more numerous the amount of lootable coins also increased rather too fast. I have had to reduce the amount of cash enemies drop in later levels as a result of this.

The entire system for usable items has had an overhaul. Previously the player could collect items and be able to use the current highlighted one on screen. Every three seconds thecurrently  sclected item would advance to the next. This became incredibly infuriating when in the throes of combat to try and time using the right item at the best time and often led to the wrong item being used. This has now changed to allow the player to manually cycle through the list of useable items with a simple button press to choose which will be active.

So there we have it. I am continuing to list enemy types, and their abilities in prepartion of when they become actual models. Until then, huzzah for placeholder cubes!

Tuesday, 31 October 2017

Mulit-Level Long Play Test

 Blast monsters, grab loot, buy swag powerups, unlock nodes, beat boss, run to exit. Rinse and repeat for next level.

Finally I actually got around to blocking out some level design. Nothing fancy, just a plan of walls and obstacles for the player to manoeuvre around (apparently that's maneuver for Americans).

It didn't take long before I realized that the whole thing was way too big and needed to be smaller. But that wasn't the only issue. As the game time increases in a level, so does the difficulty. And as the levels increase, the game gets harder. Obviously this is a tried and tested gaming concept, but I was finding that the difficulty curve ramped up very sharply. A little rejigging later and ... it was far too easy. Minor adjustment and too difficult again. Balancing this difficulty curve has taken up the vast amount of time this month.

It turned out that a lot of this difficulty stemmed from the player's powerups not reinitiating in later levels. I had made various changes to the powerup system and how it gets stored for reference and not all of it carried across correctly, and in one case I found that the variable being stored had received a name change at the other end which was no longer being referenced.

Going through the various powerups I fixed all the broken paths and references, and generally tweaked the strengths and effects. Gradius style "option" followers, or weapon satellites which follow the player and increase firepower were toned down in the amount of damage they did. "Static Heal" powerup was scrapped because the player never has chance to stop long enough to increase healing without getting swarmed by enemies. Enemies and their spawning routines were tweaked to give a more gradual rise in challenge but also to watch out for the player wiping the floor with them over a longer period of gameplay.

Each level has an exit, and each exit requires unlocking via activating nodes with later levels having multiply nodes to unlock. To make sure that the player understands this concept there are visual hints in the bottom right of the screen and the in the first level the node is next to the exit. Once all nodes are unlocked the level boss spawns (currently just a large cube with an aggressive charge attack) and once the boss has been defeated the exit opens. To prevent the player from lingering in the level to "clean up" cash and remaining swag I decided to stop the enemy from dropping loot coins once the boss has been defeated. Difficulty also takes a temporary increase both whilst the boss is released and also when they have been defeated to encourage the player to head for the open exit and progress the game. 

In the end it all seems to work rather well, and I am pleased with the result. Here's nearly an hour of playtesting the system. I also found an error at the end of it, as not statistical information was being passed to the end of level screen when the player was killed and the game was over - now fixed.

So, next up is adding a few more statistics to the end of level screen such as percentage of kills, cash, swag, etc that the player has gained that level. After this it will time to get on to actually designing art for the level, and eventually even the characters with a greater variation of enemies, bosses and enemy attacks. But hey, one thing at a time! ;)