Player Gathering Screen
by Chris Norpchen · in Torque Game Engine · 08/17/2004 (8:40 pm) · 8 replies
OK, people have told me this is fairly easy, but I keep running into problems trying to get this going so I figured I would post this and cross my fingers...
I want to have a player gathering screen after a mission has loaded but before play begins. The admin will be able to start the game when he or she sees that all the players have arrived and have connected to the server. This way all players start at the same time.
Does anyone have a resourse, or something that I could use as reference at least to build this? Or, does anyone know of where a resourse or code for something like this may be?
My game is 75% done and this is one of the stumbling blocks I have run into.
I tried making a gathering gui that is called when the game starts up, but it just appears and then quickly dissappears??? Also, I need to have the admin be the only one to control the actual start of the game, not everyone. So, it needs to be a gui where everyone sees the same thing (players arriving, etc) and only the admin has the start button on his screen.
Also, I would like to have the players chat while they wait.
I was thinking of just allowing the game to start, pausing it somehow and then popping up a gui and allowing the admin to be able to unpause it. This way my gui can use something like the PlayerListGui. But, then I run into game clock problems because my game is timed and in essense the game would be going on while they are waiting for other players.
Can anyone help?
I want to have a player gathering screen after a mission has loaded but before play begins. The admin will be able to start the game when he or she sees that all the players have arrived and have connected to the server. This way all players start at the same time.
Does anyone have a resourse, or something that I could use as reference at least to build this? Or, does anyone know of where a resourse or code for something like this may be?
My game is 75% done and this is one of the stumbling blocks I have run into.
I tried making a gathering gui that is called when the game starts up, but it just appears and then quickly dissappears??? Also, I need to have the admin be the only one to control the actual start of the game, not everyone. So, it needs to be a gui where everyone sees the same thing (players arriving, etc) and only the admin has the start button on his screen.
Also, I would like to have the players chat while they wait.
I was thinking of just allowing the game to start, pausing it somehow and then popping up a gui and allowing the admin to be able to unpause it. This way my gui can use something like the PlayerListGui. But, then I run into game clock problems because my game is timed and in essense the game would be going on while they are waiting for other players.
Can anyone help?
About the author
#2
08/17/2004 (8:57 pm)
So you could have a CTFGame.cs and JoinMission.cs each extending the DefaultGame.cs
#3
Rich
08/18/2004 (3:04 pm)
Have you looked at the lobby resource? I haven't tried using it so I really know what it offers, but it might be close to what you're looking for. As for only the admin being able to start, heck, I'm not even sure where to begin looking - I've only been looking at this stuff for a week....Rich
#4
Interesting thought. Have a mission that the start mission gui always launches but remembers the mission the admin selected. Then runs that gathering mission which could be almost nothing but just lets the players join in. Then, when everyone is there the admin could hit a key (using an action map just for the gather mission) or something which would activate the loading of the real mission with everyone intact, using the same method that the game uses to cycle through missions.
Don't know if that's what I want, but it could work. I may have to go with that anyway if I can't find any other way to do it. It also could make an interesting practice room for players.
Richard,
I don't think the lobby is the way to go. From what I've read it is more for a dedicated server type thing.
Thanks, both of you.
08/18/2004 (7:55 pm)
Britton, Interesting thought. Have a mission that the start mission gui always launches but remembers the mission the admin selected. Then runs that gathering mission which could be almost nothing but just lets the players join in. Then, when everyone is there the admin could hit a key (using an action map just for the gather mission) or something which would activate the loading of the real mission with everyone intact, using the same method that the game uses to cycle through missions.
Don't know if that's what I want, but it could work. I may have to go with that anyway if I can't find any other way to do it. It also could make an interesting practice room for players.
Richard,
I don't think the lobby is the way to go. From what I've read it is more for a dedicated server type thing.
Thanks, both of you.
#5
Once the server is ready to start the game (a counter starts counting down when the server loads the mission), we send a message to each of the clients telling them to hide that full-screen image, we turn on their car's ability to drive (when the car is first spawned, they cannot move), and the race begins.
To start the race all over again, the server simply tells all the clients to show that big image again, transports their cars back to the start line, and turns off their movement. Any player who crosses the finish line also sends the server a message to end the race, or the server ends it himself after a certain ammount of time.
Of, course, we've made the interface a little bit more involved than simply showing the player a static image, but the basic concept is there.
A chat interface is of course more complicated, but I imagine that the same technique would be useful.
08/18/2004 (10:36 pm)
For the racing game that we are working on, players who join in on the game have their cars spawned at the starting line, but then we simply have a large GuiBitmap that covers the whole screen with a "Waiting for Game To Begin..." display.Once the server is ready to start the game (a counter starts counting down when the server loads the mission), we send a message to each of the clients telling them to hide that full-screen image, we turn on their car's ability to drive (when the car is first spawned, they cannot move), and the race begins.
To start the race all over again, the server simply tells all the clients to show that big image again, transports their cars back to the start line, and turns off their movement. Any player who crosses the finish line also sends the server a message to end the race, or the server ends it himself after a certain ammount of time.
Of, course, we've made the interface a little bit more involved than simply showing the player a static image, but the basic concept is there.
A chat interface is of course more complicated, but I imagine that the same technique would be useful.
#6
08/19/2004 (12:04 am)
My game already has one of these so yes it can be done, just make sure that you give the player there camera to control(so they load up the playGui) and then pop up the window before you spawn there player.
#7
I understand the Gui thing, but where did you put the call to the gui? In ongamestart? or oncliententergame? Where is the best place to put the gui?
08/19/2004 (6:21 pm)
Manuel,I understand the Gui thing, but where did you put the call to the gui? In ongamestart? or oncliententergame? Where is the best place to put the gui?
#8
Now I have another question?
When my gathergui is up the game clock is still running.
How do I properly reset the game clock?
08/20/2004 (9:17 am)
Thanks guys, I got it working.Now I have another question?
When my gathergui is up the game clock is still running.
How do I properly reset the game clock?
Torque Owner Britton LaRoche