Munber of slots for mounted Images (MaxMountedImages)
by Mathieu · in Torque Game Engine · 11/12/2006 (6:20 am) · 6 replies
Since TGE 1.3 it seems that the maximum number of mounted objects for a shapeBase was set to 4 (it was 8 before that).
This meens that we can't use slots 4 to 7 for mounting Images, for example this doesn't work:
For our game we really need to use more than 4 slots.
I updated "MaxMountedImages" and set it to 8
It compile fine and now I can use the losted slots (note that documentation still state that we can use up to 8 slots).
I understand that it may have consequences on the TGE network, that's why I would like to know if I will need to make some other changes somwhere else in the source code.
Any ideas? Will this update produce bugs related to network? I am fine with just updating this value?
This meens that we can't use slots 4 to 7 for mounting Images, for example this doesn't work:
%player.mountImage(CrownImage,5);
For our game we really need to use more than 4 slots.
I updated "MaxMountedImages" and set it to 8
enum PublicConstants {
ThreadSequenceBits = 6,
MaxSequenceIndex = (1 << ThreadSequenceBits) - 1,
EnergyLevelBits = 5,
DamageLevelBits = 6,
DamageStateBits = 2,
// The thread and image limits should not be changed without
// also changing the ShapeBaseMasks enum values declared
// further down.
MaxSoundThreads = 4, ///< Should be a power of 2
MaxScriptThreads = 4, ///< Should be a power of 2
[b]MaxMountedImages = 8,//MF old : MaxMountedImages = 4,[/b] ///< Should be a power of 2
MaxImageEmitters = 3,
NumImageBits = 3,
ShieldNormalBits = 8,
CollisionTimeoutValue = 250 ///< Timeout in ms.
};It compile fine and now I can use the losted slots (note that documentation still state that we can use up to 8 slots).
I understand that it may have consequences on the TGE network, that's why I would like to know if I will need to make some other changes somwhere else in the source code.
Any ideas? Will this update produce bugs related to network? I am fine with just updating this value?
About the author
Developer at frogames.com / frogames.net
#2
11/16/2006 (7:37 am)
You should be fine Mathieu. Do note however, the more mounts the more network traffic and server processing.
#3
11/16/2006 (7:46 am)
I think you can mount 32 images, and I read in the forums ... for shapes there is no limit but I do beleive shapes take more network bandwidth than the images. Im using 1.4 & 1.5 though.
#4
11/16/2006 (8:53 am)
... No you can not mount 32 images. You have 32 mount slots, which is totally different.
#5
I don't think that our network traffic will be overwhelmed... I'm more affraid of networks errors by changing this value without any work elswhere in the code.
11/16/2006 (12:13 pm)
Our game have 12 players (humans+AI) with 4 clients.I don't think that our network traffic will be overwhelmed... I'm more affraid of networks errors by changing this value without any work elswhere in the code.
#6
11/16/2006 (12:29 pm)
Shouldn't be nessecary. The bit is there so you can change it and get the same effect everywhere it is used. Of course, reality is another story and it might break something - but try it out. I did and it has worked for a few months.
Torque Owner Mathieu