Illusions (Part 1)

I have now implemented the ability to cast Illusions and the usage of a permanant disbelieve spell for human players. I still need to add AI support for casting disbelieve and illusions.

After some thought I have decided on the current method for selecting illusions. If in the future I have enough time I will include other user interface options..

When Illusions are on as a game option, you will find that moving over a creature spell will now show the words in the panel at the bottom: “cast as illusion” if over the top-half of the spell icon, or “cast as real” if over the bottom-half. Although a bit unintuitive to people new to Chaos this does help eliminate cheating as if other people are not looking at the screen then they have no clues as to what spell is cast.

I’ve played many games of Chaos Funk with friends and I know that if I put in the same pop-up box (yes, cancel, no) option then the friends who are looking away from the screen would be given a clue by the 2 mouse clicks as to the fact a player is casting a creature spell. Unlike in Funk there is virtually no need to press a mouse button prior to clicking on a spell icon. So 2 mouse clicks would be a give away compared to the normal 1 click.. Using the left and right mouse buttons seems an obvious answer, but on some mice these make a different clicking sound, again making the fact the player wants to cast an illusion painfully obvious. Anything that the player has to do extra for a creature spell (pressing a key, extra mouse clicks, etc..) is too much of a clue to sneaky friends!

At the weekend I will try to find time to add AI use of illusions and disbelieve. But, no promises! 🙂

Back with some more bug fixes

I’ve got a temp job lined up for Monday, so I can relax a little bit..

I’ve been fixing a few bugs:

  • Dismounting bug now fixed.
  • Mouse button is now checked to see if it’s being held down instead of just clicked.
  • Added check to skip over Independent movement turn if there are no generators or Independent creatures on the board.
  • Made it so pressing Escape exits through a menu gracefully, and also exits the game from the title screen.
  • Added “Magic Resistance Attack On Wizard” options – No Effect, Destroy Strongest Creature, Destroy all wizard creatures. This now works ok for human wizards, but needs more AI testing to make sure AI takes proper advantage..

Wizard Selection Screen

I now have a basic, but effective, Wizard Selection Screen in place..

Chaos Groove Screenshot

This uses the new config files to read in the wizard_options.ini file and use the text information held in there for the menus and to directly set up the wizards. Unlike previous menu systems I’ve written, the information is not transfered into seperate menu variables, but parsed directly from the text each frame. This might be too slow in a fast paced arcade game when used ingame, but for Chaos it’s not going to be a problem. It will also make it easier to code in new menu options and process them as well. In addition, the variables in the text can be used to deal with how the menu options are shown on the screen to some extent.

Unfortunately, my strengths do not lie in clean, modular, reusable abstract code like menu programming. So, the code is a bit hackerish I’m afraid, but is mostly data-driven and is effective. 😉

The next demo release will let you pick a combination of wizards (human, computer or off), as in Chaos Funk.

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..

Hard work!

I’m knackered.. I’ve been working on the 2nd demo this weekend and it’s took longer than I expected to try to get the AI to use the spells (and move) more intelligently. Also, I had a few bugs I had to track down and all together I’ve worked a bit too much.

It’s safe to say that if it hadn’t been raining nearly non-stop for the last 2 days I would have not got so much done..

There are still some bits I haven’t been able to get done, but for today I’m going to have a proper break. The demo is now done and it’s just stopped raining (finally!)

See my next post for the demo..

AI Work (and a few other bits)

I’ve been working hard on making the AI work properly with the new spells like subversion, magic bolt, etc..

This has involved me fixing a few AI bugs as well as rewriting a few parts to deal with the new non-creature spells. I’m also trying to work on the movement side for the wizards and tweak a few things to make the AI protect the wizard much more. I need to do all this because the spells weren’t being used properly by the AI previously.

Oh, I’ve fixed the highlighting error reported previously, now creature’s owners are highlighted correctly.

I hope to get a demo out tomorrow (fingers crossed!)

Pathfinding test

Chaos Groove Pathfinding test Screenshot

This is just a test of the pathfinding under extreme conditions to make sure it all works properly. 🙂

I will also use this pathfinding for game options which throw in a user definable amount of walls and destructable objects on the board to make sure no wizard is trapped in a corner. 😉