Research
I've decided to play Warlords in MacMAME today to get some ideas on how the game dynamics should work. An example of what I'm researching is what happens when a fireball is released:
A fireball is only released perfectly straight (up or sideways) when you are nearest an edge of the screen. When you're at the corner of your castle you'll release at 45 degrees. Anything between will be released at a different angle depending on how far you are from the edge. I still need to take some notes on how the fireballs bounce off things.
I'm also down to 5 non-contiguous bytes of free RAM so I need to free up some RAM before I can do anything else(dragon sprite, sound effects and so on). One change will be to revamp the fireball routines. Currently each fireball takes 10 bytes of RAM: 2 for x position, 2 for y position, 2 for x direction/speed, 2 for y direction/speed and finally 2 more for the "odd/even scanline" values used by the Kernel to make the fireballs bigger(see the picture in 3 fireballs for the smaller fireballs). I cannot change the 6 for the x-y positions, but I can change the 4 bytes for the x-y speed/direction to be a 1 byte value for a lookup table. The byte will be formatted like this:
76543210
7 - 1 = fireball captured, 0 = fireball moving
654 - 8 speeds
3210 - 16 directions
I'll need 1 additional byte to track who holds which captured fireball. By making these changes I'll free up 8 bytes for other use.
12 Comments
Recommended Comments