Vehicle sometimes simply doesn't load
by Tcangussu · in Torque Game Engine · 01/31/2006 (6:43 pm) · 12 replies
Hi!
I have created a vehicle and it loads and works well in the engine...
but sometimes when I load a mission it does't load....
I seems that it only happens in a mission with static objects placed in the terrain, but only sometimes, not always...
Someone already had this problem? how I fix it?
Thanks!
I have created a vehicle and it loads and works well in the engine...
but sometimes when I load a mission it does't load....
I seems that it only happens in a mission with static objects placed in the terrain, but only sometimes, not always...
Someone already had this problem? how I fix it?
Thanks!
#2
02/19/2006 (10:46 am)
It happens both with 1.3 and 1.4.
#3
It seems to happen more times if you had more objetcs in the mission
03/06/2006 (1:20 pm)
Well... someone had this problem too?It seems to happen more times if you had more objetcs in the mission
#4
It's TGE 1.4
I'm using starter.racing
This issue happens when I use unicode chr at players name(not always so not sure).
or when I change the players name after loading and unloading a mission. (most of the time)
I didn't study this bug much but it could be realted to script not the engine.
03/24/2006 (7:40 am)
I had that problem too.It's TGE 1.4
I'm using starter.racing
This issue happens when I use unicode chr at players name(not always so not sure).
or when I change the players name after loading and unloading a mission. (most of the time)
I didn't study this bug much but it could be realted to script not the engine.
#5
03/24/2006 (8:41 am)
I've had it too. Tried to track it for a looong time, and never found the problem (TGE 1.3)
#6
Quite frustrating when trying to test a map.
BTW! Happening with Flyingvehicles too
04/04/2006 (2:22 am)
I'm also getting this problem.... and it's like Thiago says... It happens more when there's more objects on the map... Quite frustrating when trying to test a map.
BTW! Happening with Flyingvehicles too
#7
The starter.Racing only waits those 3 seconds for new connetions when counting down and starting the game. When the game has started, and a person connects, it's camera will just be placed in the middle of the world.
In my game I removed the 3,2,1,Go countdown, so this caused the game to start without me sometimes, depending on my loading times. So if your game loads longer than 3 seconds.... you'll literly be hanging (in the center of the world)
In any mulitplayer game this would be a problem. The correct way would be to have a ready, button when on a gui somewhere to make sure all clients are ready.
If you need the script changes... i'll post it.
05/11/2006 (1:22 am)
I think I found the problem. Or at least it's my problem and it fixed it.The starter.Racing only waits those 3 seconds for new connetions when counting down and starting the game. When the game has started, and a person connects, it's camera will just be placed in the middle of the world.
In my game I removed the 3,2,1,Go countdown, so this caused the game to start without me sometimes, depending on my loading times. So if your game loads longer than 3 seconds.... you'll literly be hanging (in the center of the world)
In any mulitplayer game this would be a problem. The correct way would be to have a ready, button when on a gui somewhere to make sure all clients are ready.
If you need the script changes... i'll post it.
#8
I'd be curious to see your changes. I ripped the counter out of my project as well, but it was a rapid "heavy handed" kludge. I've not taken the time to go back and clean up the scripts to do it "correctly. =\
05/11/2006 (10:39 am)
Burning,I'd be curious to see your changes. I ripped the counter out of my project as well, but it was a rapid "heavy handed" kludge. I've not taken the time to go back and clean up the scripts to do it "correctly. =\
#9
If you want to speed up your load time while testing and for single player games, try setting these values:
$pref::Net::PacketRateToClient = "32";
$pref::Net::PacketRateToServer = "32";
$pref::Net::PacketSize = "450";
To keep life simple, just drop these three lines in ~/server/scripts/game.cs (not the right place for them in production multi-player game, but in all other cases this will be fine and will keep them from being over-ridden).
Hall Of Worlds - For Gamers
EdM|GPGT
05/11/2006 (11:53 am)
@Burning -If you want to speed up your load time while testing and for single player games, try setting these values:
$pref::Net::PacketRateToClient = "32";
$pref::Net::PacketRateToServer = "32";
$pref::Net::PacketSize = "450";
To keep life simple, just drop these three lines in ~/server/scripts/game.cs (not the right place for them in production multi-player game, but in all other cases this will be fine and will keep them from being over-ridden).
Hall Of Worlds - For GamersEdM|GPGT
#10
05/11/2006 (11:56 am)
Just don't use those setings if you plan on testing network with dial up ;) I've created an options screen for those settings which includes a drop box with three settings, lan / adsl / 56k
#11
Server is running... and you join and leave when you want.
It's a few minor changes to game.cs
I think you're after a Racing Ready thingy, eh?
I'm sure a Basic Ready GUI for a racing game would be very easy to implement.
@Edward...
Thanx... I'll give them a try
05/12/2006 (12:53 am)
@Kirby... I've only changed mine for a typical multiplayer deathmatch; Server is running... and you join and leave when you want.
It's a few minor changes to game.cs
I think you're after a Racing Ready thingy, eh?
I'm sure a Basic Ready GUI for a racing game would be very easy to implement.
@Edward...
Thanx... I'll give them a try
#12
in /server/scipts/game.cs replace the following functions:
05/12/2006 (1:10 am)
To change the Racing.starter to deathmatch kinda game for whateva reason:in /server/scipts/game.cs replace the following functions:
function GameConnection::onClientEnterGame(%this)
{
commandToClient(%this, 'SyncClock', $Sim::Time - $Game::StartTime);
commandToClient(%this, 'SetMaxLaps', $Game::Laps);
// Create a new camera object.
%this.camera = new Camera() {
dataBlock = Observer;
};
MissionCleanup.add( %this.camera );
%this.camera.scopeToClient(%this);
// Client controls the camera by default.
%this.setControlObject(%this.camera);
// Create a car object.
%this.spawnCar();
if(!$Game::Running)
{
// Orbit the camera around the car
%this.camera.setOrbitMode(%this.car, %this.car.getTransform(), 0.5, 4.5, 4.5);
}
}function GameConnection::createCar(%this, %spawnPoint)
{
if (%this.car > 0) {
// The client should not have a player currently
// assigned. Assigning a new one could result in
// a player ghost.
error( "Attempting to create an angus ghost!" );
}
// Create the player object
%car = new WheeledVehicle() {
dataBlock = DefaultCar;
client = %this;
};
MissionCleanup.add(%car);
// Player setup...
%car.setTransform(%spawnPoint);
%car.setShapeName(%this.name);
// Update the camera to start with the player
%this.camera.setTransform(%car.getEyeTransform());
//Give em Control
%this.setControlObject(%this.car);
// Give the client control of the player
%this.car = %car;
}
Torque Owner Mark Barner
mbarnatl