#35261 - esl - Wed Feb 02, 2005 7:36 am
I just want to get some input on this.
I am creating a game that requires vertical scrolling for an overall map(board) size of 256x2048 pixels (x,y). I am using mode0 with only one 256x512 background. Picture the board as being made of 8 256x256 pixel blocks stacked on top of one another. Both the top block and the bottom block must be unique but all of the blocks between them can all have the same exact look. What I decided to do is create three 256x256 maps in arrays. Map1(top of board), Map2 (the repeating middle sections), and Map3(bottom of board). When any part of the bottom 256x256 section can be seen on the screen I store Map2 to screen base block(SBB)0 and and Map3 to SBB 1. then as the screen scrolls vertically and the bottom 256x256 block goes out of view I store Map2 to both SBB 0 and SBB 1 and let them repeat as the background auto wraps on itself. and then just before the top 256x256 block comes into view of the screen (and while the screen is only showing what is stored at SBB 1) I send Map1 to SBB 0. All of the triggering of changing the data at the SBB's is caused by if statements comparing a Y value (that is add/subtracted to/from by pushing up or down, also changing the y offset of the background) to the vertical position I want the changes to take place at. This method seems to work fine when I use the keypad to adjust the yoffset for the background. I can scroll through the whole board and it looks fine. I am just wondering if there are any unforseen problems with this method.
Also I would like to create sprites that are positioned and move relative to the overall board rather than the screen. I haven't sat down yet to figure out how to work this on my own, but if you have any thoughts let me know.
Have a good one,
-e-
I am creating a game that requires vertical scrolling for an overall map(board) size of 256x2048 pixels (x,y). I am using mode0 with only one 256x512 background. Picture the board as being made of 8 256x256 pixel blocks stacked on top of one another. Both the top block and the bottom block must be unique but all of the blocks between them can all have the same exact look. What I decided to do is create three 256x256 maps in arrays. Map1(top of board), Map2 (the repeating middle sections), and Map3(bottom of board). When any part of the bottom 256x256 section can be seen on the screen I store Map2 to screen base block(SBB)0 and and Map3 to SBB 1. then as the screen scrolls vertically and the bottom 256x256 block goes out of view I store Map2 to both SBB 0 and SBB 1 and let them repeat as the background auto wraps on itself. and then just before the top 256x256 block comes into view of the screen (and while the screen is only showing what is stored at SBB 1) I send Map1 to SBB 0. All of the triggering of changing the data at the SBB's is caused by if statements comparing a Y value (that is add/subtracted to/from by pushing up or down, also changing the y offset of the background) to the vertical position I want the changes to take place at. This method seems to work fine when I use the keypad to adjust the yoffset for the background. I can scroll through the whole board and it looks fine. I am just wondering if there are any unforseen problems with this method.
Also I would like to create sprites that are positioned and move relative to the overall board rather than the screen. I haven't sat down yet to figure out how to work this on my own, but if you have any thoughts let me know.
Have a good one,
-e-