Hey scorpius! Its Dan here. Yeah the room scrolls but
It still dosent work when I get to a certain point on the screen the game pauses and my pc just starts going very very slowly scrolling to with the room to the very top of the screen. My game is in 320 by 240 resolution. The rooms actual size is 320 by 500, it's a long scrolling up type room. I need the screen to shift all the way to the top with the pc all the way at the bottom of the viewport when the pc gets to certain part of the screen otherwise the room scrolls with the pc and a big chunk of the rooms background is never seen.I also need to scroll back when he gets to the top of a certain point.
here are my values so for the top part
int viewport_width=320; //view port max width
int top_edge = 130; //when reached by player viewport starts to scroll
int walk_up = 150; //how far the player has to go up when he appears on the next screen
int scroll_speed = 4;//viewport set scrolling speed
function mod(int a, int b) { return a - (b*(a/b)); }
Any ideas?
Thanks again
Daniel
Winebrager
It still dosent work when I get to a certain point on the screen the game pauses and my pc just starts going very very slowly scrolling to with the room to the very top of the screen. My game is in 320 by 240 resolution. The rooms actual size is 320 by 500, it's a long scrolling up type room. I need the screen to shift all the way to the top with the pc all the way at the bottom of the viewport when the pc gets to certain part of the screen otherwise the room scrolls with the pc and a big chunk of the rooms background is never seen.I also need to scroll back when he gets to the top of a certain point.
here are my values so for the top part
int viewport_width=320; //view port max width
int top_edge = 130; //when reached by player viewport starts to scroll
int walk_up = 150; //how far the player has to go up when he appears on the next screen
int scroll_speed = 4;//viewport set scrolling speed
function mod(int a, int b) { return a - (b*(a/b)); }
Any ideas?
Thanks again
Daniel
Winebrager