Back

Some time in Jan or Feb 2002

I've decided to do a clone of Chaos (the old speccy game) for the Game Boy Advance. There are loads of clones of it about, but none for the handheld. It'll be a good learning experience. I just hope no one beats me to it! I have seen a few bits of news on c.s.s about various java/PC clones, so there is still interest in the game. You can play Chaos already on the GBA using Foon - but the keys are a nightmare. I plan to give my clone a nice "Nintendo" feel.

I have written a prototype from scratch in Java, with a screen the same size as the GBA javachaos2 javachaos

It only gets as far as the spell select screen, but it's a start. Porting this should be no problem, and then I can take it from there...

Feb 2002

After porting the java "set up game" screens, I started on the main game. Using tile mode and sprites meant it was easyish to get an arena drawn up, and the set up screens meant I could quickly add a variable number of wizards to the arena too. From here it started to take shape. Just had to code the spells, AI, creature attack routines, magic wood, and so on and so on...

Click here to see the hap hazard way this is being made

Wednesday, 20 March 2002

Progress continues on "Chaos Advance", slowly. Not done a thing this weekend after my parents came to visit. Though before they arrived, I tested the code written so far on hardware and fixed some timing bugs that this revealed. Boycott Advance doesn't seem to match with hardware for dovoto's "Wait" routine :-/ I posted a request on the pern project boards to see if anyone knew why... for the moment I just change 1 line depending on if I am compiling for hardware or emulator. Anyway, the most recently done stuff is:

Creature manager to remove gone / dead creatures from sprites list. This reallocates all sprite IDs and creature IDs to match the shrunk down lists. This way, dead stuff doesn't clog up the system. Unfortunately, my system has a bug already - only 1 dead creature can be on a square at a time. I am not too fussed though, as the original was the same. In fact, the original had a worse bug with disbelieving things over dead bodies, the body would not be there afterwards.

Movement on diagonals goes 1-2-1-2. Disbelieve and illusionary spells are implemented. Castles and trees are done, entering castles and woods is possible. The magic wood needs to be cast manually at the moment, but it looks pretty. Spell cast animations, bolt animations (currently nicked from the speccy version, though some I have redrawn. Badly.) All the animation frames for the creatures are done, as well as the dead bodies. The animation uses a timer interrupt for that 4 frame per second movement we all know and love. It works better than I expected. Engaged to enemy - can't move initially if engaged to an enemy, allow attacks on final movement if creature is next to you, attack on final move, checks every move, so that you can be engaged just passing an enemy. Shadow Wood can attack (though if it wins, it moves too. heh. need to fix that :) The CPU is hard coded to always cast illusions too... Still lots to do though. Several fixes are still needed to the stuff done, not to mention that the AI is not implemented at all. And THAT will be the hard part :-(

Thursday, 21 March 2002

Added gooey blob and magic fire. They work OK, but I am not sure about the spreading rate. Seems a bit off. Fire kills things. It also spreads and fizzles out. Go fire!

Monday, 1 April 2002

Another update on my progress. Gooey blob and magic fire are pretty much finished. They spread, consume things, hide creatures, etc It all seems to work well, though they did slow things down a bit when they were a lot on screen. Shadow Wood trees can no longer move after their attacks :) (However, Magic Wood can attack creatures! (they never win though :) ) Can not attack undead creatures with normal ones. New spells from magic woods. I finally sorted most of the player 1 hard coding - it ALWAYS went to player 1 spell select screen and move round, regardless of if he was dead or not. The work probably needs testing, especially the case when player 1 is not human controlled, though it seems to be ok now for the rest of the cases. Vengeance, Justice, Decree, etc added. Wall and associated checking added.

My idea for the CPU is to have it move the cursor round to the square it wants, then call the human "A button pressed" API - that should mean I won't have to copy and paste big chunks of game logic. I'll still have to do some of that though, checks for how many spells remain and stuff, plus the actual tactics are going to be a headache...

Spells still left to code are Teleport, Turmoil and Shadow Form. Teleport is a "new" one, it will transport a selected creature/wizard to a random square, or teleport a random creature/wizard to a selected empty square.

Tuesday, 2 April 2002

Been hammering out the last few spells, only Turmoil remains to do. Shadow Form is done and tested, although I have not done the graphics for it yet. Those will go in when I get round to doing the wizard animations.

The auto tree casting spell (Magic Wood) now works just like in the original (i.e. places a tree right in your only free line of sight first!) I got Teleport done too, but it seems a bit powerful. It works as I wanted, but it just seems too useful as you can cast it on any creature on the board or any square. I think I will tone down the range (to 8 or even 6) and add a line of sight check too. That should balance out its power. If that isn't enough I'll make its casting chance lower.

Magic wood and Wall are no longer selectable. This fixes the UI glitch I had when you could attack with magic trees or have the movement cursor available for a wall.

I am tempted to redo the display message routine. I have an idea on how I can do it and gain an extra row for the board. It'll mean a fair few rewrites and removing some hard coding, but it will mean a bigger arena (my only real "worse than the original" thing at the moment is that the arena is a row smaller). While I'm at it, I will make the messages coloured, I think.

Tuesday, 9 April 2002

Had a nasty shock yesterday when I tested on hardware again. There seemed to be so many bugs! Luckily, they all turned out to be reproducible in the emulator and fairly trivial to solve (stuff like not resetting an attribute after clearing it in another part of the program, etc) So they should be all ironed out now, fingers crossed!

The other thing I have been up to is writing the AI routines. These are alternatively great fun to do, and a pain. I have written some basic ideas on what to do for each CPU level, which are observations from the Speccy game, some ideas of my own and some ideas from a google groups search. One idea I am using is to assign each square a "danger level" for the wizard. It is slightly awkward to explain, but basically, each creature has a value assigned to it which is its "danger level". This level is highest at the creature location and decreases with distance. A vampire has a higher number than a bat, for example. when monsters are close, their danger levels combine to form a sort of "danger landscape".. the AI uses this to move to the place where it is least dangerous.

Wednesday 10 April 2002

One thing I didn't mention yesterday was I added the player graphics too, as well as the arena changes I mentioned. So now you can choose to be one of 8 wizards and change their colour too. Then they start in a 15 by 10 arena... The spell screen is now coloured too and looks better.

Wednesday 17 April 2002

I was nearly at the point of giving up the other day. I discovered that my method of using sprites for all the creatures, etc, was flawed, as it meant that only 128 could ever be on screen. Together with the hardcoding of 8 wizards and the cursor, this meant that only 119 creatures could exist in the world.

I decided to test this theory and created a load of gooey blobs. Lo and behold, when the magic figure struck, the game broke big time, with graphics messed up everywhere. I wasn't sure what to do, as this was a fairly major bug. In the end, I sat down and rewrote the graphics to use tiles, and sprites for the cursor and certain other moving things. This wasn't as difficult as I thought, though it was a pain calculating the position in video memory for all the graphics. In the end though it works a lot better and has fewer anomalies than the old approach.

As for the actual gameplay, well... I have finished all the player spells and movement routines (apart from Turmoil, natch) so I am full steam ahead on the AI. All the AI spell casting is done, apart from a few tweaks, and the movement is 80% there too. Here is a list of all the stuff done so far:

Stuff I still haven't done includes (roughly in the order I am going to do them):

So there is still a fair bit left to do, but it is getting there.

Monday 22 April 2002

Latest WIP - Added all the info to the info screen (wizard has Bow, Knife etc). Also, now it's possible to view the board from the spell select screen, as I've finally added an "examine spell, select spell, examine board, continue game" screen. Currently it shows which spell you have chosen for the coming round too. The rest of the stuff done is minorish bug fixes, and tidying stuff up. Oh and I have added Turmoil. It doesn't crash the game, but it does have a weird bug if you run it several times in a row - after an opponent wizard is Turmoiled to a wood, the player wizard gfx (or any others I guess) start being left on the arena. Apart from that it works well (a bit too well, I will have to animate it a bit to slow it down)

The next big thing is to sort out the AI. At the moment it is fairly crap and often crashes the game by trying to do stuff that ain't allowed. More checking needed, which means play testing various cases. Gah. Maybe I need to release a beta...

Friday 26 April 2002

Finally added some sound. See the "how this is being done" page for more details It is just some music on the intro page, but it sounds dead impressive. Well, I thought so. My girlfriend said it "wasn't as good as Mario". Hmph. Tested on hardware too and it works on that, though a couple of other bugs were present. Mostly to do with the input - a strange "bug" on a real GBA is that after pressing then releasing a button, it fills the key register a moment after, even though no key is down. So this bit of code will "nearly always" enter the if after the loop:

while (keypressed) {} // loop until they let go
if (keypressed) {
// !! they have *JUST* let go of the button though...
}

This is counter intuative, as it shouldn't be possible to unpress the button and press it again in the time it takes to finish the loop and go to the if... Well, I have done the button bouncing another way now, which seems to work on emulators, so I'll check it later using the Flash Advance.

Saturday 4 May 2002

Added some in game sound effects and started sorting out the music bugs. When a tune plays, there is some horrible distortion at the end of the track, and it doesn't loop. I've fixed it so it runs as it should on emulators, but sadly it still is messed up on hardware :(

The in game sfx are horrible bleeps and screeches. So it sounds perfect! There are some more weird bugs on hardware, where sound stops playing mysteriously, then returns for the next round. I hate bugs like that. And on the real thing they are impossible to track down...

The last thing I've done is added a decent-ish winners screen and changed the splash screen to a mock up of the original game's loading screen. Rather than a cartoon snake, like the original, I have a photo of one looking mean. And the title page letters are done using that old favourite - Word Art! I hope Microsoft aren't reading.

Next on my list of things to do is to finish off the AI. At the moment it plays a decent game, but it could do with some improving. Especially in the area of "attacking Gooey Blob before a wizard" and "Not casting Disbelieve at a Golden Dragon when the Chaos level is at 12 stars." And the cpu is VERY annoying when it has a Shadow Forest - it tries attacking with every tree, regardless of if anyone is in range. Grr.

Monday 6 May 2002

New stuff added recently: Highlighting creatures, some Goldeneye style "worst player" statistics, more bug fixes. Still left to do: Fix sound problems on hardware, add the alternate wizard gfx for magic knife, shield, bow, wings and shadow form, add the option to change backgound colour, randomise the startingstats a bit, tidy up the AI, add the original bugs in (as an option) and fix some of the new ones.

Friday 10 May 2002

Added the wizard animations for their special ability spells. This caused a major bug though, one that I was dreading... due to my sloppy code, I'd run out of stack memory. At least, I imagine that is what was happening, as the game developed some very odd random bugs... anyway, I've gone through the code and tidied up a lot of sloppy mistakes (using global variables that were larger than necessary, using entire chars where changing a bit flag would do, local variables that were longs when chars would do etc) I calculate that I've saved a couple of Kb, which should be plenty to stop the stack from being overwritten again. Some testing proves that the random bugs have gone, and there are no nasty side effects so far...

As well as the overhaul, I fixed more glitchy bugs. The list of things to do is shrinking...

Sunday 12 May 2002

Not a lot more done in real terms, but I fixed something that was working ok before. Added the spell animation, finally, but only for creature spells so far. Added a nicer font too, so now it is more readable when there is a creature or wizard underneath the message text. Also made a nice blue background for the menus I couldn't do this before as the text was unreadable on anything but black. Looks a lot better, even if I do say so myself...

Saturday 18 May 2002

Just about everything is finished, I'm going to put a first release up on my website. There are still a couple of annoying problems I'd like to fix, but I think that the game is playable enough now to let some other folk test it.

Wednesday 22 May 2002

I have added the undead wizards "bug" and made the computer cast Disbelieve a lot less often (or rather, not cast it at the same real King Cobra 10 times in a row...) Also, I've tidied up the code a bit so that the final binary is smaller. I think I'll do a version without the music too, so the final .gba file will be a LOT smaller.

Friday 24 May 2002

The "without music" version is far far smaller, I don't know what I was thinking... Anyway, I have added the final peice of the AI routine, the horse riding, and so everything from my to do list is finished. The sound fx are still awful, but I didn't enjoy doing that part at all. As it's on the Game Boy, you'll save batteries by turning the volume off anyway ;)

Hosted by www.Geocities.ws

1