Thread: loading

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    196

    loading

    okay you know in somegames theres the

    loading object1
    loading object2
    loading object3
    etc,etc...

    how do you do that?
    i want to know how because i think it has a flair of professionalism to your games

  2. #2
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    532

    Question

    Print that message when you start loading that object??
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."
    c9915ec6c1f3b876ddf38514adbb94f0

  3. #3
    Registered User
    Join Date
    Sep 2005
    Posts
    196
    okay i take it by your response i didnt explain indepth enouph

    what im saying is something like

    a loading bar but instead of it actually being a bar its a list of whats being loaded

  4. #4
    Registered User
    Join Date
    May 2003
    Posts
    1,619
    How to do that is entirely dependent on what tools/APIs you use to build your GUI. Standard C++ doesn't have any GUI functionality at all.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

  5. #5
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    If you study oop, you can call a constructor and destructor explicitly.

    eg:
    Code:
    class Myclass
    {
    public:
        Myclass();
        ~Myclass();
    };
    
    Myclass::Myclass()
    {
        // this will show when a new object is created
        std::cout << "Object created...\n";
    }
    
    Myclass::~Myclass()
    {
        // and this when it is destroyed
        std::cout << "Object destroyed...\n";
    }
    
    int main ( void )
    {
        Myclass *mc = new Myclass;
    
        delete mc;
        mc = NULL;
    
        std::cin.get();
    
        return 0;
    }
    You could use this format to call the functions as they are loaded.
    It is just an idea, in general, most games call the files / functions like you said
    via a laod bar, or it will say "loading level 1" behind the scrences, the data is
    loaded in ( the program objects are created ) and all you see is the end product.

  6. #6
    Registered User
    Join Date
    Sep 2005
    Posts
    196
    thanks thats what i wanted

  7. #7
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    It is? Wow.

    Because that's also what jmd15 said in the first place.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #8
    Registered User
    Join Date
    Sep 2005
    Posts
    196
    im a visual guy i need to see the code to understand it well(im trying so please dont go on my case about it) but if ive seen code that ive read about before its alot easier for me to edit and use

  9. #9
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    Well, fair enough. I can empathise with you about being a visual guy! But couldn't you have just cout-ed "loading" or whatever at the start of the program (wouldn't technically be accurate), but either way

    Code:
    #include <iostream>
    
    int main( void )
    {
      std::cout<< "Loading. Please be patient.";
      Sleep( 4815162342 );
    
      std::cout<< "Load Successful. Welcome to Hatch Island! "
    
      return 0;
    }
    I've been reading up theories about Lost ...

  10. #10
    Registered User
    Join Date
    Sep 2005
    Posts
    196
    lol i suppoaw i could but that would be a little decieving haha

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Cargo loading system
    By kyle rull in forum C Programming
    Replies: 1
    Last Post: 04-20-2009, 12:16 PM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. Loading a bitmap (Without using glaux)
    By Shamino in forum Game Programming
    Replies: 7
    Last Post: 03-16-2006, 09:43 AM
  4. need help with .md3 file loading
    By Shadow12345 in forum Game Programming
    Replies: 2
    Last Post: 12-06-2002, 04:06 PM
  5. Loading Screen
    By pinkcheese in forum Windows Programming
    Replies: 2
    Last Post: 04-06-2002, 11:48 PM