A scrolling view

BlitzPlus Forums/BlitzPlus Beginners Area/A scrolling view

SuperSonic7(Posted 2009) [#1]
I'm planning on making a top-down shooter similar to Geometry Wars, but I don't know how to make a scrolling view. Here, let me explain what I mean...

Let's say for instance the resolution is 800x600. I only want to see a fourth of that and when I want to see the rest of the "world" when I move the ship/cursor to the border I need the view to move.

Any ideas? Any help? Anything is most appreciated.


Matty(Posted 2009) [#2]
Use the viewport command if you only want to see 400x300 on a 800x600 screen (why not use the full screen though?)

Secondly, store a value in two variables, which I usually call cornerx,cornery, which stores the world position of the upper left most pixel on the screen. Then simply subtract cornerx,cornery from the world coordinates of your object and they will now be positioned correctly on the screen.


SuperSonic7(Posted 2009) [#3]
Okay thanks, I'll try this out! :)