Development Diary - Booty

18th August
Finished my map (just before someone uploaded one to WOS!) thanks to Gerard Sweeney and his helpful pokes.
Have drawn a few test images for the backgrounds and pirates to see how things come together. Nothing set in concrete yet, so nothing to show.

I am doing small bits and bats in between finishing off Arcadia.

17th September 2002
Decided on Booty as my next project. This will be more complex than Arcadia, but should hopefully be easier than Scumball. (famous last words)
I played the game for a while and got the logic worked out in my mind.
I then grabbed a few background images from the game and gave them a real makeover. I am very pleased with the look of the backgrounds, much better!
I began to add them to the game and as more and more of them went in, more and more the game looked good. Its very early in the project yet, so don’t hold your breath.

Took ages to get the main character (Jim?) converted over. There are eight frames of animation for his walking, that’s without climbing and falling! I may go back and re-visit him because I’m not 100% happy with the shading.
I now have a nicely animated Jim, ready for the game.
Plonked him in to see how he looked. He kind of walks about in mid air without screen or sprite collision. It was just a test to see how he looked against the backgrounds.
A very long way to go yet…

15th October 2002

Added more stuff to the game like the two types of door and keys etc. The only thing missing from the first room are the boxes.
Wait a minute there…. This is the FIRST room and there are loads more…
Began to check then map out and follow the doors to different rooms. Soon had a few rooms to play with now, and it shouldn’t be too difficult to add extra rooms based on the first one.
Added a few pirates – they are cool ;-)

Decided to try a few things out now that most of the images are in. First off – the horizontal moving platforms…Mmm bit of trouble here… Jim keep falling off them !
Played about a bit and tried something else – Jim fell off again !
Another go… Jim stuck to the bottom… bugger!
Had a drink and went to bed very annoyed.

21st October 2002
Had another go at the moving platforms.
This time had better luck, but Jim still has trouble staying on them. you have to prod the movement keys repeatedly so he stays put. Not very good and not like the original – but acceptable if nothing else can be found.
Spent too long on this already… not happy….went to bed.

...time passes
Re-visited the platforms… nearly there now so I’m happy again.
Next challenge… vertical moving platforms.
Oh no….
Going to bed !

...more time passes
Try again… Jim refuses to stay there… bloody idiot !
Must have tried 10 different ways to get him to stay there but he refuses. Also now, his animation has become stuttered and sometimes he moonwalks across the screen argh!!!!

Given up on the moving platforms for now… will try something else and come back to them later…

Here's a piccy of level one. (reduced of course)

30th October 2002
Did some thinking…. My current development tools are causing no end of headaches and grief. No sooner have I managed to conquer one problem, and another one arrives on the scene to taunt me yet again.
So, with a lot of thinking I came to the conclusion that I will have to try and use something else !

Downloaded Blitz Basic and had a play about. Its similar to Amos – something I used a lot way back, so I feel at home with it.
Tried a few things out… gradually getting the hang of it. My initial tests were moving platforms and within about 2 hours I hade various coloured blocks moving about on screen and another coloured block going up and down and side to side on them. Brilliant.

More testing with Blitz…
Got some test backgrounds drawn up and an animated sprite of Jim moving about.
Then went for a complex map thing that lets me define the room in data blocks… seemed to work just like Amos.. Great!
Next up the images. All the old stuff will have to be re-boxed and for simplicity I will make them all fit into 32 x 32 box (apart from Jim and a few other sprites). Loaded up PSP and managed to get the basic backgrounds done, loaded into the game and displaying very nicely. Phew !
I would show you a picture, but it looks just like the one I posted earlier !
Time passes....
Experimented with getting the moving platforms into the existing half-built game engine….
Mmmmm still hard to get right but at least I have more flexibility with Blitz. Tried a few things that went hellish wrong… whoa!! Jim, the first cabin boy in space !!!
Made a few adjustments and now Jim goes up and down with the platform AND he can get on and off them !!! – only vertical ones for now…

Well, that's quite a huge step forward now. I have got the game to a more advanced stage than the last post and completely re-written it, and learnt to use a new tool in the process. No doubt something will go wrong very soon :-)

15th November 2002
Re-wrote the whole clump of code in a more organised manor. That first bits were thrown in to see if I could get to grips with a new language. So re-structured it all and added scope for more levels. In theory I should be able to define a single room in about 30 lines of code with a single main loop doing all the easy stuff… (famous last words…)
Still got a few bits of logic to sort out in my head but things are moving again… slowly…

Made a few more stabs at various bits of code to make sure I could get them to work. The first was the horizontal moving platforms. Mmm got these working no trouble, and Jim can now move on and off them, and fall off them – with ease !
Falling of things was another thing I got working as well. Jim can now fall off platforms and floors, but as yet he doesn’t die.
The next thing was ladders… I imported an image and stuck it in the game. I then re-coded the room drawing routine to accept it. I now have a ladder. Next job, getting Jim to climb it. First though I had to import the anims for climbing.
Did this and tried a few things to get him to climb up.
Finally managed it, but he got stuck half way up and refused to move. I then got him to the top but still Jim was not correctly placed on the upper platform.

I mucked about until I finally got Jim to climb down, but still refused to climb all the way up. He’s only missing by about 4 pixels but it looks bad. I enlarged the ladder image to see if this helped – it didn’t. I then modified all the x and y cords of the collision check – this didn’t help either. So – at the minute I’m stuck on this ladder…

Decided to try something else instead of the ladder.
I stuck in a framerate throttle and tested options for full screen and windowed switching. Seems to work fine.
Better have another try at the ladder…
..later
Wooohooo… finally got the ladder working. Used a totally different and easier routine, and now Jim climbs up and down the ladder with ease.
With this in the can, I decided to move on and try to get some kind of door collision working. The idea being that Jim can’t walk through doors !
Had a few goes at this before finally getting it to work.

November 30th 2002
Got all the drawing routines done for all the doors, both thin (side on) and fat (front facing). Had some trouble with the speed of the thing, seemed to slow down a lot and had to increase the movement rate of Jim to compensate. Hope it doesn’t slow down too much. May be I’ll have to find a way to speed it up, or maybe it will speed up after its compiled !

Finished all the door collision routines, so now Jim can’t walk through doors.

Next was the keys.
Drew the keys again and loaded them in.
Redrew the thin doors to include the key number required to open them above.
Re-wrote the door placement routine cos the new size of the image buggered it up !
Added key 4 (the first Jim can pick up).
Added a routine so he can collect it and it is displayed on the panel at the bottom of the page.
Now… the next thing I have to do is get the door to open when he has the key and he bumps into it, and… if he has a key and he collects another one, the old one will have to be put back to its original place… more thinking for this I feel…

Reading all the above scribble make one think that I’m doing loads of work on the first room. This is not the case – let me try to explain.
I am attempting to write an engine that will handle all rooms and all possibilities. The engine will accept variables that define the room and its contents including background stuff, sprites, ladders and moving platforms. Once the engine is complete, all I have to do to create a room is to set the right variables and fire them off to the main loop. The main loop will then draw the room and let you play it. If the player leaves the room, another set of variables for the new room is sent and the whole thing starts again.
So, I am working my way slowly through the engine, adding keys, doors, ladders etc.. and once finished its just a matter of creating the rooms through a set of variables.
At present I guess that each room will have about 30 variables.
Oh well… onwards…

December 29th 2002
Got my brain in gear and managed to get the routine done for all key collections. When you pick a key up, if your carrying one already, it gets put back to its original location – just like the Speccy version.
Next was to get the doors to open if you had the right key.
Bit more thinking… yes!
All the doors now open if you have the right key.

Problem – as I tested this routine I noticed the whole game speeded up as less and less things appear on screen. At some stage I will have to optimise things, because there’s a whole lot more stuff to add yet – boxes, barrels, moving platforms, pirates, parrots, rats and portholes… probably more !

Grabbed some more background images from the game and re-coloured, smoothed and textured them. The game now has 4 types of background crates.
Tried to add a pirate/door collision. Against all odds, it worked and we now have a pirate stomping about the levels, bouncing off doors etc..
Found a bug in the Jim/Door collision – my fault really, I pasted a whole batch of code and forgot to change one bit of it !
As each module is added, the engine becomes more and more complete, and the only bits left to add for the first room are the treasures. I will have to do some more drawing for these though.

Grabbed more stuff from the game, this time I got a few treasures, smoothed them and re-coloured them. Copied the pirate sprite and gave it another coloured shirt for a bit of variation.
Back into the game… Added all the stuff I have just done and now the first room is complete (graphics wise).
To finish this room I just have to add treasure collection and pint scoring, and the ability to go through the doors to another room.
Before I move on to the next room, I will have to sort out a status panel with keys, score (sorry – booty), treasure and lives. To do this I will have to create a death routine along with collisions etc…

Got the control panel sorted out. A nice sunset as a backdrop with lives, key held, booty and treasure all displayed. At the minute only the key carried works, so I guess the next job is to get the others sorted out.

Yipppeeeee!!!!
Was seriously worried about the way things were slowing down the more and more stuff I added, so I sat down with a beer and went through the code line by line to try and find out what was causing it to happen. I found it… a large chunk of code was sat in the wrong place… argh! I shifted it out and wwwhoosssshhhh! The game went like stink. So much so that I had to slow everything down…
Then I hade trouble with the pirate flickering… so I went re-wrote the anim routines and moved the code about again. Now their walking about like good’uns.

January 24th 2003:
After the last success I suppose I was in for a bad one at some point.
I tried to finish the pirate walking-bumping-into-door-routine and ended up having pirates vanishing from view and their x-coord counters going bananas.

I altered some code and managed to stop them vanishing, unfortunately after one of the door was removed by Jim, the pirate stopped walking and flickered wildly. This took me a whole night to sort out and was in no mood to progress the game that night, and for a few nights after.
Eventually I got back to it and decided to implement the bomb. This appears randomly when you collect a treasure. One time it may be the gold cup, another the sword etc..
I drew the sprite, loaded it in and after a few tweaks got it ready to use.
I added a small random number generator and stuck it into the ‘treasure-collection’ routine. Again – more faffing about to get it working, but at last it there. Fizzing away and exploding.
At the moment there is no nasty-Jim collision, so it doesn’t kill him, but its yet another piece in the game engine.
Now that is in place, the first room is about 90% playable. You can collect all the treasure, open doors and get random bombs. Next up will be a new level. This will prove (or bollocks up) my concept of the game engine…..

February 18th 2003:
Sorry about the long time between updates but have had much to do on the home front and more to do on the game front... read on...

Room 2 is done. The engine proved superb and with a few tweaks it took about 2 hours to get the room fully working.
Next room will be a bit of a challenge because its got moving floors that Jim has to stand on. I have some test code for this already, I just have to add it to the engine and see what happens.

Just had a terrible thought – and spotted a rather glaring problem.
They way the engine works at the minute, if Jim goes to the second room after clearing the first, when he goes back to the first room, everything will be reset as all the original variables will be re-read in.
What I now have to figure out is how to maintain room state during the game, but reset it when a new game begins.
Considering there’s about 30 to 40 variables per room, I guess I will have to load all the room data into arrays, pull the data back to the standard variables when I that room, write them to the array when you leave, and then load in the next room. Does that make sense?
I think I have it now…

Argh!
Did a lot of thinking about the way the rooms will retain their data and came up with a great and fast idea using fewer lines and less arrays. Only problem is, I will have to re-write about 50% of the code to make it work.
Each room’s data will be held in an array. As you enter each room, this data will be transferred into a ‘current’ array. All routines check this array for collisions etc…
When the player leaves the room, the data from the ‘current’ array is fired back into the room array. Then the new room data is fired into the ‘current’ array and things carry on….
So, when you go back to the room and the data is re-loaded – it should retain all its previous settings. Hurrah!
So, long typing stints ahead me harties… pass the grog…

Converted all the static room drawing routines to use the array – works fine.
Converted key collection routines – works fine
Began converting door collisions – got too drunk and went to bed !

Finished the conversion work and now all the coding should be there and ready to just add rooms, although it never works out like that.

I had a bit of fiddling about to get room 2 to work, but we have two fully playable rooms.

Phew....

March 10th 2003:
With that working – I set out to do the third room, the one with the moving platforms.
I got the map sorted out, the data loaded and room drawing up with all the stuff in the right place. The only thing missing is the moving platform.
I also figured out why the pirate form room one was acting silly when Jim opened one of the doors… so that should help in future rooms !

Room 3 is now fully playable (pic) – including the moving platforms. Has some trouble with these, but that was to be expected. Jim was able to somehow get stuck in the middle of the platform and the floor when using them. I think I have fixed this now, the tests seem to be fine.
I had to add an extra 6 items to the dataset for each room to take into account extra items I missed from the original.
Now have to figure out the room jumping !

Room 4 now fully playable, but this was fairy simple with no moving platforms to confuse me. I did have a problem with jumping back to room 3, but solved it now.
I added more data to the datasets to cover the extra pirate, the parrot and rat.
The next level is going to be a challenge – its got vertical moving platforms !
The horizontal ones gave me a headache !!

Room 5 complete – well almost.
Jim can now hop on and off the vertical platform and ride them up and down the screen, but the problem arises when he mistimes his exit. Jim can sometimes end up in the middle of a platform. This is a problem seen through the game, so I guess I will have to fix it pretty soon. Apart from that things are working fairly well. Each room takes about 3 hours to get ready, and as each room is complete, the engine becomes more complete.

March 21st 2003:
Decided to try and sort out an ongoing problem before I charged ahead and created more rooms. Jim has a problem with platforms! He is forever getting stuck in the middle of them rendering him useless. I gave it a good 4 hours worth of brain power before I finally got it fixed. (hurrah!) Jim’s ability to miss platforms can now be tweaked, so I could be really nasty and make him have to be pixel perfect – or make the game a bit more playable. At the minute he has a 4 pixel zone before he starts falling (dieing), so it fairly easy to time it right (easier than the original anyway!)
Once this was fixed I discovered a few more problem with bombs appearing for no apparent reason and the Booty score suddenly taking off and zooming upward at an alarming rate !
I got these pinned down (typo) and have now to make a few more adjustments before level 5 is fully functional again.
I am now going to study the map (should have done this first !) and check out the data sets I have done, I have this feeling I am missing something !

After more intensive mapping I found what I knew I would find… more items that need adding to the already bulging datasets. I need to add these before I carry on, or I will end up having to do more work.
Having said that – I got drunk and ploughed on with room 6 !

Room 6 is now fully playable – it’s the one with the nice portholes and waves…
More mods to the game engine to allow for animated backgrounds (waves in the portholes) was needed, but its now working a treat.
At this point I really must get back into the code and add the extra items of the data set. These include a further 2 vertical moving platforms (some screens have 4), and more horizontal platforms. One of the rooms has 4 horizontal and 4 vertical moving platforms together… argh!!!
Hopefully the game engine will waltz through it.. as all the required routines have been written and it should just be a matter of setting the room datasets.

All the doors (exits to other rooms) are sorted and I now have a good idea about how things work. There are still a few un-answered questions, but these will resolve as time goes on and the game becomes more and more complete. The game claims that there are more holds (levels) each with 20 rooms, and that you get to these by collecting all the booty and then finding the key within a time limit. I will have to test this and see what exactly happens – and add the resulting code the game.

Finally added the extra bits to the dataset which should hopefully be complete now.
Added the ability to use different types of images for the backgrounds so I can change from normal to dark rooms. Complete level 6 but found a big problem while testing it.
If you leave a room holding a key and then come back – the game does not put the key back in the room. I think I know how to cure this.
Continued on...
Room 7 nearly complete. There are 4 vertical moving platforms in here… very tricky to do this… just have to tidy it up a bit before moving on.

March 29th 2003:
Onward with the heads-down coding type thing and got room 8 complete. Some of the previous rooms doors do not work yet as the rooms they go to have not been created. This means a few lines of code as each new room is added.

Room 9 is now complete and working. This is the first room to have vanishing platforms and is reached by the bottom door of the first room. There are a few glitches with bombs appearing, but nothing too bad just yet. I will have to check some of the moving platform routines now because I used the same image for the vanishing stuff, and it may have strange results with the collision checking.

Half way there.. well almost..
Room 10 is now complete, so that’s half the rooms done.
I also fixed the little problem of loosing any keys carried when you left the room.

Room 11 is now complete.

Room 12 is now complete – although I have yet to add the flood effect. Don’t know what the flood effect is? – wait and see… or play the original…

I have noticed a slight problem with the ladders on the middle section, but will look into this when all rooms are done. I am hoping to finish all the rooms and connecting doors so that the game is fully playable and completeable. I will then go back and check the middle ladder coding – or I should say, the platform detection code, because that’s where the fault lies. To try and stop Jim from being able to walk in the middle of the floors I have added a small piece of code that moves him up or down depending on the accuracy of your walking. This code is making Jim slide down the ladders on the middle section instead of climbing them!

April 6th 2003:
Room 13 is now complete, although this is the first room not to be 100% accurate. I have had to replace some of the background boxes with different ones… sorry.. but it did mean re-writing loads of code to make the engine work with this….

Rroom 14 (the sword room) finished completely, including all doors to other levels. As I progress and get closer to the end of the rooms, more and more doors will become active throughout the rest of the rooms.

Room 15 complete... wohoooo!!

I added the scaled/windowed option and it seems to work fine. There is still some flickering now and again, but I will tweak this when the game is ready for release. You can now run the game fully scaled to what ever resolution your using or just drag the window to the required size.

Room 16 now complete.
Went away to do some graphic tweaks on the main characters because when in full screen mode, they look a bit pants. Also will try to fx-up the main screen.

Room 17 now complete – phew!
This room is probably the most complex of the game. 3 disappearing platform, 3 horizontal moving platform and 1 vertical moving platforms. I managed to get them all working, but I suspect I will have to do a lot of tweaking to get the timings right so that this screen is actually playable. I wouldn’t want to produce an impossible screen that made that game un-finishable.
I also added an instruction screen – but for some reason this crashed the game ! Ihave removed it until I get chance to look into it.
I produced a flooding effect for room 12, not the best thing I’ve seen, but it works. Or at least it works out of the game. I did a small mini-project to test a few routines before adding them to the main code. When the time comes I will just paste the code in and see what happens !!

May 17th 2003:
Finished off level 18 by making the doors work so you can move to the other levels.
Finished level 19.
Tried to modify some of the graphics but go nowhere so I gave up and had a glass of wine instead !
Level 20 finished.

That’s all the rooms finished now (apart from a few moving routines that I couldn’t add because the rooms were not there to jump to). Once these are sorted out I then have to go through and check loads of things, add a few bits and pieces… list time…

Things left to do:

1. Check all doors go to the correct place
2. Fix bug in some rooms when you can stand at the left hand wall and the scores flips out !
3. Fix small ladder problem that only affects the middle level ladders.
4. Add flood routine (already written, just needs pasting in)
5. Add falling check and death/anim/lives routine
6. Add game over routine
7. Add parrot and rat!
8. Check timings on some of the moving platforms
9. Check all objects can be collected.
10. Find some music ! - Can the person who emailed me at the start of the project get back in touch !!
11. Add all objects collected routine….
12. Fix vert platform problem

So.. not much then !

May 24th 2003:
Completed all door checks so all the doors are working and take you to the correct room. Only one door doesn’t work yet, that’s the flood door !!
Fixed the ladder problem and added code to stop Jim from walking off the ladders sideways.
Added the flood routine – works great but may need to tweak it later to add a game over message or something !
Going through the flood door now looses you a life…

Spent a lot of time trying to track down the bug that causes the booty count to go into overdrive when Jim sometimes stands near the left hand side of the screen. I added collision checks and on-screen counters – all to no avail, nothing told me why it was happening. I then went through the code that updates the booty count line by line and found nothing. Eventually traced it to some weird object placement. I modified the collection code for each object and at last it seems to have fixed it.

Went through all the object collection code and added about 7 entries to fix the problem that stopped Jim collecting them. He should be able to collect all ‘collectable’ objects. I say this because there are some objects in the game that can’t be reached – this is a direct mirror of the original – so beware….

I also switched back on the random bomb placement under random items in each screen. I can’t remember why I switched it off, but it should be ok now.

I spent ages on the last major coding issue – falling off things. Jim fell off quite happily and landed on the lower platforms, but I hade to change the code so that if he fell more than a few pixels the control would be turned off, the animation changed and he didn’t stop when he hit anything.
At last its done… Jim falls off things and looses a life and is sent back to screen 1. At the moment he can drop by 20 pixels before he goes into his death plummet, this helps when getting off platforms, but I may reduce it later.

Fixed the vertical platform problem that forced Jim to be picked up if he was within 50 pixels of them. Jim can now scoot about across them with ease… well if your timing is right he can !

Parrot and rat : Got the images and did a cleanup and re-colour job, imported them into the code and set about creating some kind of timer to fire them off.

Managed to get a timer working so that after 4 seconds, the parrot flaps across the screen. Then implemented the rat.
I can now specify where they will appear for each room and at what time and direction.
Got all collisions working now except for the bomb. That routine will have to be slightly different because it will only kill Jim after a certain frame of animation. The bomb fizzing will not kill him, but when it explodes it will.
Fixed a small bug that crashed the game when you died.
Went through all the room data and added the parrot and rat to a selection of rooms, some won’t trouble players too much… a few are a pain in the butt !
When you die and go back to the starting room, the previous room data (the one you died in) is not stored and so doors, keys and treasure are all reset. I added a few lines in the die routine to save the data back to fix it.

June 23rd 2003:
Added some sound effects.
Added a routing that checks to see if the bomb has blown up yet, and then checks to see if Jim is near it.
I found a major bug in the bomb placement routines, but fixed them now.
While testing these new bits I also discovered a few small problems that need addressing.
Phew ! Its play test time folks

Added a check to see if all the booty has been collected and if so places the golden key somewhere in the galleon and starts a 1 minute countdown.
Got the end game sequence done at last.

Had a massive debugging session and fixed loads of bugs – the major ones included;

Platform timings on room 18 fixed so you can actually complete it!
Pirates not bouncing of door number 4.
Pirates walking in mid air on several levels after doors removed.
A key missing from one level.
Booty you couldn’t collect.
Scores going wild when you collect a sword.
Music not playing on game over screen.
Nothing happening when you couldn’t find the golden key in 60 seconds.
Suddenly jumping to the complete game screen for no reason !
Jim appearing in mid air on one level !
Booty resetting to 0 when you collected the map.
A pirate vanishing from room 9 when a door was removed.
The flood effect didn’t reset properly.
I once saw something strange but could not reproduce it, so I’ll wont spend time trying to fix it !!

Final compile and test session.... release coming soon...

July 14th 2003: BOOTY RELEASED !

Its done - go grab it now... I'm off for some wine ;-)