Game Development Community

Custom server type...

by K. Paul Garrett · in Torque Game Engine · 11/01/2004 (4:46 pm) · 6 replies

Alright need a little help please: i'm trying to create a new type of server, specifically an RTS-style lobby server where ppl will join and choose teams before the host launches and everyone loads the mission together. i pretty much have the majority of it worked out, but i cannot for the life of me figure out how to gain connection to my own server as the host.

i'm doing all that GameConnection stuff as i see it in SM_StartMission(), but in calling connectLocal() the game tries to load a mission, and that's not at all what i want. i just want to create and enter the server as the 'host' and sit in the lobby GUI while i wait for others to connect into their respective slots.

any ideas?

About the author

Recent Threads

  • RW HUD Health/Mana...

  • #1
    11/01/2004 (7:31 pm)
    Hmm, not 100% sure. Someone made a lobby resource, have you checked that out?

    *goes to look for it*

    TgeLobby v1.2
    #2
    11/02/2004 (4:49 am)
    Thanks, Vernon, but yes I've worked with this rather extensively. I could easily use this GUI but it doesn't do what I want. I'm trying to actually have people connect to a server of my own making, not an IRC off-shoot.

    All I really need is for someone to help me figure out how to make a GameConnection without loading a mission.
    #3
    11/02/2004 (4:56 am)
    Paul, I guess you could just lock the server before everyone is inside.

    If it has options, like changing maps and stuff... you could just switch mission when the game is initiated. Then when the game starts, you create all the objects and nessecary data.

    Before that, the players only sit in their GUI without a camera waiting for others to join until the spots are filled.

    I started with a blank mission without terrain.. but then realised it was stupid and just took out the mission and modified the arguments needed for the Consolemethod to start a server.

    I've done this once but not for an RTS. Good luck.
    #4
    11/02/2004 (5:51 am)
    @Stefan

    Thanks for the quick replay.

    I'm not exactly sure what you mean. Let the host into the mission but not the other players? Let the host control server stats from a GUI inside the world?

    I'm also not exactly sure what you mean by Consolemethod. are you talking about GameConnection::onConnect()?
    #5
    11/02/2004 (5:58 am)
    Sorry, English is not my native language. I'll try to rephrase.

    I also misunderstood your intentions with the server.

    Why won't connectlocal work? Just cut it down so that it doesn't use a mission file. Mission files are merely scripts, really.. and the server can run without one.
    You will also have to change some code to let it start without a missionarea.
    Or you can create this mission area, and like I said disable the cameras and just sit there with a GUI.

    Send commands and messages back and forth between the server and clients and when everyone is ready and have pressed the "ready" buttons (or whatever) then the host changes mission (like it does in Tribes II and stock TGE) and the rest is gameplay.

    If I understood you correctly, you said you tried making a listen server and then connectLocal(); on that? That should work, just disable the mission and change it when everyone has decided.

    It's really not harder than it sounds :)
    #6
    11/02/2004 (6:16 am)
    Well connectLocal() isn't a script function, so I'm not entirely sure what function to edit to change how connectLocal() works. I have worked in GameConnection::onConnect() and commented out the last few lines, which are the only ones that appear to affect mission loading. That didn't seem to change anything. That's why I'm wondering if there is a different function I need to work with. I just have no clue which that is.

    Am I just missing something silly??