I am making a mock-up of an RPG Crawler and I need a way to make the map follow the character around on the screen so the character doesn't run off of the map.
You probably want to store the whole map in memory, and then only display the parts in view.
Your question doesn't explain what type of UI you are going to use.
PS: Did you mean Pokemon style, or Zelda style camera? (I assume 2D graphics.)
Explain what you mean when you say store it in the "memory". As of now I have a text file with numbers in it. Each number represents a different type of terrain and it is read into the program and stored in a multidimensional vector.
The UI is going to be kind of like the average RPG UI. With the skillbar in the bottom of the screen and with the minimap in the bottom. The Health/mana bar is in the top left. Is this what you were asking?
Your assumption is correct. I am using SFML. Aren't Zelda and Pokemon cameras pretty much identical?
I envision something similiar to this in my head, but I don't expect it to come out quite as detailed and smooth. http://bit.ly/hUgkg8
In Pokemon you are always at the center of the screen.
In Zelda you move around, but when you reach the end of the screen it scrolls to the next.
I forsee problems in doing it the Zelda way. Accounting for different sizes of screens and what-not. I just doesn't sound too programmer friendly. What do you think?
I am using SFML
This is what I meant by UI actually, but maybe the question was a bit ambiguous.
I think SFML can store the whole screen in a variable and then has a view method for things like this.
Do you mean like the API can potentially save a screenshot of the map?
Do you mean like the API can potentially save a screenshot of the map?
The map can be stored in memory as either a tilemap or a single image. You load said image and move around a "camera" in order to see more.
I forsee problems in doing it the Zelda way. Accounting for different sizes of screens and what-not. I just doesn't sound too programmer friendly. What do you think?
Accounting for different sizes of screens and what-not.
This should not be a problem. You want to define the widow size in your program, as long as it's small enough to fit on a low resolution screen (1024 x 768).
Let's recap:
Looks to me like I'm going to do the Pokemon style of the map. Have it move around with the character in the center of the map, but I will have the maps large enough to do that yet small enough to be able to transfer room to room.