Zelda text

This is a discussion on Zelda text within the Game Programming forums, part of the General Programming Boards category; This may seem really stupid, but if any of you know this it would be great. I use Zelda as ...

  1. #1
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,475

    Zelda text

    This may seem really stupid, but if any of you know this it would be great.

    I use Zelda as an example, but when you talk to sombody in the game, does the program do somthing like this or am i totaly worng...

    Code:
    #include<windows.h>
    #include <iostream>
    #include <string>
    
    void girltalk();
    
    extern void girltalksenta(); // get the text from another file
    
    string player;
    
    int main()
    {
    girltalk();
    return 0;
    }
    
    void girltalk()
    {
    if (player) // basicly this would be if player pressed button to talk
    {
    girltalksenta(); // get the info, go to that function
    return;
    }
    return;
    }
    any ideas? I am intrested to know if you think I maybe correct

  2. #2
    ---
    Join Date
    May 2004
    Posts
    1,379
    I have no idea really but I would google for event-driven concepts

  3. #3
    vae victus! skorman00's Avatar
    Join Date
    Nov 2003
    Posts
    594
    does the program do somthing like this or am i totaly wrong
    The program will do whatever you tell it too *end wise-arse comment* =). If you were to take that approach, you would need a xxxtalk() func for every single NPC that the player can talk to, and you would have to check if the player wants to talk to them every time they press a button! Works? yes. Well? no.

    I would suggest trying a simple database. Instead of checking xxxtalk(), have something like DidThePlayerPressTheTalkButton(). If that's true, then based on their position or whatever, you can search a database to figure out what text should be displayed. Hash tables may be another topic you should check out.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ style 'zelda' text
    By swgh in forum C++ Programming
    Replies: 3
    Last Post: 04-28-2006, 04:37 AM
  2. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 03:49 PM
  3. Appending text to an edit control
    By dit6a9 in forum Windows Programming
    Replies: 3
    Last Post: 08-13-2004, 09:52 PM
  4. Scrolling The Text
    By GaPe in forum C Programming
    Replies: 3
    Last Post: 07-14-2002, 04:33 PM
  5. Replies: 1
    Last Post: 07-13-2002, 05:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21