Nasty bugs

The last demo release included a nasty bug in there which when playing with a manoeuvre check at the start of a turn meant flying creatures could not be moved. After being brought to my attention, I fixed it quickly and released only to find the fix caused AI computer player lockups and incomplete land based movement.

After looking at the original code and the fix I saw the silly mistake I made, and have now fixed the original bug in a new (and better) way. I’ve tested this and so far I can move the flying creatures ok, and I see no more AI lockups after testing through many full AI games (on a fast speed).

In fixing this, I also found a rare AI bug with the new engaged ‘rule’ which meant that occasionally a creature could attack another, fail to kill it, but still be engaged. This confused the AI totally as it knew it had moved and attacked, so kept trying to do something.. I also added another check for the Escape key in this movement loop just in case this happens again. But, so far I can’t find another AI lockup after testing the new fixes.

Next time I should test properly rather than trying to be helpful and fix too quickly. 🙂

The bug fixed version is available from the normal download link…

Chaos Groove Demo no. 6

The latest version is now available to download! Finally you can cast illusions and disbelieve.. 🙂

The AI may still need some tweaking as to how often it casts illusions and disbelieve, but it seems to work alright at the moment.

This new demo also fixes a bug with creatures ‘raised from the dead’ sometimes not being able to move in the following movement phase. It also adds a World Balance text to show how chaotic or lawful the world is (although there is not really anywhere ideal to display it). The game also now tries to give cpu time back to the OS which makes it friendlier with other programs running as well as when running on laptops..

Oh, and I fixed a few extra spaces in some of the wizard names and tweaked a few things.

I’m going to work on the sound system next. 🙂

http://www.reflectedgames.com/ChaosGroove_Demo.zip

Illusions (Part 2)

I now seem to have got the AI players to use Disbelieve and cast creatures as illusions themselves. I had to rewrite some of the AI select spell code to look at more risky spells (as illusions) than they would normally consider. I also made the computer not try to disbelieve creatures that were raised from the dead. However, I still need to playtest the AI & illusion code to make sure this is not unbalanced..

I fixed a bug with raise from the dead not setting the Undead flag.

I also fixed a bug where a creature like a horse could only move one square around a patch of magic fire or gooey blob because it thought it would get engaged.

Based on past experience, these bug fixes may have broken something else, so keep an eye out for any new errors in the next release! 😉

I added a better (and thicker) green and red outline around bonus spells and spells with no space to cast respectively.

If all goes well I will have a new release for you tomorrow.. 🙂

Chaos Groove Demo no. 3

Demo no. 3 is now available!

Screenshot 18 for Chaos Groove

Chaos Groove Demo

Some more last minute bugs delayed things and I’m sure there are still some nasty ones in there. But I need to release today.. 😉 Just accept that it will have some issues. 🙂

Ok, all the spells are now in there and the AI also uses them all and is in general better. You can now go into magic castles and trees created by an enemy wizard, and this seems to be working ok, but I’ve not had too much time to test.

There are a few more effects in there as well, which help make things look a bit better, although the time between effects and general logic may now be a bit too fast. After testing a lot, you tend to speed things up rather than have events happen slowly. 😛

Still missing are proper engaged to enemy option at the start of a creature’s movement, undead can’t be attacked option and illusions & the disbelieve spell.

Hope there are no serious problems and you enjoy the new demo!

Growths..

Today I have added Magic Fire and Gooey Blob:

chaosgroove17.png

Like the original, Gooey Blob will spread and cover pieces that don’t belong to it’s owner. They can also be rescued by killing the covering blob. Unlike Gooey Blob, Magic Fire will try to attack a piece, but will kill the piece completely if it wins. The growth routine is pretty simple and is a direct translation from the original code after being disassembled by a few people. I think the ‘grow and make the original piece die’ chance is not quite the same, but the rest of it is identical.

As you can see in the screenshot, I’ve added a quick blur glow to the fire gfx, which is a bit of a placeholder for the moment.

The growth options are all held in the piece data text files, so pieces can have a different chance of growing, dying, attacking, etc.. They can also grow a piece that is not the same as the current one, so for example you could have a bees nest which has a chance of creating a bee creature. 🙂

Most of the time today was spent on getting the AI to use the spells properly and to react to them on the board. Because they can grow the AI needs to be coded to realise that standing next to a growing piece is not a good idea! At the same time a wizard shouldn’t be so scared of blobs more than a square away that they would run away in a panic. They need to know that they cannot move and attack them. That is what I tried to today, even though it’s a bit tricky. I had to do a few changes (without hardcoding for specific spells), to make the AI treat them properly. It still needs some work, but that’s for another day.

Like much of Chaos, one little thing here can have unforeseen consequences later on due to the way things interact. It certainly takes longer than you think for getting the logic right!

I’ve also fixed a few display user interface bugs with text not being removed at the start of a new turn and with removing highlighting in a computers turn and messing up his movement. I’ve still got a few issues to fix with wizards mounting a piece with a magic bow and not shooting, and not doing anything in a magic tree. But for today the Magic Fire and Gooey Blob are pretty much done. Mutation and Teleport next I think..

Shadow Form

I’ve now put in the Shadow Form spell and ability. There is a little bit of confusion about exactly what effects this gives you in the original game, and I think the Atari ST version stopped you getting engaged as well.

I’ve made this version of Shadow Form give you +3 defence (in addition to shield, armour), at least +3 for movement, and not affect your chance of being engaged. Like the original it is lost if you attack or shoot anything. Although if you are mounted, the piece you are riding on can still attack without it being lost.

The AI wizards will now cast Shadow Form and not attack or shoot if they have it. I know in some situations it is perhaps the better option to try to kill a weak wizard and lose the Shadow Form, but that gets really complicated for an AI to try to work out.. 😉

In the process of making the AI wizards do this, I’ve also improved their movement choices a bit. Although, I still need to do a bit of work on this.

For now the gfx flash in and out in a retro style. I’ll probably put in an option for a smoother fade in and out effect.. It’s tricky trying to cater for those who like the original style and those who want a more modern look. Something I’m struggling with so far. My own inclination is towards the modern effects and features, but I do want this to be the definitive version of Chaos, hence making it also attractive to classic players to some extent.

Shiny Weapons

Here you can see a Computer controlled wizard casting Dark Power on an enemy Golden Dragon..

Screenshot for Chaos Groove, with magic attacks and powered up wizards

Notice also the wizards running about with spangly, shiny, super-weapons! Yes, I have put in the code and the new gfx to let you cast Magic Shield, Magic Armour, Magic Knife, Magic Sword, Magic Wings & Magic Bow. 🙂

I had to add a bit more shading detail to Magic Armour as it was looking too flat otherwise, and it is one of my favourite gfx in Chaos. I would love to do all the gfx with this amount of detail or more, but I’m afraid I’m not a good enough artist to do on the creatures..

To implement the new spells.. first of all I added a spell option to enable a spell to change a target piece’s gfx to another one in the list of pieces available. This lets me change the wizard gfx, but it could also be used to disguise a strong piece with a weaker creature’s image (thinking of evil spells here!). With this in place I was able to add more spell options to change individual stats like combat, defence, movement, etc.. Like the originals, the combat and defence options refer back to the original pieces values to stop you casting two magic knifes and getting a +4 combat advantage.

All these wizard spells also let the wizard attack undeads, although that side of the code in terms of creature attacking is not in there yet. I’ve made the magic bow arrow gfx appear white with a slight glow to separate it from the normal arrows.

The AI can now also use these new wizard spells, although I might have to tweak the values used after analysing more games. At the moment though, the AI will be more likely to cast spells like shield, armour, wings or bow if it is under threat. Similarly, it is more likely to cast knife, sword, wings or bow if feeling strong. I think this does reflect how human players would play and hopefully will feel more natural. The AI will also not cast a spell like knife when it already has sword.. Oh, and having the same spell more than once will make it more likely to be cast (more chance of getting one to work).

I had to do a bit of work to get the AI wizards to shoot properly when moving around, mounting and firing, or standing still and firing from the ground or when riding a creature. This part of the code wasn’t there at all before, and it took a while, but it seems to be working ok. Now, they are just totally evil with their new weapons.

What else? Oh, I’ve made the wizards be more likely to ride pieces when under threat rather than trying to hide in the open. I think I’ve fixed the spell information bug Kreezer mentioned and I fixed a couple of other rare bugs in there too.