BuGS version 1.0 released

Rand-Emonium Software is proud to announce BuGS for the Apple //gs, a computer that is turning 35 years old this year. To commemorate the occasion, a classic arcade shooter where a series of bugs descend towards you through a field of mushrooms has been reproduced for this classic 16 bit computer.

The game runs at 60 frames per second on base hardware without the need of an accelerator. Control the player using a mouse or for an even more authentic feel, use an ADB trackball. Stereo sound cards are supported and the sound of the bugs on the screen will pan as they traverse the game field. Play a single player game or play a two player game with a friend. No matter what, if you get a high score, be sure to enter your initials to get the glory. For more information about the game and to download a copy, visit the BuGS page.

With nearly 25,000 lines of assembly code, this project represents the first substantial assembly language project attempted by Rand-Emonium Software. All of the code for the project is available on https://github.com/jeremysrand/BuGS. Many members of the Apple // community have contributed to this game and this document attempts to identify many of them.

Apple // Forever!!

BuGS v0.9.7 Beta Available For Testing

This version has a change that preloads the sounds from resources into main memory after the initial screen is shown.  It used to do that at the beginning of the first game which introduced a long delay when starting that first game.  Now, responsiveness is better.  Also, there is more in the readme with a number of acknowledgements.

Source Code

Changes

BuGS v0.9.5 Beta Available

This release should fix the “magical appearing mushroom” bug from the previous beta.  I have written a Readme file which is part of the distribution which describes issues with emulators, track balls, stereo cards, etc.  It also includes support for Speccie’s Versions application to make network based updates possible.

I think this is a v1.0 candidate and feedback definitely appreciated if you find any issues that should be fixed before that milestone.  Thanks everyone!

Source Code

Changes

BuGS v0.9.4 Beta Available

The primary change is a fix for how sound samples are started.  Prior to this, I thought the sound was “muddy” on real HW.  The root cause was that I wasn’t ensuring that the DOC was free when trying to write to it and now I am also doing a read check to make sure that the change made it under most circumstances.  That ensures that both left and right channels are started and the sound is much better.

The only bug I know of which I am tracking is the “mysterious appearing mushroom” bug.  There are times when a mushroom seems to appear out of no where.  I added some debug code to try to find a situation where a mushroom exists in the tile data but not on screen which is one way this can happen.  But the debug code was never triggered so I don’t think that is happening now.  I can’t reproduce it reliably and see this once every 5 or 6 games.  But if you see it have any idea of how this is happening, it could help me find and fix this bug.  Thanks.

I believe I have found the mysterious appearing mushroom bug last night.  The problem was that a centipede segment which is mostly offscreen was supposed to be marked as occupying an off-screen tile.  And that should ensure that collisions are not handled and some other things like that.  But, I messed up the offscreen tile.  I have tile numbers which are in increments of 1 and tile offsets which are in increments of 2.  I should have put in a tile offset but I instead used a tile number.  That meant that the offscreen tile actually mapped to the middle tile on the game board (it was half of what it should have been).  Then, if you happened to “shoot” an off-screen segment right as a level is starting, it would lead to a mushroom appearing on the centre of the screen.  By fixing the tile offset of the offscreen segments, I was no longer able to reproduce it.  The next beta build should have that fix in it.

Source Code

Changes

Weekly BuGS Update

I have some bad news that my prediction that work was going to distract me has come true.  I only got one evening this week to work on the game and I pushed forward with support for two player games.  But I don’t really have anything of substance to show this week – just work in progress.  And my schedule looks pretty full this weekend.

I am committed to getting a v1.0 though.  I will negotiate a deal with my spouse to get one or two days next weekend to try to focus on it assuming that my evenings continue to be burned during the week.  Thanks for your patience.

Source Code

Changes

Weekly BuGS Status

I don’t think I will post a video this week since visually, there isn’t too much new to see.  And there is a pretty good build out there so if you want to see what it looks like, give it shot.  Of course, the big effort this week was to fix the mysterious crashing bug I had and thanks to the support here, I believe it is addressed.  I have started work on two player support since then.  When you use ‘2’ to start a game now, two players are initialized and internally there is a playerNum value which tracks which of the two players is playing.  If I force that value to be set to player 2 at the beginning of the game, I can play through a game as “player 2” and the right score and lives counters are now updated.  But this work isn’t done.  I actually have to implement the code to swap back and forth between the two players, prompting whose turn it is, handle the case where one player dies quickly while the other player perhaps has multiple extra lives and continues to play for a while after the other is done.

Work is threatening to get much more busy so I am considering deferring the online high score list for a follow-up v1.1 or v2.0 release and declare v1.0 without that feature.  I worry that I will end up distracted and not able to finish if I don’t focus on achieving v1.0.  Once that is done, if work doesn’t distract too much, I can try to implement the online high scores and my daughter has offered to do the server side work and that is good experience for her.

Source Code

Changes – none since last status update

BuGS Status Update

I found the crashing bug I was experiencing and I believe it is fixed with this build.  And I believe it also explains the other crashes people saw on other configurations.  The problem is that the sprite code is in a different bank from most of the other code.  The player and shot sprites try to write to a pair of words to describe a collision if any is found during the draw.  These were defined to be in the same bank as the sprite code but the data bank register was incorrect.  So the writes happened to the wrong bank and what happened to be there got corrupted whenever a player or shot was drawn.  On my machine, that was tileBelow data.  I have fixed the writes so they happen to the correct address and I can no longer reproduce the crash and the code looks right to me.  So, this build should be better.  Thanks for everyone’s help.

The wrong bank was leading to the flea smearing across the screen.  What was happening for me was the the tileBelow array was getting corrupted.  The flea animation uses tileBelow to figure out what tiles need to be marked dirty and need to be redrawn based on the flea’s changing position.  Because tileBelow was corrupted, the wrong tiles ended up being marked dirty.  That meant that the flea was not being erased anymore between frames so it smeared down the screen.  Worse, the flea detects it has reached the bottom of the screen when the tileBelow says that it is an invalid tile offset.  Because the tiles that the flea is tracking are no longer correct, it doesn’t detect the bottom of the screen and the flea continues animating beyond the bottom of the screen, corrupting the SCB.  Basically @digarok nailed it when he said that there was off-screen writes happening.  I just needed to figure out why that was happening because the flea code should make it impossible, as long as the tileBelow data was correct, which it wasn’t.

Source Code

Changes

BuGS Status Update

Here is v0.9.1 of BuGS.  It addresses many of the issues from the previous build.  It also adds the ability to swap L/R channels in stereo if your stereo card is standard/non-standard.  It saves your setting across restarts of the game.  And it now keeps track of the top 10 high scores and you can enter your initials.  These should load across restarts also.  I am not aware of any crashing bug in this build but I also had seriously weird problems when I loaded it on my real GS.  There were weird graphics artifacts appearing, especially when a flea would drop near the middle of the screen.  I can’t reproduce it on an emulator yet though.  If you get graphics weirdness, I would appreciate a picture of the screen to see if it is the same as I was seeing.  There is a possibility the problem is somehow with my HW.

This also has the new icon thanks to @fatdog.

Note that the instructions says to press 2 for two player, however that isn’t implemented yet.  If you press 2, you get a single player game – for now…

Source Code

Changes

Weekly BuGS Status Update

This week, I fixed a number of bugs, including a crash that was possible in the release I sent out last week.  Not many known bugs left in the code but I am sure there are lots to find yet.  Beyond that, I implemented code to pause the game.  Now during a game, any key press will pause the game.  This will bring up a prompt saying to press Q to quit or any other key to resume the action.  Sound is also suspended and resumed during a pause.  There was some discussion around the lack of a clear standard for left/right audio on the GS and there may be different hardware out there which reverses these things.  So, I implemented an option to swap the left/right channels.  While doing that, I added code to load/save a settings file where this option is stored so it is persistent across restarts.  Finally, I have added a top ten scores to this settings file and added the code to insert scores into that top ten.  What isn’t there yet is code to prompt for initials.  For now, it is hardcoded to my initials (yes, my initials are JSR) but everyone should be good with that, right?

Next step will be to actually add the prompt for the players initials.  I would also like to finally implement two player games.  Once I have that, I think it could be called feature complete.  But I would like to add some support for a global high score list.  Whenever you get on your own local top 10 score list, I think the game should send that high score to a DB out on the Internet of the best scores.  Then, if you are on a GS with an Internet connection, you would see local and global high scores.  Basically, the project is getting to the point where nice to have features and bug fixing is about all is left.  I am hoping to do an official release in February, maybe January if things go very well.

Source Code

Changes