[Win95GUI] Windows Message (drive crazy anyone?)

From: Philippe Durand (philippe@DURAND.NET)
Date: 09/03/97

Hi All,
    I guess I've seen my limit in knowledge :)... Not that I thought I
had unlimited knowledge, but I thought I could get past this one...

I think that to be able to create this GUI, or at least the server
part of it, I will need to rewrite the game_loop() function, and make
it kind of a message handling function.

But Gee! I dont know how to work with windows messages with C++Builder
and VCL, so I'm at an impass for this... I've had a few people send me
examples of how I would go about doing it, but it seems that It isn't
as easy as that...

I think that I might be able to conjure up something, if I knew how to
get the Message Handler FROM the Application instead of creating my
own... But I dont know how to do this.

I thought I should try using the VCL already-made events, which would
be a snap! But I dont know if I need something more then that. Maybe
if I thought of an algorithm for this procedure, and please correct
me, and change/add/delete whatever you think is needed and send it
back to me:

- Start Program    (user does this)
    - Load Window    (windows does this)
    - Load Objects    (windows does this)
    - Set-up Objects
    - Wait for Message    (windows does this, of course)

    - If Quit, then Clean out, and Destroy Application.

        - If Start Server
        - Check Parameters (CheckBoxes, and Port settings etc)
            - If bad params, give error message box.
        - Change to Library Directory
        - Initialize Game
        - Get Boot Settings from What user set in the GUI, and Set
        - Initialize Socket
        - Boot Database
        - Start Game Loop (YIKES!)
This is what scares me about all of this, everything up to now, has
not been a loop, and all of it actually takes about 3-4 seconds to go
through, other then Booting the Database. This Game Loop is what I'm
having trouble Implementing (Of course! Its the Heart of the Game!)

Basically what I need, is to have the loop be happening while Idle,
but have the loop stop when the Server User needs to do something??
That doesn't make too much sense... Maybe its more like this: I need
to have the Game Loop when Idle, but when there is an Event from the
Window, go through the event, and then Go back to the loop!! That's
IT! Gee, writing to this list makes me think... (you probably thought
of this like two pages ago) But I dont quite know how to make this
loop of events. Lets finish this Algorithm:

        - If CircleShutdown is set, Get out of the StartServer Loop.

    - If Settings Change, make sure they are valid, otherwise give

- Quit Program

Ok, so is this a basic algorithm of what would need to be accomplished
to get the GUI working?

If you know how I would go about looking at Events and Doing the
Game_Loop when the Server User is Idle, or any other info/comment/help
etc.. You know the deal, send me a message...

Thanks for your time (Sorry about the long message)
Fellow CircleMUD user.

PS: If anyone could tell me what legalities I need to keep in mind?
(Sorry to bring this up Again!)

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |

This archive was generated by hypermail 2b30 : 12/08/00 PST