Acorn Space Invaders Upload Manifest

I had a suggestion made to me that I included upload times and dates, so I thought I'd bung this index page up and stick the details on this. It's not pretty, I know, but I'd rather spend time on the coding than beautifying a temporary manifest page...

SourceIcon indicates viewable source code.
Disc Icon indicates a download is available.
Source (Commented code, Meaningful variable & PROC/FN names.)
Packed (As source, but put through a BASIC masher.)
Archive (Full project archive. Includes source & packed code and graphics/data files.)

Archives are in Zip format.
08/05/14 Been strange coming back to this one after almost 4 years! No listings or downloads with this update as yet. Need to test out a few things. Trashed and re-written the WIMP front-end from the ground up. Now has the ability to show player controls and display & reset the HiScore Table.
25/08/10 Major changes to this release see the framework in place to allow two players to play alternately. Currently this is an interim release and although two-player code is enabled, only single-player works bug-free at the moment. This is only here in hope that someone out there can help me find why I seem to be getting Subscript out of Range errors when redrawing player two's rack. The download here also contains a 26/32 bit neutral version of the SyncMod patch I made on the 14/05/10. Thanks to Colin Ferris for spotting that the module I had used was not 32 bit friendly and patching it for me... I have manually patched the version number of this 32bit version from v0.01 to v0.02 and changed the date to 23 Aug 2010, which was when I integrated it into !Invaders. No other changes have been made. This was done for the sole reason to make the 32 bit patched version easier to spot in the wild. You can upgrade the older 26 bit version by copying !Invaders.Resources.Modules.SyncMod from this download over the one in your game. To enable crude value dumps from inside the rack redraw routine, set invaders_debug%=TRUE .
02/07/10 Made a number of minor tweaks to the main code. Sorted out a couple of potential niggles where thngs wouldn't get tidyed up properly if we got caught in the error trap. Re-Written the startup banner so I wasn't bug-fixing two versions of the graphics loader. The banner code now uses the same abstracted version of the squash code that the main game uses. Also added a subset of the functionality of LibASH to this code. The banner re-write can be seen here.
12/06/10 Exported generic decompression code from graphics loader. Now have new version of TimPlayer (Thanks to Andre Timmermans) which has enabled me to put in place direct-to-memory decompression of the music in a similar way to what I've been doing with the graphics. We now have another music track which is playing during the HiScore entry screen. Soft cross-fade between the two has been added. I think I've fixed the music break-up at the beginning too. This was dodgy programming on my behalf. Added invaders_debug% definition near the top of the code. This allows quick enabling of the RAM allocation messages which were getting a bit out of hand with the addition of the music decompression.
14/05/10 Added new feature where the player can slow down & speed up the game using the "<" & ">" keys respectively. This is to allow the player to throttle fast hardware such as StrongARMs & Kinetic CPUs. The new Keyboard Controls screen can be seen here. A new download has been made available due to the number of changes made to internal files.
15/01/10 Finished off the rack vs bunkers collision detection code mentioned in the previous update. This now works with the current bottom row, rather than the bottom of the rack. Also implemented a penalty system whereby all scores are halved when the invaders have invaded the player's defensive bunkers. This also disables the 10% chance of an extra life when hitting a saucer on rack 5 or later. All is re-enabled and returned to normal at the beginning of the next rack. WimpSlot has been increased to 2048k, as this seems to resolve the sporadic sound corruption that was occuring on a OS v3.71 A7000+ I've been using for development.
11/01/10   A couple of minor changes... The Hi-Score table now appears out of sequence for one time only if the player has achieved a position in the table. This more closely follows many, if not all, games of the era that displayed the Hi-Score immediately after a player entered their name. Bunkers now disappear when the bottom of the rack touches the top of the bunkers. I think this is as close as I can get to how the original worked. This isn't quite right yet, as it makes no allowance for the fact that the bottom of the rack may no longer reflect the bottom row. This makes finishing off a rack once the bunkers are removed fairly easy. I might add some sort of surprise here in future to make it slightly harder.
10/08/09   Been a while since I looked at this. Made various minor changes to the listing for various purposes. Also released with this version is v1.07 of LibASH. Changed the way in which saucer scoring works. If the player is at rack 5 or greater, there is now a 10% chance that the player will get an extra life rather than 500 points. Changed the logic used to save the configuration file. Before it was saving it all the time. Now it only saves it back if the configs have actually changed.
25/06/09   Fixed "Unknown character set bank base address" error in Hi-Score entry screen. Patched in missing dynamic name hashing from HiScore entry screen code. As a result, the HiScore entry screen no longer corrupts the table. If you're suffering from a corrupt table resulting in "Sprite not found" errors as the Hi-Score table displays during attract mode, then I'm afraid that the only cure for this is to reset the file contents back to their defaults using the option in the !HSUtils application.
19/06/09   Modified configuration save/load routines to only save back configs file if contents have changed. Changed the music/SFX toggle and volume control handlers to set a flag on operation so this would work. Squished a bug in LIBMsgs where a variable wasn't declared LOCAL when it should have been.
14/06/09 Moved the graphics area pointers into the gamestate fray and added a little more detail to the startup sequence, particularly the memory allocation. This allowed me to nail down a couple of memory leaks in the graphics decompression code, where I was allocating workspace and file buffers and not freeing them. Altered PROCprint() allowing me to pass the desired bank's base address directly, thus stripping out the need for that CASE statement. Have left a short sanity check though. This should be the last download update for a while. Will still update and post listings though.
11/06/09 Re-Worked Initialisation section moving LibASH initialisation to earlier in the code. Due to the increased security work of the last update, this meant I had to hive off the LibASH resources into a seperate file. This has allowed me to initialise gamestate earlier on in the startup sequence, therefore allowing me to move a few more stray values into the gamestate fray. This has led to the elimination of a number of variables and allowed me to optimise. Checksums are now also included in the extra security layer, previously they were not. Have modified development tools to write these new file formats. You will need to either create a new HiScore table or convert your existing file to the new format for this version of the game to work. Use !HSUtils which is one of the development tools to do this.
09/06/09 Increased security for messages and other LUTs in the game. Also done the same for the HiScore table. This has resulted in quite a major overhaul to the Development tools. HiScore table files have also changed again. Have modified the !HSUtils application to deal with the changes. Will convert HiScore files from both previous updates and those generated by the Invaders release of 02/06/09 to the current format with the increased security. Again, you'll need to run this utility to either reset your HiTable or convert it to the new format, otherwise this release won't run.
05/06/09 Modified !HSUtils application to give the user an option of creating a default HiScore table if the program can't find a file to convert. Changed FNgfx_load() again so it now handles both sprite files that have been compressed with !Squash and those that haven't equally well. Streamlined the code that displays the credits screen. This also has the added side-effect that any negative value can be used. (-1 will drop the text to the next line and -<n> will drop the text down by n-1 lines.)
02/06/09 Added checksums to the HiScore table a la the rest. Removed !ClearHS utility from the Development tools and replaced it with one that will either reset the HiScore table, or convert a HiScore table saved out of an earlier version of Invaders. New routine is able to convert files from several locations and will try each location in reverse order of Invaders version. The application directory is checked last. A file that has already been converted to the new format will not be touched by the program. When converting, the program just calculates the checksums and inserts the header at the top of the file and writes the new file out where the current version of Invaders expects to find it. NOTE:: You will need to run this tool to either reset your HiTable or convert the file from a previous version of Invaders before this latest download will run.
22/05/09   After a little more testing, I've managed to reduce the version requirement for the Squash module down from v0.25 to v0.21. This older version was found on an A3020 running OS v3.10, so I can fairly safely say that the game should now be able to run on RISC PC era hardware with OS v3.50 installed as was originally intended. During development of the Squash handler, I only had access to an A7000+ running OS v4.02. Also fully commented the graphics loader & decompressor, so it should be easier to follow what's going on now.
20/05/09 After a major overhaul of FNgfx_load(), the code now sucks up Squash files for the graphics and decompresses them into memory. Thanks to all those of you in Newsgroup land that helped me with the code, especially Steve Revill again who came to my rescue with a chunk of untested code, and Martin Wuerthner for spotting the bug before I even had the chance to try it out. As a result, Acorn Invaders now requires the Squash module to work. This shouldn't be a problem as TimPlayer isn't able to run on pre RISC PC hardware, so Squash should already be in the OS ROM on all target machines. Acorn Invaders will automatically try to RMREInit it if it's been unplugged for some reason. If it still can't find it then it will produce a message and bail. As a result of this switch from raw sprite data to Squash files, the banner code has also been changed. The next step in this project for me would be to switch from hefty sprite files for screendumps into something like GIF. That's for another day though.
07/04/09   A couple of minor changes. Mostly tidying things up a bit. Added a couple of new calls to the stand-alone LibASH and changed the behaviour of some of the existing ones. Claims now return -1 if an error has occured. This permits maskable error control by the caller. (It's undesirable to have a WIMP program to stop dead when it can't allocate memory for a user's file. Better to throw up a dialog saying "No room for file!", abort the load operation and continue.)
31/03/09   A couple more minor optimisations and a fix for a potential bug. Also re-worded a couple of the comments to more accurately describe what is going on.
30/03/09 Optimised the hell out of the lookup tables. Put the PRNG code on a diet and generally speeded up things where I could. As a result, the image lookup (ILUT) & SWI lookup (SLUT) are no longer encrypted in memory. These two LUTs now have a seperate key from the strings. This in turn has resulted in a change to the development tools. Quite a bit of work, but the speed increase is noticable... I promise. If you plan on rebuilding stuff, you WILL need the updated !DevEnv application as some of the code has changed.
27/02/09 Slightly modified the internal structure of the !InvData application. Added icon to !InvDev. Fixed up a config file, residing in !InvData, which holds the current state of the sound system. This is saved out of the gamestate% object when the program exits cleanly and is looked for and loaded in (if it exists) as the program loads. Made a number of small optimisations here and there, mainly things like removing unused variables and streamlining core routines. Nothing done should break anything.
23/02/09 Fixed up external repository for HiTable & Screenshots, on feedback from the newsgroups. Details of how this works are included with the archive. New version of !DevEnv deals with these changes. New version of the error reporting window that makes it write a fixed value to <Error$Flag>. I might extend this feature in future versions.
22/01/09   Fixed a couple of minor bugs in the invader AI routines.
15/01/09   Re-coded the suicide routine to correctly deactivate all invader missiles currently on screen using value held in gamestate%
06/10/08   Nailed a bug whereby the arrays holding the message strings were waaaaay too large... I hadn't factored the two checksum entries in the function that returns the number of messages in the file. (These two checksums now appear before the count.) The two dummy reads have now been added to the function, as a result, it now returns the correct count again.
29/09/08 Back with a vengance... And a few changes that should make it harder to modify internal data such as the credit screen and message strings. This has required me to alter the format of internal files slightly, so you'll need the new copies of the development tools also included as part of the standard archive. (You'll need BOTH apps this time, just replacing !Invaders won't do.) Also modified the previous entry so that the code-view links point to the right files. Thanks to those of you who spotted this bungle.
26/09/08   Probably the quietest this page has been for a while. Anyhow... Little bit of optimisation done on the bunker redraw routine which now only takes one parameter rather than the previous version which required three.
03/09/08 Re-wrote the bunker redraw stuff so that the actual bunker image gets redrawn by one proceedure in one place. Also modified the bunker code so that it targetted the redraw event at the changed bunker, rather than redrawing all of them at once with the resulting performance hit. Added numbers in each of the bunkers, counting down how many hits before the bunkers are destroyed. Added this as another character set bank and modified the PROCprint() routine to take this bank as a parameter. Modified all calls to PROCprint() to pass this new parameter. Spotted and fixed a memory leak that should have been fixed before, must have overwritten it when transferring files to and from floppy discs. In-game screenshots featuring the new bunkers are here, here & here...
29/08/08 Completely re-written the block integrity checking code within LibASH and dropped these changes into the Invaders code-base. This was actually partially completed yesterday, but I updated the site before I'd finished writing up the changed to the LibASH documentation...
28/08/08   Fixed a couple of memory leaks spotted while I was uploading yesterday's efforts. This was down to the changes made to the invader fire and bunker handling routines. I'd increased the size of the invader fire array from 7 up to 10 slots, but I somehow overlooked the code that freed up memory. This was still only freeing up the first 7 slots... Similar story with the bunkers...
27/08/08   Made some minor changes to the source code, mostly tidying up how the bunker handling code works. What I had before was a set of routines that took the number of bunkers as a parameter. All that I was passing was the appropriate gamestate% value, so I just removed the parameter and made the routines look at gamestate% directly. Also thought it was time for some updated screenshots showing the current state of the game... So here they are... We start with the Credits screen. All those who have been contributing in some way get a mention here. Sorry if I've left some people out... Let me know and I'll add them to the next update. Following that is the Score Advance Table, The Keyboard Controls screen and the HiScore table. Then we have a few in-game shots here, here, here, here and here... Enjoy...
20/08/08   Added a poor man's collision detection to the bunkers... Currently all that happens is they are nudged up or down depending on which direction they took the hit from, once they've been hit 10 times, they disappear. Once I've figured out how to partially remove the bunkers a la the original, I'll be implementing it that way anyhow... This is just to get some feel of something.
15/08/08 Added very preliminary bunkers. Current collision detection just consists of block all and indestructable... No special effects, they can only be destroyed by the invaders going over them. I've also split the invader fire refresh handler (PROCevnt_fr_rackfire) down into more managable chunks a la PROCevnt_fr_rackmove... Increased the maximum number of invader missiles allowed on the screen at any one time to 10. The actual maximum number on screen at any one time is now tied down to the player's current rack. Racks 1-5 = 5 missiles, 6-10 = 7 missiles & 10+ = 10 missiles.
09/08/08 Added sound status icon at the centre below the playfield. Tidyied up a few more things here and there. 
06/08/08   Sorted a number of small niggles and performed some minor streamlining on the HiScore entry code. Made a new point release of LibASH available. You can now check block bounds in your own code at any time, not just when a block is released back to the system.
23/07/08   Neatened up the way in which to claim initialised blocks using LibASH. Changed the source to use this new method.
21/07/08   Fine tuned the volume control and fade-out code to the new play routine... Found it was a bit slow to respond...
17/07/08 Finished off the front-end and re-worked the credits screen. Made a few tweaks here and there. Hacked together a loading banner and an image to go with it. Happy with the image, but I think the code could be a little better... I currently have both a screwed pallette and screwed image placement & size when running on a SA RPC OS v4.04 with a screen resoloution of 1024*768. Why this is, I don't know, because I'm running an A7000+ OS v4.02 in exactly the same screen mode and it works exactly how it should do, correct colours and everything!! As an off-shoot from experimenting around today, I've discovered that it no longer works on pre - Risc PC hardware. This, I think is down to TimPlayer, but I'm not quite sure. However, if someone can get a TimPlayer 32 bitted that will run on the older hardware, then I can't see a problem with getting it back there again...
16/07/08 Got a large chunk of it working now. Fixed the volume control bug. When I re-wrote the volume control handler, rather than keeping track of the currently set volume myself, I chose to take advantage of a feature of "TimPlayer_SongVolume" where if you specify R1 as -1 it returns the current volume in R0. According to the documentation, anyhow!! Well... The current version doesn't follow the documentation and just returns zero in R0. So all I was getting was a volume level of either 0 or 2 depending on whether the player was adjusting down or up respectively. I'm now keeping track of my own current volume until a fix for TimPlayer is released. In other news, I've just got permission from Martin Hansen to gut and re-use a section of his code, so Acorn Invaders now has a nice shiny new desktop front-end wrapper... Thanks again Martin!!! I'll be modifying the credit screen today and updating as necessary...
11/07/08   Quite a bit has happened in the last couple of days, most of which I can now reveal here... Martin Hansen has been helping, and is continuing to help me on the audio front where I've been converting from TrackerModule to TimPlayer. This should allow me to mix the sound effects with the background track in time. So far I've managed to get the music track loaded and playing. The sound toggle is hooked up. I am however, stumped as to why I can't get the volume control to function correctly. This should be an easy change to PROCevnt_kb_volume(), but I just can't seem to get it right. Every time I change the volume the audio just cuts right out and there's nothing I can do to get it back. Anyhow... I've included the source here and an archive, so Martin can muse over the changes and get back to me if and when he has the time... You've been a diamond!! I've got some changes to make to the credit screen, but that can wait until we've completely nailed the audio.
09/07/08 Fixed some minor issues I introduced along with the switchover to using the gamestate% object for value storage. Pulled in another couple of stray variables into the gamestate% fray and generally did some tidying up. A full list of values stored in gamestate% and their offsets can be found close to where gamestate% is initially allocated in the source-code. Also re-written and streamlined shell animation handler, removing the need for the extra object. (sh_cpy%) Included an updated archive as someone has offered to do some play-testing for me... Thanks Martin Hansen... (All the latest code and project files in one place.) I've also removed the test code event handlers from the main program, some of you might have already noticed the missing code from the listing I posted the other day. The triggers are still in the code, they've been commented out so they don't appear in the packed listing. The missing definitions can be found in !DevEnv in the "TestCode" directory. Instructions for how to build them back into the program source are included in the documentation.
04/07/08   Introduced gamestate% object. Before this change, the music status & volume etc was being held in one object which didn't really warrant the overhead, with a lot of game state information (as opposed to player state info) being held in the player% object where it didn't really belong. Yet more stuff was being maintained in it's own variables. All sorts of stuff all over the place!! This object aims to pull all that stuff together and have it in one place. Should make things a lot tidier when everything is converted. Things now initialise in a different order...
03/07/08   Optimised the timing. Removed evnt_timer%, there is no need for this variable now. Everything samples OS_ReadMonotonicTime directly and stores it locally. Continuing to convert various events to the new timing system.
27/06/08 Completely ripped out and replaced the global timer with one referenced to a hardware consistant OS_ReadMonotonicTime. The game should be playable on a StrongARM now. Was much too fast before... Some timer related stuff is still a bit screwy, but I think I've nailed most of it. The timer related logic should work OK, just some of the timings may be a little off.
26/06/08 Fixed a bug in the screenshot code and patched a few other minor niggles and continued with the tidyup... Strings have changed.
25/06/08 Finalised the screenshot code, preventing the program overwriting screendumps from a previous session. Optimised sprite ordering in character set file and generally performed some tidying up.
23/06/08 Added keys and function text for the volume up/down control to the keyboard controls screen and joggled things around a bit for a better fit. The result can be seen here. Another screenshot here, shows the destructable (type 1) invader missile explosion effect. Also included an archive with this update as numerous changes have been made.
22/06/08   Fixed the bug screwing up the "Extra Life" banner text. Fairly easy to fix when I'd tracked down what was going on. Down to not zero filling memory when I should have been. Similar, but not as catastrophic as the same situation I had with the invader's missiles a while back. Seems strange that it didn't cause the same magnitude of memory trashing this time, which is probably why it took me a while to track it down...
20/06/08   Added volume up/down control in both the attract mode and in game and bound it to the numpad + & - keys...
19/06/08   Corrected a few minor glitches with invader's missiles. It should now be easier to hit the destructable missiles (type 1), before the collision detection was a bit "out". The "Extra Life" display on HUD seems to have gone nuts again... I'll have to have a look at this one in more detail. Have also started writing up the end-user documentation in readiness for a proper release... I'm hoping that someone might be able to help me out with the bunkers when word of this gets out there... Watch this space!!
18/06/08 Optimised the code here and there and added explosion effects to player's shell vs invader's missile for destructable (type 1) missiles. Still need to make a few more optimisations and get the bunkers coded up. Need to add sound (not sure how I'll go about this.) and original music. (Working on the music side of things...) Then I think it'll be very near complete. Other than bug fixes...
14/06/08   Fixed a rare bug that affected all animations which was down to the current value of the new global timer not getting saved when the game was paused. This same timer is required for the GAME PAUSED display, so I can't just stop it. The value of the timer now gets saved when the game is paused and restored back when resumed.
12/06/08 Fixed "Extra Life" text on HUD and streamlined pause game and extra life banner text frame refresh event handlers. Re-sized a number of "objects" that were still reserving space for independent timers that were no longer being used.
11/06/08   Switched from using independent timers for all events, to using a global timer that is incremented once for each loop around. All events read this value now... Game feels a lot more syncronised as a result. Coded up the start of an "Extra Life" HUD display a la "Game Paused". This should blink just like the "Game Paused" does, but only five times. Currently I can't get it to do much though. Strings file has changed again... I'll post an archive containing the new data once I've had a chance to debug the HUD...
02/06/08 Optimised the hell out of the image LUT, as animation was starting to get a bit choppy after the conversion to encoded strings. Seems to be a lot happier now... General tidying up. For the most part in the last few updates, the archive has just been there to update the encoded strings, or add more or to, or bugfix the development tools. I might make links to these in-line from now on.
30/05/08 Bit the bullet and completed the total conversion from embedded strings for sprites & SWIs to the same method as that used for text strings. The only strings in the code now are those that we could come across before the files are loaded. Merged functionality of OPT (external list of CLI commands) tag in Make jobfiles into a new tag "CLI" that allows these commands to be directly embedded in the jobfile. Modified the !Strings application inside the development environment to prompt and build all three files for our strings and 2 LUTs. Also added source file checking so it wouldn't fall on it's arse if source files were not found.
29/05/08 Completed the transition to encrypted text strings for all displayed text. Fixed up a couple of issues in the Development Environment and added OPT to Make to allow it to execute a list of shell commands. Already have ideas on merging this functionality into the jobfile... Watch this space.
27/05/08   No changes to the archive this time... Fixed up the missing code for the extra lives feature. Trimmed down a couple of memory allocations that I'd oversized.
24/05/08 A couple of internal changes to the code... The Score Advance Table now looks like this in readiness for bonus bases and the three invaders are aligned using offsets from the top down, rather than the bottom up. Added an extra graphic frame to the indestructable (Type 2) invader missiles to make complete what I was starting to think was lacking somewhat. We now have a four frame cycle, with 3 images... (These have been updated since the last posting to fix a memory allocation bug.)
15/05/08 Nothing new on the Invaders front, but made extensive additions to LibASH. The updated version can be found here. Be sure to read the help file included as a couple of things will be changing for future releases. Compatibility has remained for this one... Also released what can be taken as a set of functional development tools. This is further work from that mentioned in the previous post.
08/05/08 Removed virtually all displayed messages from the code and encoded them in their own file which is loaded at runtime. Knocked up a couple of routines to load them and a fast search routine. Running the two packed versions (pre string-removal & post string-removal) side by side shows no noticable difference in speed. Investigating into doing this for a lot of the other fixed strings too. In the process of creating a hashed up development environment containing various tools and code used to create the data used by the game. Although present in the archive, this is far from complete.
02/05/08 Made a few more minor optimisations to the title sequence code. Removed some dead code that was used for debug only. Added pause game functionality. Updated archive, as graphics files have changed. Now I've got a stable version out, I'm going to have a weekend without worrying about it... Screenshot of the updated controls screen is here.
30/04/08 Imported my FNcopy_object() function into LibASH, as this seemed to be the best place for it. Called it FNash_blockcopy() and documented it. Optimised the title sequence code a little more by re-writing the section of it that deals with the time-out/keypresses. This can be considered a stable release of what exists, although there's a lot more to be done.
29/04/08   Fixed a minor issue in LibASH. Didn't affect Invaders code, but could have affected other stuff.
28/04/08 Finally nailed that memory trashing (I think) down to the fact that claimed memory isn't zero'd by either LibASH or the underlying OS_Heap calls. I've played a few runs straight on it now and it has yet to produce either the straight desktop bail, the "miss_-1-2" bug or the dodgy collision detection, so let's hope... With the move to LibASH, I've been able to tag each block I create with some extra information retrievable using LibASH calls. With this I've been able to implement a much more elegant solution to FNcopy_object(). In other news, I have gained Steve's permission to distribute my version of LibASH based on his code. Also, I've changed the method that I use to create the text based listings produced here, so please let me know if there are any problems with the new method. Thought it about time to include an updated archive too... Removed zero-fill fix from Invaders code and added block fill with arbitrary value to LibASH to perform the same function. (Seemed much more appropriate there.) The posted files today HAVE been updated with these changes, so has the stand-alone LibASH.
24/04/08   Added some more functionality to LibASH (My implementation of Steve Revill's ASH). I'll put these past him and post the whole lot up when complete. Did a little more prodding around and "Chucked a grenade down an apparently empty foxhole and came up with a body..." Well... At least part of one... Seems, now that I've got the bounds checking added to LibASH, that one of the object blocks defined in the title sequence is over-running allocated space somehow. Personally, I can't see how it could. (Possibly a bug in what I'm doing in LibASH?!?) Anyhow... That seems like the next most logical probing point...
23/04/08   Completed transition to LibASH and managed to fix the memory leak. Tweaked with a few bounds checks to try and find the cause of the memory trashing, with no luck. Re-wrote the error trapping code. Scanned through the code and updated some of the comments where the code had been altered over time to more accurately describe what is currently going on. Modified the initialisation code to display on the screen what is actually going on step by step a la Doom series games rather than just using the simplified "Loading Data... Please wait..." message that I had before. Re-hashed the file prescence detection code as a result.
12/04/08 This is the first release using Steve Revill's ASH (Application Slot Heap) manager for BASIC... I think I've matched all claims with frees, but I'll need to go over this with a fine toothed comb to see if I've missed anything here. A couple of things to do here... I'll post a copy of LibASH back to Steve and see if he's happy with the changes and simple documentation I've had a go with, then I'll make it available for download. (With his permission...) For now, I've promised Steve a credit screen with his name on it for the use of ASH... So here it is...
09/04/08     Don't look too excited with this, but I managed to get the invaders firing for long enough today to take these screenshots. Missile 1 | Missile 2 These show both types of missiles the invaders can shoot. However, I'm still not able to get it reliable enough to do much more than that. In further progress, I've managed to shrink down several over-inflated object sizes amongst similar optimisations. Please ignore the reference to LIBRARY"<Invaders$Dir>.Resources.Logger" and the associated PROC calls starting PROClog_ as these are part of my in-house logger and are exist in this version in attempt to try and shed some light on why the memory is getting trashed.
07/04/08   I've modified the rack firing code since last time to explicitly set  invfire%(i%)!type% to either 1 or 2 using a call to FNpct(25) (Returns TRUE 25% of the time.). We always start off with a type of 1 and the speed is set for that type. We then call FNpct(25) and set to type 2 if this comes back TRUE. We also set the speed accordingly... In which case... How come I'm STILL getting -1 as a value of type!?!?! FNtoggle() should toggle a value between 0 & 1. So how the hell am I getting -2 here for the frame!?!?! I actually had it working as it should, the first time I ran it. It was when I ran it again to take screenshots for this page, that it started playing up again...
05/04/08   Wierd goings on here... I've been advised that re-numbering the crunched code and saving it out will sometimes break it, so I tried running it without re-numbering it first... No change from the other day. Graphics still display fine and collision detection is still screwy. Looking at the raw un-compressed source is even more strange... I've set my own in-house logger on this and here are the results... Any help here would be much appreciated.
03/04/08   Got the invader's missiles hooked up now... Well... Of sorts anyhow... I'll post a code snippet of the routine in the source file that does the work, but I'm getting some strange behavour here. In the unpacked source, I'm getting "Sprite not Found" errors. In the same piece of code after it's been through the masher, the graphics are displaying fine, only the collision detection seems... Well... Not to detect anything... The missile just sails right through the base...
02/04/08 Got a bit more optimisation done. Re-engineered how the credits screen was being displayed. This has now killed off a lot of the repeated calls and extra lines in the first part of the title sequence. We are now loading the strings in encrypted form from a file. The line spacing is also embedded in this file. Very close to getting the invader's missiles hooked up now. Submitted the archive again due to the inclusion of this new strings file...
31/03/08 Got the vast majority of the invader missile logic laid out. Not hooked up yet, however, I can't see any problems, as I've been using similar code all over. Another update to the archive, as the graphics files have changed again... Re-posted the error handler window code here as the comments at the top of the code still referred to the old code. (Oops!!)
26/03/08   Added music fade, optimised the title sequence code a little and tacked on a credit screen to the beginning of it. Pictures here. Re-wrote the rack advance code so it behaves a lot more like the original game. As a consequence, it's now a lot harder. Currently testing an idea that will allow me to implement the invaders ability to fire at the player's base.
25/03/08   Added the simple fix for the ongoing music bug described yesterday. I'll probably do a cheap fade out or something like that when I've finally got this tidyied up a bit. Here is a screenshot of the updated Keyboard Controls screen with the extra key added.
24/03/08 Got the rack logic completed. Invaders still don't fire yet, but at least the game recognises when the left and right columns have been hit and will re-size the rack accordingly. This also follows for the bottom row. I've also used TrackerModule v4.01 by Hugo Fiennes to add a temporary soundtrack to the mix. This can be toggled on and off with the "M" key at any time. Currently doesn't kill the module off when the program exits. This should be a simple fix, but I just haven't got around to it yet. Therefore music will continue to play ad-infinitum. To stop the music, just hit F12 and "RMKill TrackerModule" from the command line. Written a simple, but tidy error handler window for use with module loading. I wrote something very similar to this before, but the problem with it was that the code needed modification for each different project. The new one utilises a modified version of my LibCLI code to take the desired application and the error message from parameters on the command line.
05/03/08 Man!!! This is actually starting to look more of a professional conversion and less of a programming tutorial example all the time!! Optimised and trimmed down the attract mode code a little and added a third screen displaying keyboard controls. Included the full archive this time, as the graphics files have been changed. Finally... I just thought I'd consolidate all the important screenshots in one entry here so it is easier to see where I'm at... Score Advance Table, Keyboard Controls and HiTable make up the attract mode. In-Game 1, In-Game 2, Finale 1 and Finale 2 are some screenshots I've taken of gameplay. Finally... Entry 1 and Entry 2 show the HiScore name entry screen working. There is still some essential logic missing... The rack is a fixed size and doesn't yet recognise when you shave a column from either side, or a row from the bottom. The invaders don't shoot. There is no sound. But it's getting there...
  Finally had time to sit down and sort out the HiTable entry screen properly... Removed some of the kludges that initially made it work and fixed the errors that those kludges were intended to work around. Have got a few screenshots as a result of this work. Entry 1 | Entry 2 | HiTable.
  Wrote the string length checking code I overlooked when writing the user input part of the HiScore entry code... Still can't find the cause of those "Subscript out of Range" errors, but I've had some helpful pointers from you guys out in Newsgroup land... Thank you...
  Written HiScore entry screen. Still stumbling on a few bugs, particularly with array subscripts, but I think I know why this time. I'm just posting listings here for now, but as soon as I can get the damn thing to work properly I'll get some screenshots of it in action. Some of the code re-organisation I did last week broke some more obscure parts of the code. Where these have been spotted, they have been corrected.
Re-written border generation code to actually draw a border by repeating a set of tiles, rather than with a fixed size box bitmap. More re-ordering and re-structuring of the code, adding of a couple of sections and updating various comments with more up to date information. Archive with new graphics included.
  Fixed HUD lives display on finale screen. Various other minor fixes made thanks to suggestions made on the Newsgroups...
  Added code that I'd missed out of the finale that meant the game would continue, effectively making the player invulnerable to the rack hitting the base. Re-organised some of the code. Removed the code link between FNfs_filesize() & FNfs_find() as this is no longer needed due to the re-org... Added a bounding box to GAME OVER!!! text. Might do some others like this too...
  Continuing on from yesterday, I've found the underlying cause of the "Subscript out of Range" failures I was getting in the rack collision detection code, fixed it and removed those ugly kludges from PROCevnt_fr_moverack. Tweaked the rack advance rate to work at 5px rather than the 3px I had previously set it at. Also have some screenshots from both the finale and in game.
In-game 1 | In-game 2 | In-game 3 | Finale 1 | Finale 2
Quite a profitable day today... Got the rack advance hooked up, the rack advancing down the screen and the finale if  the bottom row of invaders ever gets as far as the base. Introduced another GFX glitch in the process of moving the rack down the screen. Got both of these cleaned up. Included an archive update, as the contents of the sprite files have changed.
After spending the afternoon writing a rudimentary event logger, I finally got the last of the bugs nailed in the invader collision detection. This got rid of that ugly "Subscript out of Range" failure I was getting every so often. Seems like BBC BASIC rounds up as well as down when it comes to stuffing floating point (real) values into integer variables.
Undid a couple of changes that caused most, if not all of the problems of yesterday. Got the collision detection near enough nailed. Hooked up invader scoring.
Re-written collision detection code which now sort of works. Fails after a while with "Subscript Out of Range". Can't see why this is currently. Debugged and optimised PROCrack_redraw and changed a few internal values around here and there. Now correctly displays explosion graphic. Also thought it about time to include an updated archive.
Included a number of optimisations that I've spotted and corrected the bug that prevented the screenshot feature from working during attract mode. Removed the invader collision detection code as it wasn't doing anything useful... I'm thinking it'll probably be easier to try and re-write this bit from scratch than try and figure out where I went wrong. The packed code here has been produced by a highly customised version of MH's BASCrunch. However, it still needs work to get it behaving how I want it to. Please report any incosistencies between the src and packed code...
Included a couple of optimisations suggested to me by folks on the newsgroups. Still no further forward in regards to the collision detection. What I've done should work... I can't see what I've missed here.
Started work on the invaders collision detection. From what I can make out, the code I've written should work. Not only doesn't it work, it doesn't make a blind bit of difference to how the game plays, neither does it actaully fail with an error!! This has me stumped!!
Fixed the saucers... They now appear as they should. The values that affected the frequency of appearance were skewed by the effect of adding all the rack handling code into the loop. (What I'd done was to fudge the figures before I'd written the invader handling code. These figures have now been re-fudged...)
Thanks to Ste on the comp.sys.acorn.programmer newsgroup, I've been able to gain so much of a speed increase with the graphics that I've had to use enforced delay loops to slow certain things down a bit!!! Thanks Ste... Invaders now move in real time due to the move from BBC BASICs PLOT &ED x%,y% to SYS "OS_SpriteOp"...
Been busy working nights for nearly two weeks now, haven't had nearly enough time to devote to this properly. Tidyied up the code a bit and broke down the code that displayed the rack of invaders into PROCrack_init, which is called every time a new rack is setup, and PROCrack_redraw, which will redraw the rack after each change of position. I've also written the PROCevnt_fr_moverack routine which is called on the VBlank to deal with rack movement, invader AI and collision detection etc. Still no invader AI or collision detection at present though. Code is now hellishly slow... I seriously need to find some optimisations somewhere.
More fiddling today than anything else really... Fixed an oversight in PROChud_scorehit() where I hadn't updated it to use the new player% object introduced yesterday.
Finally got the invaders to display, although they don't actually do anything yet... Tidyied up the HUD code a little and padded score & hiscore values with spaces rather than zeros... Introduced player% object to collect data on current score, lives & rack etc...
Added the concept of racks to the HiScore table. For those eagle-eyed amongst you, you'd have spotted this feature making it's way onto the HUD yesterday... Score is now totalled up when you hit the saucer. Just about managed to capture some animation shots of the various stages of saucer destruction... Shot1 | Shot2 | Shot3 | Shot4 | Shot5
Finished designing the lowercase character set and got it hooked up. Removed the hack that converted all names in the hiscore table to uppercase. (This was to get around the lack of a lowercase charset and was always a temporary measure.) Added HUD to ingame display. (Lives, Rack, Score & HiScore e.t.c) Finally posted a couple more screenshots... Revised HiScore table, In-Game shot with the HUD up and running.
Fixed issue where FNcopy_object() was creating objects of a fixed size (52 bytes) even if the source object was smaller.
Tidyied up the code by creating font size properties in the screen% "object". Reduced the size of the screen% "object" and those used by the title sequence. (I don't need a full 52 bytes for these.)
Another fairly fruitful day resulted in the other half of the attract mode popping up without a hitch... Resulting in another screenshot.
Had one of those evenings where everything seemed to hook up perfectly first time of trying, so I got a spoiler together for those of you who are interested out there... Thanks to all on comp.sys.acorn.programmer for their help so far... Their insights have been invaluable...
Fixed the artifact problem, mainly thanks to Druck... Also re-coded the title in preperation for the cycle between Score Advance & HiScore tables. Not much actually started yet though.
Re-hashed saucer explosion and added a few more animation frames. Also, in the root level of this archive is the file ScrnDump. I've highlighted the artifact problem in red...
Initial try-it-out version... Posted here to hope that someone can shed light on the Black is not Black artifact problem...
FNcopy_object() added. Changed image removal code to use RECTANGLE FILL rather than blacked out copies of the images in the spritefile.
Interim version. Collision detection added. Saucer logic split into three stages.
Initial saucer logic. No collision detection logic.