Game Development Community

Explosion Effect & Sound on client

by Kostas Karpouzis · in Technical Issues · 07/17/2007 (7:26 am) · 6 replies

Hello everyone!

I need your help as i face a problem...
I have an onCollision() function in which my WheeledVehicle collides with a mine and the mine is blowing up.
i have made an effect for this reason and i have also added a sound for the collision event.

The point is that everything is ok at the server side but nothing happens at the client side.
There is no sound and no effect. The mine diasappears, the lifebar is decreasing as it should to, but nothing else happens and i cannot find where my fault is.
I have read some other theads about it but i didn't manage anything.

Any help will be much appreciated!

Thanks.

#1
07/17/2007 (7:43 am)
If I remember right there is a patch for TGE to be able to spawn from the server client side explosions. Don't remember the name of that resource (net explosion?), but maybe a search helps with these keywords.
#2
07/17/2007 (10:15 am)
Martin, thanks for the quick reply but unfortunately the research for net explosion didn't help...I still cannot see the explosion on my server.
Is there any hint about where the problem is or where else to search abou it?
#3
07/17/2007 (6:21 pm)
Explosions themselves are never networked in stock torque--explosions happen client and server side by an arcane routing through a projectile being destroyed.

In stock, you cannot simply have an "explosion" without a projectile that collides (and therefore destroys itself)--you will want to look at how the explosion itself is created client side (check out the Projectile::onCollision) code, and work on networking the important aspects.

An alternative solution is simply to send a network event (commandToClient should fit the bill), and implement the explosion that way on the client--send the location, type of explosion, and other appropriate data within the commandToClient, and implement the explosion that way.
#4
07/17/2007 (10:38 pm)
Hah! I found the resource again, here is it:

Creating explosions on the server

Works pretty sweet for us.
#5
07/19/2007 (6:23 am)
Martin,first of all thanks for the recourse!!

But i have a question... Does it work for you?
because when i am trying to compile it i get some errors like:
Quote: c:\torque1_5\sdk\engine\game\net\net.cc(310) : error C3861: 'mathWrite': identifier not found

Does anyone have any idea of what's going on?
#6
07/19/2007 (6:43 am)
Yes, it works for us, but I wasn't the one who put the file into our repository. It works for us in a TGE 1.5 version flawlessly.