Author Topic: [Question] How does the brick limit work?  (Read 11264 times)

Not through a scripted add-on, or any kind of mod you could release publicly. Theoretically possible, but the number of people in this community capable of actually doing it could probably be counted on one hand, and it's not really that great of a solution anyway.
Well, you "could" delete the bricks on the client side.
I've tried it and on one brick it worked fine, but when I went and deleted everything it crashed me in a second.
Though, I believe that was because I was standing on where a brick once was and my client told me that I was in a position the server didn't like and had errors.
But as for re-ghosting the bricks again, I'm not sure if that would be possible without requiring to retransmit the brick data back and placing it again.

Edit: Attempted to go very far from the spawn and delete all bricks, worked allright. But once I was within range to see players I got an invalid packet error.
Like I said, I believe if you recreate the bricks within rendering range it'll work fine.
« Last Edit: December 08, 2014, 02:17:50 AM by Pah1023 »

Well, you "could" delete the bricks on the client side.
I've tried it and on one brick it worked fine, but when I went and deleted everything it crashed me in a second.
Though, I believe that was because I was standing on where a brick once was and my client told me that I was in a position the server didn't like and had errors.
But as for re-ghosting the bricks again, I'm not sure if that would be possible without requiring to retransmit the brick data back and placing it again.

Edit: Attempted to go very far from the spawn and delete all bricks, worked allright. But once I was within range to see players I got an invalid packet error.
Like I said, I believe if you recreate the bricks within rendering range it'll work fine.
Yeah, torque doesn't like it if the client gets an update about something that shouldn't exist. The server won't transmit updates about stuff that's really far away, or stuff that doesn't really need to be updated much like bricks, but when it does send the update, it'll break. Need the engine to reghost the deleted brick before the update goes through. Not enough ways to interact with the ghosting system through script for an add-on that does this to be viable.

I'm not one to bump old topics, and I know this shouldn't be a problem anymore since that we have a much higher brick limit.
But it's actually possible to clear the ghosted objects, then have it re-rendered.
I just would like to discuss it, in-case any use should come of it in the future.

Using GameConnection::resetGhosting() we can clear all of the ghosted objects.
Then we can use GameConnection::activateGhosting() to re-ghost it.
I just tested this by loading a large sized build and ghosted it, then toss my self over to 10,000 10,000 0 using transform and reset followed by an activate.
I then Self Delete to get back to the center and saw that it re-ghosted.
So yes, before we might could've had more than 256k bricks and render portions at a time.

Using GameConnection::resetGhosting() we can clear all of the ghosted objects.
Then we can use GameConnection::activateGhosting() to re-ghost it.
I just tested this by loading a large sized build and ghosted it, then toss my self over to 10,000 10,000 0 using transform and reset followed by an activate.
I then Self Delete to get back to the center and saw that it re-ghosted.
So yes, before we might could've had more than 256k bricks and render portions at a time.

findLocalClient().resetGhosting() crashes me immediately, regardless of whether or not activateGhosting is called right after it or not

findLocalClient().resetGhosting() crashes me immediately, regardless of whether or not activateGhosting is called right after it or not
Might have issues with non-dedicated servers. I tried it through eval on a dedicated server once and it worked perfectly.


This is what I used
I thought findLocalClient would only return the host of a non-dedicated server. Don't have the documentation with me, though. In any case, I used it when the hammer forgeted up and destroyed a bunch of extra bricks on my end that it didn't break on the server, and it worked perfectly, so it works in some situations at least.

I thought findLocalClient would only return the host of a non-dedicated server. Don't have the documentation with me, though. In any case, I used it when the hammer forgeted up and destroyed a bunch of extra bricks on my end that it didn't break on the server, and it worked perfectly, so it works in some situations at least.

Oh er, oops, I don't mean findLocalClient. Regardless, looking back, it's probably because I didn't teleport my control object away.

Oh er, oops, I don't mean findLocalClient. Regardless, looking back, it's probably because I didn't teleport my control object away.
I didn't teleport away when I tried it. Was right in front of the bricks I was working with. I actually did them separately, so there was even a period where nothing was ghosted. Worth looking into it more to figure out what context it crashes in.