[scion multiplayer] bullet impact effects

Posted By: darkinferno

[scion multiplayer] bullet impact effects - 04/06/11 17:32

so basically there are a few methods for spawning global impact effects in a multiplayer [shooter], impact effects are what you see when you or another player shoots an object, this is targetting dynamic objects on a network game however

first method - clientSide shot recreation
in this method, when a player shoots, he sends that info, all players then retake the shot and create effects locally for that new shot, you also can send less data this way because you can just send a shot signal to players and they'll shoot accordingly

this isnt the fastest method however since youre running a trace for each shot also it only works best for static objects:

if a highpinger shoots a moving object/player he sees at position (50,50,10) then what happens is, by now that player would be at a different position on other clients, say (75,3,10) when the shot is recreated on their pcs, the effect fails because the traces hit nothing, you see the bullet impacting other surfaces yet you see someone die as shown in the pretty sketch, left side shows what the player that shoots sees, right image shows what other players see under lagged network conditions:



this is quite common in multiplayer games, too see bullet traces missing yet the player taking damage which leads us to

second method - positionBased creation
in this method when a client shoots someone or something, he sends the position of where HE created that effect to everyone else, all other clients then spawn the effect on that position, that looks good in good network conditions, but if not, you'll see effects being spawned in the air when the object they supposedly hit has already moved:


and i know your thinking, why not just create the effects relative to the entity, which leads to the

last method:
this also works ok under good conditions, i assume it needs to send a bit more data though, however under bad conditions, it may look weird when someone is being shot at, runs behind a wall, and you start seeing impacts created on him AFTER hes in cover, to be honest, i'm a bit scared of this one, i remember in gears of war where someone would run away from a sniper bullet, get into cover, then his head spontaneously pops because the bullet did actually hit on the client that fired it:



the second method seems like the more effective choice, netword conditions would have to be pretty horrible for it to look bad and i think i may combine it with the last method, i havent decided yet, so if you have a better solution in mind, let us know

i've also started a blog and would love your support: http://scionwars.blog.com/
Posted By: SchokoKeks

Re: [scion multiplayer] bullet impact effects - 04/06/11 19:52

This post is definitely a must for everyone creating a multiplayer shooter (and there are quite a few people here doing so!).

For Survive! i use the first method. Its good because of its relativly low bandwidth and the side effects are usually not noticeable in a cooperative game.
Posted By: painkiller

Re: [scion multiplayer] bullet impact effects - 04/07/11 16:25

I use second one in Assault!
Posted By: ShoreVietam

Re: [scion multiplayer] bullet impact effects - 06/20/11 13:09

Thanks for this visualisation!

Due to your explanations I found a website showing how Valve tries to come along with this problem. This article is very interesting, but it sounds quite complicated, too.

I'm not sure which way to go, I'll keep thinking about it a bit. ^^
Posted By: darkinferno

Re: [scion multiplayer] bullet impact effects - 06/20/11 14:31

i talked about that method in my post here http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=374599#Post374599

its a bit complex how they do it but i broke it down a bit to how it could work for me and do similar
Posted By: exile

Re: [scion multiplayer] bullet impact effects - 06/27/11 07:03

I think there should be a tutorial on how to do certain types of shooting in online MP. Like, how to use the methods posted above with trace, impact, and explosion weapons.
© 2024 lite-C Forums