in a 2d adventure game, how do you make the screen move with the
player (or at all)?
in a 2d adventure game, how do you make the screen move with the
player (or at all)?
You'll need to tell us what you are using i.e. Mode 13h, graphic's libary ect.
VC++ 6
to be extremely generic, you have to change the coordinates at which it is being displayed
yeah it really depends on a lot of things, one thing is which API you are using...but that is really the least of your worries.
It's all about the algorithm.
How do you want the player and background to move around?
Do you want the player to stay in the center of the screen at all times?
Do you want the player to stay in the center of the screen unless you have reached the edge of the map/background/room/etc, and then let the player go into free moving mode?
Do you want the player to be completely free moving around the screen?
It all depends on how you want it done.
For 2d Dragonball Z side view action game that I am making right now, I have the player always in the center of the screen except for when he reaches the edge of the map. Then I put him into free moving mode until he goes away from the edge of the map again. That is what most games really use...in the same genre that is...one example is Liero...it does it that way.