Game Development Community

Maximum number of Mounts?

by Quest Johnny · in Torque Game Engine · 01/29/2005 (9:41 am) · 11 replies

Does anybody know if there is an arbitrary limit on the number of mounts (mounted images) you can have on an object in torque, e.g., guns and backpacks and flags and so on - or if it's limited only by memory?

#1
01/29/2005 (12:47 pm)
There is a limit because each slot, used or not, takes up a little bit of network bandwidth. :) Look for constants like MaxMountedImages.
#2
01/29/2005 (1:48 pm)
Thanks again, Ben :)
#3
08/12/2005 (8:40 am)
How much bandwidth are we talking about, here? I've got a vehicle that requires a lot of mounts (probably close to 15). But not every person will be shown on the screen, they might come upon another player like you do in MMORPG games, once in a while.
#4
08/12/2005 (11:04 am)
As I understand it (thanks to googling these forums) theres a limit of 8 IMAGES, and 32 OBJECTS.

Each object has 8 state machines, there's a bit in the netmask for each image, and so on. It's hard to change, but possible. There's a resource.


But you can have 32 objects mounted (though I haven't seen a limit in the source, they're kept as a linked list), acording to a post I found.

So lets say you're trying to build a battleship, complete with all the AA, cannons, depth charges, and so forth. No way that'll work with 8 images. But each heavy turret could be a single object, with 3 images (or one fancy one) mounted to it. Heck, you could build the ship such that parts of the superstructure had to be mounted as objects just so you could build more stuff off of those superstructure objects as well.

From what I've read, there is an engine limit, you can get around it without messing with the engine source... but you can also use the "more images" resource to get more that way too (though there's still a limit, just a larger one).

Lets see if I can dig up a couple links here...
Image resource: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6723

Here's one conflicting a bit with what I read earlier. It states (in the first A in the Q&A near the bottom), that you can have 32 mount points, any number of mounted objects, and 8 images. www.garagegames.com/newsletter/community/jun2002/

So take that what I said earlier with a grain of salt.


You could still compose just about anything out of a combination of mounted objects and images, with sufficient creativity.

We're planning on building a supertank using this sort of thing. Several small turrets on the main hull. One Really Big Turret with quite a few smaller turrets mounted on it too. Come to think of it, I don't believe we'll have any images mounted directly to the hull (maybe a couple for radar dishes and the like). But we want everything to be individually killable, so images won't cut it (I don't think images have health, though you could probably work something out in script if you felt properly motivated).

EDIT: Nope. Images don't have health. Or energy, or much of anything:

www.garagegames.com/docs/tge/engine/structShapeBase_1_1MountedImage.php

--Mark
#5
08/12/2005 (11:27 am)
Good answer, beat me to it. :)
#6
08/15/2005 (10:32 am)
Do keep in mind that for complex objects like a battleship you're probably a lot better off writing a new object that implements all that functionality in and of itself, rather than bending the networking system in odd ways to get the required effect.

It's the difference between telling someone to "drive to Wal-Mart" and giving them a detailed list of times and steerring wheel rotations.
#7
08/15/2005 (1:35 pm)
@Ben: Really? Would you care to expand on that?

Are you suggesting a "turret" class with only the required attributes to reduce net traffic, or some new kind of Player-Derived (maybe vehicle or shapebase) Thing that would handle everything directly?

And would your suggestion change if you knew the game was going to stay single-player?
#8
08/15/2005 (2:26 pm)
Well I'm working on an online game, so while this effect works perfectly (thanks for the help, by the way), I'm always interested in "a better way" to get things done. What are you trying to say, Ben?
#9
08/15/2005 (6:41 pm)
That if you make a custom object, it's always going to outperform a solution based on more general purpose hooks. If you need a super complex battleship, you might be better off designing it from the ground up in the context of Torque's subsystems, rather than using mounts & helper objects to try to acheive the effect.

But this takes significant engineering effort, and it may be better in the context of your project to just go with the general purpose solution.
#10
06/24/2010 (2:13 pm)
Hate to re-has an old thread, but...

Do the mount points have to be "in order" when I setup the mesh in Max?

Example:
I have a character with 3 mount points already. 2 are used for weapons and the 3rd for a specific game mechanic (carrying objects).

Now I have a "special" character that needs mount points for emitters (I've implemented a resource that allows emitters to be mounted to objects and actors). This special character is a 4-legged creature that will have an emitter on each foot.

The mounts I have now are:
mount0 = Weapon 1
mount1 = Weapon 2
mount2 = Carry Object

I'm wondering if I can start at the other end:
mount32 = Right Rear Foot
mount31 = Left Rear Foot
mount30 = Right Front Foot
mount29 = Left Front Foot

Obviously, this would leave out mounts 3-28. Any problems with that?
#11
06/24/2010 (2:42 pm)
FYI:

I did some testing and mount 31+ didnt work. I used numbers:

30,29,28,27

Works fine, even with skipping mounts 3-26. In-game, you call them based on their names in Max.

Oh, and this works in TGE, TGEA, and T3D. :)