-
location, and stuff
im making a text rpg, but i want it to be more open and i want there to be somewhat villages, i would have them use the arrow keys (up, down, left, right) for movement and if they go left or right it adds or subtracts one from the x location and if north or south it adds or subtracts from the y location (like a graph, (x, y) kina) and i want the array to hold where something is like a person or biulding, and that leads me to quite a few questions, first:
1: how can i have it state the persons location up in the corner in x and y and keep it updated and not have it keep scrolling down, and when a message appears have it be erased after they press a key for a new message if necessary
2: how can i keep the x and y locations up to date both in the game loop and outside the loop for the person to see? would a simple function do this or is it trickier than it seems?
3: is it possible to maximixe the window in c++ or does the user have to click the maximize button?
4: if you know any examples of this that could be usefull let me know
5: this is a learning experience so any other tips you might have are greatly appreciated
-
Sounds like you need to manage the console somehow. Which begs the question: "Which console?"
If you want a GREAT reference, punch up the tarball to the game nethack. Its an amazing game, and done in the style you describe.
I think it's curses based though, so you might need to port it to conio if you are using a system that doesn't suppoort the curses library.