1) Move player0 and player1 around the playfield and fire a missile
2) Player must wait for missile to reach end of playfield before firing again
3) Missiles fire in direction player is facing
4) The sprite for a player changes relative to the direction the player is moving
5) Scroll the playfield when a player tries to move beyond playfield boundaries
6) When a player causes the playfield to scroll, adjust the other player's x/y relative to the playfield
7) If both players are at full opposite ends of the playfield, do not scroll
There's no collision detection or sound and the sprites are purely functional.
How can I simplify my code? Specifically, I'd like to be able to remove the tons of redundancies. Right now I'm doing almost everything twice: once for player0/joy0/missile0, then do the same thing for player1/joy1/missile1. How can I make these into individual subroutines that know which player's attributes to modify?
I feel like I'm way over thinking the "Playfield Magic" section. Any thoughts/advice on a better way to accomplish this?
(edit: changed topic title)
(updated code: added x/y correction for missiles, still not perfect though)
pvpbasecode.bas 12.99K
23 downloads
pvpbasecode.bin 4K
40 downloads
Edited by SloeGin, Wed Feb 13, 2008 10:17 PM.













