What a day! A stupid one in fact for Amazon Tales. Last week I spent hours setting up the low byte and high byte pointers of the data tables. Unfortunately when I was doing more programming to get the routines to work. It was just a plain waste of time. After completing the routines to set the low and high byte of the level table to read. The enemy sprites were all over the place, and enemies had their mind of their own. I tried different methods, and was totally fed up and decided to have my lunch. Looks like I'm really going to be stuck on this problem.
After fuelling myself with some ham sarnies and a cup of tea, I was still concerned about the problem in the program. I went back upstairs to find out if I could solve this issue. I looked at the code, and thought carefully to myself. THIS IS BOGUS - THIS CODE DOESN'T WORK AND THERE IS NO NEED FOR THAT ROUTINE. DOH!. There has to be a more simpler way to get the sprites working according to level. Well, a solution came up. I should have done that in the first place. How embarrassing ;o). I solved the problem, simply by removing the low byte/hi byte tables for each level, and just reproduced the same level table for level 1 - it also saved a bit of memory as well. I also set the enemy pointer values to read 126 bytes from each table. It is now up to me to put new sprite pointers/objects into different tables. (21 bytes x 6 levels per table).
When I progress further adding more varied enemies to the game this Saturday, I might be able to snip the table down even more. Hopefully next week I should be ready to add sprite/sprite collision, and also a small routine that will not cycle through the the next batch of enemies. Until all enemy sprites are offset. :)
No comments:
Post a Comment