PDA

View Full Version : Remove client side effects such as damage



SilentEye
29-04-13, 12:57
Currently damage is calculated both client side and server side.

To the user this appears where you take damage, reducing HP, after which the HP pops back up because the attack and damage was only registered client side and not server side.

Another even more important situation where you notice this is when you first zone into an area (take the Regants boss room as an example).

The boss is already dead but on your client he appears alive (as all mobs do when you first enter a zone, despite whether they are dead or not), he even hits you and your health may drop to 0. Then all of a sudden the boss drops dead because the server tells my client that he is dead. Also, the damage I took was only client side and could not be confirmed by the server and so the health is corrected by the server.

So this actually means that on my client, the monster is triggered to attack and so I am hit. All of this happens client side and I wonder why in the world would such events be generated by the client?

Not only does this give me a heart attack, it's wrong and also (maybe) there are situations where the damage is applied when it shouldn't.

Why are these things registered client side anyway? Maybe because of bandwidth issues when this game was first released? It doesn't seem to me like this should be here.

In my opinion, monsters attacking should only be triggered on the client after the server sends a packet claiming the attack. The client should not have the responsibility and/or ability to send these by himself, more so because most of the time they are out of synch with the server and you are left with health going up and down.

Kane Gregory
29-04-13, 13:29
Really good idea. In the limits of neocron the calculations should carried or double-checked from the server. I think a few things like this are fixed in the last patches and I hope some more will fixed in the future.

How it should be:
Client = Slave
Server = Master

Ivan Eres
29-04-13, 13:40
Good one, SilentEye. That's an important issue regarding the technical architecture.

CritiNator
29-04-13, 14:36
Because of lag, client has to do some calculations. Lag is something, that affects every action. Can't escape it. Every multiplayer game has to compensate lag.

Client indeed needs to be slave in mp games and it is so, even in Neocron. What you see, is mostly clients prediction of what happens. Client and server have same code, what comes to AI, damage calculations, collision etc. Server checks from time to time, that Clients variables are up to date, so it can predict actions, that happen in world. If predictions were wrong, server overrides those and corrects the state.
If there would be no prediction, game would be totally unplayable. Prediction creates illusion of lag free environment. Click of button, instantly moves you or shoots bullets from your weapon. There is need for prediction, always.

Prediction creates these ghost damages, standing dead mobs etc. When you see someone clipping through walls and corners thats because coordinates on client gets faulty and server sends fixed coordinates and then client has to either teleport character to new coordinates or smoothly slide from last coordinates to new coordinates.
Neocron network code certainly would need to be look at, but its not THAT far away from standard way of handling stuff.

I have never died on already dead mob ( - fire and poison ).

Lag is horrible thing to multiplayer games.
Even thou you would have only 50ping, it would still take 100ms to send message to server and get it back. Without any processing time included. If theres 10 guys and everyone has different pings, there has to be done some heavy predictions to keep every player looking smooth on your screen. Even thou, you NEVER know, what users are doing now. You only see past and prediction of current time.

PS: I forgot why i started typing

SilentEye
29-04-13, 14:46
While I completely understand where you are coming from CritiNator, I do believe that Neocron is the first MMO I have ever encountered where mob attacks are generated from a client side, this is just wrong.

Take any other MMO; WoW, Guildwars, SWG, SWTOR, you will sometimes fight a mob and have a lag spike, during that lag spike, the monster does not attack you, and you'll be stood there waiting for the spike to finish, or a disconnect :)

That's what it should be like if you ask me :)

The thing here is that if you let the client generate monster attacks, the user will respond (sometimes wrongly), panic, run, what ever, it's just not right :(

eNTi
29-04-13, 15:48
Even thou you would have only 50ping, it would still take 100ms to send message to server and get it back.
actually i think ping (or round trip time) is the time the message needs there and back.

SilentEye
29-04-13, 15:53
actually i think ping (or round trip time) is the time the message needs there and back.
This is true. Ping equals the time it takes between sending the packet and receiving a reply packet back.

CritiNator
29-04-13, 16:18
Yeh, ping is round trip time. My bad.

On other games i have died several times in lag spikes, because while client is not showing it, mobs do continue to hit me. So, when lagging ends, i die. Ever happened to you?

So, in a way, Neocron does this better than other games?

Anyways, all those things you described are direct cause of client side prediction.
Without it, everything would be jerky and unplayable.

Client simulates world and predicts mob movement, that's why dead bodies are not always in the same place in other players screens. That's why you sometimes take ghost damage. Client simulated and predicted damage, but because it's state was not same as in server, server's next packet overrides it.
Server runs the actual world and actual mob AI. Because they both use same code, most of the time its correct and server does not need to interfere clients business.

SilentEye
29-04-13, 16:32
You're trying to sweet talk the whole thing. I do agree with you that the client should make predictions to provide the user with a smoother gameplay, but I do not agree on it regarding damage.

In my opinion the client should not generate monster damage if the server is not sending this data, simple as that. I disregard all your other points because I am very simply talking only about the damage from monsters here :)

CritiNator
29-04-13, 20:50
Yeah, but if damage is not predicted also, you would not get feedback from fights in realtime, instead you would get them in chunks caused by latency and possible *hic* 's of server. ( As i said previously, on lag spike, you would just die when its over ). Now you pretty much get what you get and server fixes it later. I certainly have ran more than once with 0 health and thats cause faulty parameters on clients side. Lucky us, server knows better.

Also note, that it's server who decides who dies and lives, you will not die, if your client decides to set health to 0.

If they really are considering and creating new client with Unity3D, then this kind of stuff can be fixed at once.

SilentEye
29-04-13, 21:40
Well then we've got a different opinion on this. Like I previously stated, no other MMO has client side damage, PvP or not.

CritiNator
29-04-13, 22:14
Its not real damage.

SilentEye
29-04-13, 23:20
Further point out the previously established obvious, please.

Nidhogg
30-04-13, 00:00
Consider that there's a continuum of games with titles like Halo multiplayer on one end, and WoW on the other. One has to track a small number of simple entities very quickly, while the other models complex sets of numbers and probabilities but with a vastly simpler movement and targeting system.

Now consider where Neocron sits in that continuum and think about what it has to do to give a convincing impression of both ends using the limited technology and bandwidth of PCs and the wholly unreliable internet.

Does Neocron pull it off perfectly? No. But is it as simple as removing client-side damage? Absolutely not. Also think about how long Neocron's being pulling off this remarkable feat. :)

I'm currently working on a system that will eventually get around this issue. The client makes a connection to the server and receives a quantum-entangled session packet in return. This connection packet itself can be communicated via any classical means and once the connection is made further communication happens instantaneously regardless of distance from the server. The client and server maintain equal but opposite entangled states and all the client has to do is multiply the packet by its complex conjugate to render real numbers that can be used to calculate positions and damage, at which point you have completely lag-free gameplay.

Of course when I say "a system that will eventually get around this issue" I really mean "a piece of toast", and when I say "currently working on" I really mean "eating".

The first part is true though. :)

Netphreak
30-04-13, 01:11
Consider that there's a continuum of games with titles like Halo multiplayer on one end, and WoW on the other. One has to track a small number of simple entities very quickly, while the other models complex sets of numbers and probabilities but with a vastly simpler movement and targeting system.

Now consider where Neocron sits in that continuum and think about what it has to do to give a convincing impression of both ends using the limited technology and bandwidth of PCs and the wholly unreliable internet.

Does Neocron pull it off perfectly? No. But is it as simple as removing client-side damage? Absolutely not. Also think about how long Neocron's being pulling off this remarkable feat. :)

I'm currently working on a system that will eventually get around this issue. The client makes a connection to the server and receives a quantum-entangled session packet in return. This connection packet itself can be communicated via any classical means and once the connection is made further communication happens instantaneously regardless of distance from the server. The client and server maintain equal but opposite entangled states and all the client has to do is multiply the packet by its complex conjugate to render real numbers that can be used to calculate positions and damage, at which point you have completely lag-free gameplay.

Of course when I say "a system that will eventually get around this issue" I really mean "a piece of toast", and when I say "currently working on" I really mean "eating".

The first part is true though. :)

Where is a like button when you need one. Lol

I have noticed the bouncing health bug happening more often there days than I remember though. There was a thread on it not thread long ago explaining how you sometimes died due to it. (2 successive hits)

eNTi
30-04-13, 11:47
...of course when I say "a system that will eventually get around this issue" I really mean "a piece of toast", and when I say "currently working on" I really mean "eating".

The first part is true though. :)
so you are basically saying you are eating quantum entangled toast? also, stop trolling or you will have to ban yourself!

on a more serious note... the problem with the client side calculation is actually twofold. it ties in with my the missing projectiles bug i was reporting. sometimes you will be hit by multiple projectiles server side, which the client didn't predict. the damage would register but you wont get any feedback other than you dropping dead in an instant or at least be very low on health all of a sudden.

Izeo
02-05-13, 15:15
Networking is something that is a tiny bit over my head, but I had what I felt could be, not necessarily a solution, but a slight improvement.

The problems of the client taking damage by both the server and the local behavior definitely has downsides, as SilentEye said:
- it gives you a heart attack sometimes (you see your hp drop to 0 from a single hoverbot laser, and then you have to wonder for a while if you will indeed die or if your hp will update back up)
- it actually adds a probably unintentional level of difficulty, mostly affecting low level players

I'm all for difficulty. If I could choose to make or play a game, and I had to pick between VERY EASY, or VERY FRUSTRATING AND DIFFICULT I would choose the latter. However, in this case, the difficulty is the result of something that feels incorrect.

What I'm talking about precisely is when your legs are damaged on your client side, by for example aggressors. The most likely place to notice this is a low level fighting aggressors. Imagine you are a low level character in the sewers. Two captains spawn on you when you don't expect it, and begin shooting you. You begin to run. Your legs are shot, which slows down your runspeed. You JUST make it to the door, when your HP/status updates from the server -- your legs are healed! Your legs were never broken according to the server. However, you still took so much damage while moving slowly on your client, and you die before you make it through the door. This means you were punished for LOCAL dicerolls and not server dicerolls, which is maybe a little bit unfair.

However, there are benefits to receiving "double damage" on your client, and that is, you can sometimes test your durability a bit. If you get hit on your client by peeking out of a corner for a second by a laser to the face, freak out, and then back behind cover, you might find that your HP goes back to full and you never got hit, probably because you didn't peek out far enough (or for long enough) according to the server in order to be hit. This is actually a nice (even though it's sort of "cheating" in a way, hehe) advantage to this feature.

So, the possible improvement I thought of is this:

Your true HP is represented by the server, as it is now. However, what if when we take damage on the client, instead of behaving the same way as "real" missing HP (and injuries i.e. broken legs), it instead just is illustrated on the health bar as a different shade of green.

I don't really feel like drawing an image right now but here goes

Let's say I have 500 out of 800 health. My HP looks like this

####################------------

Let's then say that I take 700 damage on my client, from a hovereye shooting my legs. Then, the first 100 HP is still colored as the solid green, the 700 client side damage is represented as shaded darker, like this.

####:::::::::::::::::::::::::::::------------

even though it broke my legs on my client, I shouldn't yet get the movespeed penalty, because it's not confirmed by the server yet. It's just a 'guess' of "hey, look out, your health MIGHT be this low"

anytime the server updates your 'real' HP, any 'client dmg hp' gets wiped. If the server updates, and I was lucky and I never actually got shot at all, then it just goes back to the first bar. If I did get hit, however, then it wipes the client dmg and updates my real health

####-------------------------------------

now I'm almost dead, and NOW since my legs are broken, confirmed by the server, now I walk slowly.

nabbl
02-05-13, 15:43
haha nice idea :P

You could call it "the dodge-effect".. You got a certain chance that you're health gets resetted and excuse a buggy game behaviour with that.

SilentEye
02-05-13, 16:05
I appreciate the well thought out sugestion Izeo, but I'm still of the opinion that there should simply be no client side generated attacks from monsters.

If the server does not send out an attack signal there should be no attacks on the client which equals, no bouncing health.

Ivan Eres
02-05-13, 16:46
I don't think a a multiplayer game is possible nowadays without client side calculations. At least not without quantum entangled toast, that is.

So optimizations yes, remove completely - no.

SynC_187
02-05-13, 16:52
I appreciate the well thought out sugestion Izeo, but I'm still of the opinion that there should simply be no client side generated attacks from monsters.

If the server does not send out an attack signal there should be no attacks on the client which equals, no bouncing health.

The problem is that this netcode is what makes a FPS stand apart from an RPG. Yes Neocron doesn't do it as well as modern mainstream FPS', but I would prefer my health to bounce than not realise I'm being attacked until I suddenly drop dead, which is what would happen to anyone with a bad connection/lag without the clientside prediction.

You have a choice, health that goes down suddenly (depending on the lag you could suddenly receive a large number of hits at once), or health that goes down as a warning of what is happening and then corrects itself.

I acknowledge that neither is ideal, but I don't see a big revamp of the netcode happening, so it's a case of the lesser of two evils.

Eternal Pink
02-05-13, 19:38
We've all had this but there's something I've noticed recently on my tank that doesn't quite add up on the client/server damage rules/override.

I've been using a doom beamer in chaos caves for levelling and once in a while I will accidentally hit myself, since i'm wearing camo PA and carbon armor getting smacked by a artifact doom beamer hurts ( a lot ) and since its due to me misfiring and hitting myself that damage should stay.

Yet quite often it doesn't and I bounce back up to full health.

So is the server deciding that actually my shot didn't go astray (not noticed mobs taking damage when this happens) or is it just discounting (wrongly) the damage I've done to myself with a full on doom beamer hit on my client?

eNTi
02-05-13, 19:50
The problem is that this netcode is what makes a FPS stand apart from an RPG. Yes Neocron doesn't do it as well as modern mainstream FPS', but I would prefer my health to bounce than not realise I'm being attacked until I suddenly drop dead, which is what would happen to anyone with a bad connection/lag without the clientside prediction.

You have a choice, health that goes down suddenly (depending on the lag you could suddenly receive a large number of hits at once), or health that goes down as a warning of what is happening and then corrects itself.

I acknowledge that neither is ideal, but I don't see a big revamp of the netcode happening, so it's a case of the lesser of two evils.
actually prediction doesn't fix anything. it just shifts the problem. i still die from damage spikes. not because the server lagged (even though that still happens occasionally) but rather because the client made a wrong prediction. this happens much more often than you might think. since i'm hunting a lot of fire mobs and dodge much around edges where prediction becomes unreliable. very unreliable. the mob's ai also seem to use some kind of prediction that thinks it can hit you when in reality it doesn't. that's why grim reapers/chasers are easy as pie to take down. if i guess correctly prediction happens on a bounding box (sphere) center to bounding box (sphere) center los algorithm and that's a very imprecise way to do things in an fps. since players actively got 3 hit zones it's even more buggy. grim persecutors fire on all 3 hit zones at once, but chasers only hit one zone and often shoot against walls because of that. to "fix" the issue life and damage had been raised significantly which makes it nigh impossible for apus to hunt anything. you are basically one shot by those mobs. they fixed bad design due to engine limitations with more bad design.

lag still kills you even though you are sometimes saved by client side prediction. i still believe it's not worth it especially since you are sometimes killed by the same prediction.

Netphreak
02-05-13, 19:59
We've all had this but there's something I've noticed recently on my tank that doesn't quite add up on the client/server damage rules/override.

I've been using a doom beamer in chaos caves for levelling and once in a while I will accidentally hit myself, since i'm wearing camo PA and carbon armor getting smacked by a artifact doom beamer hurts ( a lot ) and since its due to me misfiring and hitting myself that damage should stay.

Yet quite often it doesn't and I bounce back up to full health.

So is the server deciding that actually my shot didn't go astray (not noticed mobs taking damage when this happens) or is it just discounting (wrongly) the damage I've done to myself with a full on doom beamer hit on my client?

I've noticed strangeness like that before awell.
Main issue these days is when say leveling at mb bunker and you take 2 successive hits from launchers within 1-2 seconds and you die. Even though used easily survive 2 hits if there was enough time between shots for the hp bounce/client-server sync to happen.

Ivan Eres
02-05-13, 22:39
We've all had this but there's something I've noticed recently on my tank that doesn't quite add up on the client/server damage rules/override.

I've been using a doom beamer in chaos caves for levelling and once in a while I will accidentally hit myself, since i'm wearing camo PA and carbon armor getting smacked by a artifact doom beamer hurts ( a lot ) and since its due to me misfiring and hitting myself that damage should stay.

Yet quite often it doesn't and I bounce back up to full health.

So is the server deciding that actually my shot didn't go astray (not noticed mobs taking damage when this happens) or is it just discounting (wrongly) the damage I've done to myself with a full on doom beamer hit on my client?

I get the same reproducable effect with an AoE drone like the RG or RK. If a shot hits the ground before me my health bounces back as if nothing happened. After 2-3 more shots it starts to register the health loss.

The location was Chaos Caves too.

SilentEye
02-05-13, 23:16
That's a good point to add. Drone health is actually server side. You don't have bouncing there.

Now tell me honestly, doesn't that play a lot nicer?

CritiNator
03-05-13, 09:10
That's a good point to add. Drone health is actually server side. You don't have bouncing there.

Now tell me honestly, doesn't that play a lot nicer?

And yet we have all those threads about drones losing 30%+ damage suddenly and then explode.