Thread: Just wondering

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    153

    Just wondering

    Hey everyone,
    It's been a while since I posted last (been a while since I programmed as well ) I was curious about something.

    Hypothetically, if I were to create a simple grid based game where you walk around and on a certain "square" there would be a castle. How could I possibly go about making it so when the player "entered" the castle, the grid layout would change (think original zelda minus the art hehe) and would represent the interior, and then if the player stepped on the exit, would return to the map the player just came from?

    Just thinking about it...Thanks for your time. -Chap

  2. #2
    Registered User Mortissus's Avatar
    Join Date
    Dec 2004
    Location
    Brazil, Porto Alegre
    Posts
    152
    If I understood well your question, you could solve this way: define a matrix as the data to be draw on screen. Each position of the matrix could be a pointer to a sprite or any image. You could have multiple constructions in the same position, if you use a matrix of linked lists. If you step out of the castle, you update the draw matrix with a subset of the whole global matrix, ie the world of your game.

    Hope that helps. If I misunderstood your question, sorry.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just wondering.
    By Aliaks in forum C++ Programming
    Replies: 5
    Last Post: 06-12-2009, 09:48 PM
  2. wondering about people here
    By moemen ahmed in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 07-08-2002, 09:33 PM
  3. wondering
    By xlordt in forum A Brief History of Cprogramming.com
    Replies: 35
    Last Post: 03-01-2002, 07:05 AM