Viewport

How would I go about making a viewport? I don’t need any code examples or anything, just how would it work in theory?
I’ve had one idea like having everything on the same global x/y along with it’s local x/y but not sure if that’s an efficient way of doing it.

Do you mean getting a scrolling screen working? A “viewport” can refer to a lot of different things, like the OpenGL viewport for example.

Yep, you’d have the viewports x/y, and the worlds x/y seperately. Thats all there is to it.

You know the view in the game, uhhm like a sidescroller view but in all directions.

Like this:
http://lazyfoo.net/SDL_tutorials/lesson21/index.php

Alright, thanks. I’ll see if I can get something to work.