Thread: location, and stuff

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    41

    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
    In order of learned:
    HTML - Mastered
    CSS - Enough to use
    SSI - Mastered
    PHP - Advanced
    C/C++ - Current Project

  2. #2
    Evil Member
    Join Date
    Jan 2002
    Posts
    638
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Either my loop is bad or my function is messed up
    By crazychile in forum C Programming
    Replies: 25
    Last Post: 11-02-2008, 02:04 PM
  2. Global Variables
    By Taka in forum C Programming
    Replies: 34
    Last Post: 11-02-2007, 03:25 AM
  3. Debug Assertion Error
    By Artist_of_dream in forum C++ Programming
    Replies: 18
    Last Post: 11-21-2004, 04:04 PM