Game Development Community

Bot" client mod

by AlexanderSLG · in Torque Game Engine · 10/03/2007 (2:41 pm) · 0 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:

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