Client bot
by AlexanderSLG · in Torque Game Engine · 10/04/2007 (9:29 am) · 6 replies
I *think* this is the right place to post this. If not, please redirect me
I'm trying to make a stress testing tool for one of the features in our game, which has a number of different servers the clients talk to (chat server for inter-torque server communication, credentials server for login, etcetera). The design of the transaction we want to stress-test (trade between players) calls for a couple of messages into the server, e.g. a request for the inventory to be persisted in the database, so the clients will talk to the torque server in this, so the client must be logged in into a torque server in order to be able to do this.
Since running even 3 or 4 clients eat up the whole processor, we were trying to run torque client instances without the canvas object, because simulating the whole torque handshake process in twisted (our main networking platform for non-torque related issues) would be stupid, without mentioning that way too hard, since it's already done in torque, but a lot of the functions call for the Canvas object.
So I created another mod which will be invoked by the testerclient which is basically the same as the normal mod without the server-side stuff and without the canvas.
This goes allright all the way up to the scene lighting startup where it dies because of some unrecognize packet which I couldn't recognize. As an awful hack I commented that error handling part in the engine out, and carried on to see what happened. It goes ok all the way down to lighting phase 3, where it dies because it tries to write on the Canvas. So I did this:
but it doesn't work either, I just get a % on the console after it tries (and fails, but that should be ok) to load all the textures and stuff and nothing happens. Loging into the mission with a normal client shows no avatar, so I must believe the server still doesn't think my client's there
so the question that came to mind is: how does one program fake clients for a torque game? much like a bot on an IRC channel and the such? I just need them to issue a couple of commands over the network, and I need a couple dozens at the very least running from each computer for testing, so how would I go about doing that?
thanks
I'm trying to make a stress testing tool for one of the features in our game, which has a number of different servers the clients talk to (chat server for inter-torque server communication, credentials server for login, etcetera). The design of the transaction we want to stress-test (trade between players) calls for a couple of messages into the server, e.g. a request for the inventory to be persisted in the database, so the clients will talk to the torque server in this, so the client must be logged in into a torque server in order to be able to do this.
Since running even 3 or 4 clients eat up the whole processor, we were trying to run torque client instances without the canvas object, because simulating the whole torque handshake process in twisted (our main networking platform for non-torque related issues) would be stupid, without mentioning that way too hard, since it's already done in torque, but a lot of the functions call for the Canvas object.
So I created another mod which will be invoked by the testerclient which is basically the same as the normal mod without the server-side stuff and without the canvas.
This goes allright all the way up to the scene lighting startup where it dies because of some unrecognize packet which I couldn't recognize. As an awful hack I commented that error handling part in the engine out, and carried on to see what happened. It goes ok all the way down to lighting phase 3, where it dies because it tries to write on the Canvas. So I did this:
function clientCmdMissionStartPhase3(%seq,%missionName)
{
echo ("*** Phase 3: Mission Lighting");
onPhase2Complete();
onPhase3Complete();
// The is also the end of the mission load cycle.
onMissionDownloadComplete();
commandToServer('MissionStartPhase3Ack', $MSeq);
}but it doesn't work either, I just get a % on the console after it tries (and fails, but that should be ok) to load all the textures and stuff and nothing happens. Loging into the mission with a normal client shows no avatar, so I must believe the server still doesn't think my client's there
so the question that came to mind is: how does one program fake clients for a torque game? much like a bot on an IRC channel and the such? I just need them to issue a couple of commands over the network, and I need a couple dozens at the very least running from each computer for testing, so how would I go about doing that?
thanks
About the author
#2
i didn't do that work, so i can't really describe it to you, (sorry!)
here's a thread which may be illuminating:
www.garagegames.com/mg/forums/result.thread.php?qt=13002
i *know* there's another thread out there with the phrase "headless client" in it,
but unfortunately the search functionality on GG leaves something to be desired, so good luck finding it.
10/04/2007 (11:12 am)
What we did was create a client with no gfx at all, just console.i didn't do that work, so i can't really describe it to you, (sorry!)
here's a thread which may be illuminating:
www.garagegames.com/mg/forums/result.thread.php?qt=13002
i *know* there's another thread out there with the phrase "headless client" in it,
but unfortunately the search functionality on GG leaves something to be desired, so good luck finding it.
#3
Orion: do you at least remember if that was done creating and recompiling the engine or just creating a mod that didn't InitCanvas and the such?
The funny thing is that I'm running into very weird problems.. some missing audio files are breaking stuff because it wants to pop out a dialog box and it can't, apparently.. but with the regular client, the files aren't there either and no box appears, it just skips them....
10/04/2007 (11:50 am)
Martin: is that from the server? if so, it's no use, we need to test the network transactionsOrion: do you at least remember if that was done creating and recompiling the engine or just creating a mod that didn't InitCanvas and the such?
The funny thing is that I'm running into very weird problems.. some missing audio files are breaking stuff because it wants to pop out a dialog box and it can't, apparently.. but with the regular client, the files aren't there either and no box appears, it just skips them....
#4
10/04/2007 (12:12 pm)
Ah, yes, server-side, so forget my post please :-)
#5
i think we may have zombified the resource mgr to load all image files as a fixed 1x1 texture as well.
10/04/2007 (2:04 pm)
Definitely w/ engine mods.i think we may have zombified the resource mgr to load all image files as a fixed 1x1 texture as well.
#6
10/04/2007 (2:04 pm)
I think we get about 30 clients on a single normal dev-type windows box.
Torque Owner Martin Schultz