Hello everyone, i started making a top down shooter game, something like gta 2, and now im little bit confused of making scrolling screen with my character in the middle.
Hello everyone, i started making a top down shooter game, something like gta 2, and now im little bit confused of making scrolling screen with my character in the middle.
Is there a question here? What part are you confused about? What have you tried?
Hello everyone, i started making a top down shooter game, something like gta 2, and now im little bit confused of making scrolling screen with my character in the middle.
Is there a question here? What part are you confused about? What have you tried?
I didn tryed anything yet, i need to know how it is possible to make screen moving around the map
Scrolling is the controlled changing in the background image of the world canvas and movement of actors in the world with respect to the main character. Since your main character is to remain in the middle, the easiest way to control the scrolling is by letting the main character move like a normal actor with user control, but then have the world move the character back to the middle and adjust the background image and move the other actors using the same offsets. A check must be in place for the background image reaching the edge of the world which would stop the scrolling. Also a check must be in place for the main actor reaching the edge of the world after the background image has reached that edge. There are several scrolling engines and support classes on the site that you could look at or even implement. Just search 'scroll'.
Scrolling is the controlled changing in the background image of the world canvas and movement of actors in the world with respect to the main character. Since your main character is to remain in the middle, the easiest way to control the scrolling is by letting the main character move like a normal actor with user control, but then have the world move the character back to the middle and adjust the background image and move the other actors using the same offsets. A check must be in place for the background image reaching the edge of the world which would stop the scrolling. Also a check must be in place for the main actor reaching the edge of the world after the background image has reached that edge. There are several scrolling engines and support classes on the site that you could look at or even implement. Just search 'scroll'.
But you should always start your game -- get the world set up, the variable declared, the graphics set, etc. Have you started looking through any of the "scrolling world" scenarios? There are some good ones.
But you should always start your game -- get the world set up, the variable declared, the graphics set, etc. Have you started looking through any of the "scrolling world" scenarios? There are some good ones.
I have seen a lot of scrolling scenarios and i dont want just copy them and paste i want to understand how its made, and i didnt get it :(