Monday, 28 August 2017

Level Exit, Boss Fights, HUD, Statistics, Chaos Engine Reference

Busy month - well they're all busy months, it's just that sometimes more stuff end up working than others.

I coded a level exit system which ends with a boss fight, which is currently a big placeholder cube with a charging attack. The exit itself is shielded and the player has to find and activate a seperate node ("NODE ON!" Chaos Engine was a great game back in the ... er ... early 90s?). This unleashes the level boss, and once defeated the exit's final shield fails, the exit opens and all hell breaks loose whilst the player runs to escape the level.

Deactivated nodes have a padlock item above them and a single shield of falling energy particles (which is an animated texture mesh), whilst the exit can have multiple shields (one for each node and an extra one for the level boss). Exits have a revolving exit sign above them. Currently both nodes nad exits are using the same model but that will change in the future. so that exits look unique. In the first level the node will be next to the exit to teach the player the clear relationship between them. In all future levels the node and exit will be randomly placed away from each other and there may be multiple nodes which require unlocking. Nodes are unlocked in the same way SWAG is bought, stand over them and press BUY button and spend that cash.

After successfully completing the level, the player is shown a progress screen which displays multiple statistics and a big scroll list of all the swag that they have picked up.

Testing the gameplay for an hour and then viewing the statistics it became clear that the scoring system needed some tweaking. Sixty minutes of blasting the hell out of everything and collecting nearly 90 power-ups made the score not seem particularly charitable. To this end, I decided that doing anything would increase the score. Kill enemy score++, pickup cash score++, take damage score++, spend cash score++, etc. I also decided to throw in a score multiplier system. This works like a rage system in fighting games (or at least I "think" it does because I've never been a fan of fighting games). I called it "Momento Mori" because dead enemies boost the bar and it can go through 3 levels of muliplication for kill scores before sticking at level x4 for 30 seconds and multiplies all points from all sources. Using heavy attack boosts Momento Mori the most, light attack less and item kills the least.

Which brings me to changes to the HUD and general player interface. I added icons to all the bars and other player display objects. Cash and Points are animated meshes embedded in the HUD which rotate. Cash is a silver coin  - gold for a king, silver for a gentleman ;), score is a gold star in a ring (cos it looked better than just a star), health is a heart whilst energy is a lightning flash and Player Status is still a placeholder banana. Experience and Leveling was a little more awkward. Initially it was just "XP" though I eventaully settled on a bar chart with a small arrow at the end.

When the player exits the level - or dies, whichever comes first - their remaining cash is transfered into points at a rate of x10. Originally there was a whole load of text explaining this but I replaced that with an icon which hopefully does the same. This now displays for a few seconds before the whole screen fades out and the statistics interface fades in. I may in the future replace the text in the statistics with symbols.

I also declared a major victory in the on-going struggle against console spam. When a trigger was deleted, it would list the objects in it for a final onExit callback - except it didn't have a list anymore because it was being deleted. A quick "if ( gEvalState.thisObject->isProperlyAdded() )" put paid to these needless warnings and lines of red highlighted text in the IDE and console. Hurray!

Sunday, 16 July 2017

Paved With Good Intentions

Puts on gravely voice.

This is road ... to hell.

So, so much for making a development blog every month as I completely forgot during both May and June. Anyhow, here's July's.

SPARKLES! Everything is better with sparkles, and now sparkles are better than ever before! They're now an animated bitmap texture which changes colour and work along a complimentary colour scheme - eg: opposites, red/green, blue/orange, etc

There have also been some serious improvement in AI. Enemies now come in a variety of flavours.
Red are ranged based enemies who shoot projectiles. Light blue are dumb/zombie melee enemies (and thus carry a white stick to denote that they are melee based class) who stalk the player. Purple/magenta are melee class hunters who follow the player. Black are melee class chargers who rush at the player to attack and go flying past if the player can dodge out of their way.

On top of these enemy classes there are also special types of attacks. These are Radioactive Fire who have a green glownig arua and leave a green fire in their path, who do damage on contact; Electricity who can stun the player for a second and thus reduce movement at close range; Retardant which is a yellow falling aura who stun and slow the player for several seconds on contact; and finally Homing missiles, which come in two forms, one which is semi-accurate and can be dodged without too much difficulty and one which is both fast and accurate and very difficult to dodge.

There is also now a game over screen which lists various statistics for the player such as enemies killed, damage absorbed, cash picked up, etc, and also displays a list of swag collected by their icon's. Currently it's only a game over screen for when the player dies but it will also double as an end of level screen once I get level progression coded - and coding level progression is what I am currently working on.

My thoughts on level progression are as follows. Player needs to get to the exit, but the exit requires unlocking from a separate node. The higher the level, the more nodes there will be to unlock. Currently I am in two-minds whether to have the node activated with cash the same way swag collectibles are purchased, or whether to have them activated by having the player stand in the area for a certain amount of time like base/point capturing in an First Person Shooter (like planting the bomb in CoD multiplayer - though I've not played CoD since number 5 WaW, so what are they up to now? CoD 9000?). Either way, when the level exit it unlocked an enemy Boss appears and must be defeated to open the exit. I think that only defeating the end of level boss will be neccessary rather than cleaning out the whole level (like in say, Risk of Rain).

So that's how things are shaping up on the still untitled Swag 'Em Up!

Sunday, 30 April 2017

Power-Up Death March Volume 9000: The Death Marchening

Whoopsie, almost missed the monthly devblog!

So I am still hammering away at the final few power-ups. They are all much more complicated in models and animations and have been taking longer than expected ... which should not really be unexpected as everything always takes longer than expected which is thus ... er ... expected?

Everything looks better with sparkles! Desu!

Time Stop, special defensive item. When activated it stops all enemies from attacking the player for several seconds. There is also a joke about Japan in there. ;)

The original version of the animation had the watch spinning around. However this made it difficult to see the actual movement of the watch needle and the spinning of the internal gears. In the second version I took the spinning out and made the whole object a BBZ, that is a billboard which always faces towards the camera whilst also orientating vertically (the Z axis).

One thing which I discovered was that mesh models of the explosion class object do not use LOD, so the highest level of detail always shows.

And here it is in action against the AI enemy red cubes.

Still more complicated modeling and animations to do for further power-ups before I can get started on actual world building and level creation. Death march onwards ho!