Game Development Community

More space to objects..

by Jan Sorensen · in Torque Game Engine · 05/04/2003 (6:41 am) · 17 replies

Hi all.. please hope for help..

I work on a project (a map) with many objects. There is ostensible (hope it is the correct word) a border in Torque on a numbers of max 1024 objects, is it possibly for me to increase to fx. 2048 objects ? Where shall I look and change.

Best regards SorensenDK

#1
05/05/2003 (12:08 am)
thats alot of objects...
#2
05/05/2003 (2:39 am)
I've got the same issue.
Here's a post with what I came up with. Wich refers back to another post with some info.
http://www.garagegames.com/index.php?sec=mg&mod=forums&page=result.thread&qt=10149

However.. that's not enough..

I personally haven't spend much more time on it, thought I'm still very interested in the proper solution.

However those lines in those posts might help you a bit.

If you do find more related code lines... be sure to post them... eventually someone's gotta find a solution.
#3
05/05/2003 (4:33 am)
Hi Keek.

Thanks for your answers, uhhh its look not easy to come with a fast solution, buuut I'm still a live.
If I fund a good and stable solution in the .cc code, I will come back to the forum, I'm sure other has the same troubles with "only" 1042 objects.
I still hope, maybe other here in the forum has a good answer to us.
#4
05/05/2003 (4:59 am)
I've actually seen the piece of code that causes this limit...I'm just not sure where atm...I'll look into this later today.
#5
05/05/2003 (5:05 am)
Like I suggested in the previous posts,

enum { MaxGhostCount = 1024, GhostIdBitSize = 10, GhostLookupTableSize = 1024 };
in sim/netconnection.h
Is the base limiter. However,

stream->writeint(gindex,10);
in various files is used where it should be
stream->writeint(gindex, GhostIdBitSize);

But even doing that doesn't fix it fully as crashes occur when interiors and tsstatics get deleted.
#6
05/05/2003 (5:22 am)
My bad...I was thinking of the piece of code in map2dif that limits you to 1024 brushes per interior.
#7
05/05/2003 (1:11 pm)
All object IDS are sent over the network connection with only 10 bits of precision so you'll have to track down everywhere an ID is sent and fix those as well.
#8
05/05/2003 (5:13 pm)
Hi, I was reading this and I got an interesting idea.

I'm assuming the only way you can go over so many objects is by creating small map details, ie decoration.

One instance of decoration like this is trees and grass. Melv May did an excellent job at implementing thousands of grass objects through 1 ghosted object. Simply make a lot of sub-objects.

I'm wondering if a similar sub-object type approach could be done with level decor?
I know it is a little different, but not too much. Of course, it depends on what you are adding, I'm just assuming the objects are little bitty things.

And with construction mod, Sebastian, maybe you could do something that would link pieces together, and detect this, and then conglomerate them into 1 major object that has true ghosting logic.

All the sub-objects would be handled by the parent object.

It's not too complicated an idea, but even as I'm saying it, it sounds kind of impractical. Hard to implement, at least.

But it would get around the object problem (in most cases... 1024 players in 1 game would have so many OTHER issues, I'm doubting that this is what you are going for)

Just an idea.
#9
05/06/2003 (4:04 am)
Hi all again..

Thanks for the answers. To Max,, its seem exciting, but I'm don't sure I understand you correct... what is rhmm a "sub-object" "link pieces together and detect them" ?, there are still many new things for me in Torque *S*..

You can all see my project on: http://www.rhesus.dk/realhunter/project/project.htm and see what I use so many object (1024) for / to.
#10
05/06/2003 (6:31 am)
Lisa, from what I see your project could make good use of joint objects.. tho not in the direct sense Max is putting it.

From the screenshots I saw for example a school (or the likes) with chairs and such in them.
Well.. I don't know if you already got it this way... but... it's possible to model the school such that the building, the chairs and anything in it is 1 object. While this is more moddeling work.. it requires no extra coding..
Also.. 1 town.. could infact be 1 model.. more modeling work.. but you can have 1024 towns.. ;)


As for my project... incidently.. I actually already made an object that's able to house multiple shapes. However.. they can't be predifined models (like .dts).
The only problem is the collision code wich I simply don't understand.
#11
05/07/2003 (1:33 am)
To Keek and others..

Its not a school, it's a restaurant, see text under the pic.. *SS*.. Okay what ever.. Al my buildings and the inventory, chairs, tables, pic on the wall, lightning and so, is make as one object in my Radiant ("Hammer").
Okay its possible to make a whole town on this way, but I cant make the major consumer of objects,, the trees, because I don't can make "shaderfiles" (mask out bough and leaf) "ooops my English *S*" in Torque, as I know ?
So, sum and sum arum,, there is only the hard way... the .cc files in the graphic systems. Therefore I'm still hope for a nice C++ / Torque expert some day will here my prayer and tell me what we / I shall do, so I can continue with my project.
#12
05/07/2003 (1:48 am)
Lisa,
if the trees etc. are the problem you should be able to use Melv May's fxShapeReplicator for them... you can let it generate hundreds of trees at once in certain areas, and AFAIK only the replicators would be "counted" as objects in that case ... (the replicator only transmits its position, radius etc. and a random seed over the network I think) - so, even if you place 1000 trees with the replicator, only 1 object is transmitted... I could be totally wrong, but I think you won't hit the 1024 limit with that approach...
worth a try ;)
#13
05/07/2003 (5:46 am)
Hi all again..

Thanks Stefan for your answers, it sounds very exciting, maybe this is the solution for my problems.. but please tell me where I can find "Melv May" and the "fxShapeReplicator".

I have try to make a "test-town" with 24 small house without anything' else, as one object, BUT, Hammer gives up after looooong time .. Hammer was only able to compile 8 of them on one time (a very little town), so no help here..
Maybe I can loose my problems with a very slowly strategically placement tactic. One little object here, 4 houses in one object here, one house as one object here (a solo placement), count my objects,, a single tree here, a group of trees there (place with "fxShapeReplicator "), count my object again and so on... Its become a looong lonely night *LoL*. All this because I don't know where I shall place "2048" and "11 Bit" in the source code *dam*..
#14
05/07/2003 (5:55 am)
Oops, sorry, should have included the link in the first place...
here you go: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2422
And there is also the fxFoliageRepliator and fxGrassReplicatior for bushes, trees, ... and well, grass... ;) this search should lead you to all the replicators: www.garagegames.com/index.php?sec=mg&mod=resource&page=result&qtm=replicat
cheers,
beffy
#15
05/07/2003 (1:37 pm)
Hi all again / again..

First thanks to Stefan for the links *S*. I have download the Repliators, but not try to use them yet, its come.

I have try some experiments with "a test-town object" there only use "one object", it looks promising. Okay it must be the way to do it. So wish me luck, a big job stands before me.. but a good job, I can make better details in my map on this way.

For now, thanks to all for the support and hints..
#16
05/07/2003 (1:46 pm)
That looks very promissing... and it'l surly give you some more freedom to create more stuff without the object limit forcing down on you.

So what exactly are you making?.. it looks like an 3d map of an real life place... very impressive tho.
#17
05/08/2003 (3:13 am)
Hi again.

To Kek and others.. Everything is still in the "research phase" and I'm just try to work with the systems to se how fare I can get and its look good for now.
More about my project will come, when "the balloon is come higher up" *LoL*.. Ohhh,, I know, I'm writing in Danish with English word *S*..