Thoughts on ping

From Armagetron
Revision as of 17:22, 7 October 2006 by 2020 (talk | contribs) (→‎5)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

just a temporary file since my post was too long for the forum but i need to think this through whatever blaaah

1

without a central server how do you determine the outcome of an event eg player A took a turn to avoid death but on player B's computer because of lag it simulated that A didn't turn and he died so we have the contention: Player A's version where he is alive and player B's where he is dead and hence the traditional assumption to establish a centralised arbiter the central server where the simulation is run

however if there is contention what happens if the computers between themselves resolved this?

if the speed of information one way matches the fps of the simulation then the player is none the wiser

on a machine running 25fps that's 40ms one way


another way of thinking about it for me at least it doesn't really matter whether my computer is receiving that message from my wireless keyboard or from a keyboard elsewhere attached to another computer in another country

it doesn't matter as long as it is fast enough for me not to have to wait

the problem arises when machines are so far apart that the ping/2 is slower than the fps rate of 25 there will be a delay hence the contention

which machine has the authority?

but machine B would obviously accede to the authenticity of machine B's calculation it is not a contention of argument but merely lack of information surely machine B would correct itself hence the use of rubber which enables the machine to delay its determination of death of player A and if player A didn't turn fast enough then sure enough there is a death if player A did turn and avoid death then player B's vision will be altered a lag jump the trick is what are the timings here for it to be noticeable?

if a bike is going at 30m/s that's 1m in 33ms

with a regular server with a high ping of say 200 that's 100 one way, lets say 60ms too slow for a perfect 25fps simulation that's a jump of 2m

that's nothing

ok it is obvious that if p2p could work it would be faster the problem is can altercations be resolved?

the point is the ping is shared between the players in p2p

with the speed of calculations of our computers i think they can receive out of date information and correct their simulation

2

here's another angle in the same way a player flicks through a key-combination and dies and declares 'lies! i managed that' in the same way the computer could not respond fast enough so a move can not be received if the computer knows that it is going to take too long to send to the other computer that is computer A doesn't send the information to computer B and just declares the player as dead hehehe

even though the player could avoid the wall with his 80ms response time


why am i going on about this? what am i exploring?

i am exploring the possibility that we do not take full advantage of the fact this is virtual and instead of attempting to create a model of reality that is a centralised server with its authority we develop a system that is completely devolved

along the lines of bending time and space mentioned by z-man

how would it feel if i am heading for a wall i flick a button to avoid it and bang i hit it?

i would just say my reactions times were too slow

of course a computer would give the benefit of the doubt to its player if it knew that it wouldn't effect the game play player B that is if i was just approaching any old crappy wall and both computers knew where the wall was doesn't really matter if computer B receives the information a bit late it just updates it

it only becomes critical when we approach where player B is

when player A and player B are close by

how close?

well at 30m/s with a ping of 200 that's an error of +/-2m radius around each player or that funny polygon of the lagometer

rather than think there is a contention as in argument it is almost as if the computers are apologising for the discrepency like computer A was saying something like 'i am so sorry but my user pressed left 100ms ago and i know you refreshed your page for your user 40ms ago so this information will be 60ms too late for your user... what do you think we should do about it?' and if it is not relevant computer B's response will run something like 'don't worry, i will alter it in the background he won't notice' if it is critical it might say 'oh shit he's really close to my user well... he seems to have avoided things and they are moving apart so i will alter it and he won't notice it' or 'oh fucking shit he's really close to my user and because of your user's turn my guy is dust... if only he had seen your user's key press! i will be blamed! i can't accept that sorry but you will have to tell your user that he didn't turn.'

knowing this then computer A doesn't approach computer B with the keypress in the first place

sounds odd but why not?

it ends if i am correct in my thinking in an impass if two players approach one another and the distance between them in virtual distance is smaller than the time distance between them in terms of connection

like an event horizon

3

if they enter into that event horizon effectively computers just tell their players either of two things depending on either of two settings the player has running on his system: either 'i am not going to show you what happens though you can keep pressing keys and if once i communicate with my partner computer you survive then i will show you what happens if you die well i will show you a fancy death and a replay of what happened because it was too fast for the distance between you ' or 'since you want to see what you are doing i will simulate what could happen but only based on the proviso that it could be corrected in the very near future and if you survive then you will be most happy but if you die then you will be most unhappy'

in the first setting the player continues the game internally visualising what might happen to be justified by the catch up or replay

whereas in the second setting the player needs to see stuff even though it is incorrect since it will not be an accurate simulation of what the other player is doing

wow this is very zen

it is to do with approaching the moment

the external form of martial art is to practice moves until they become behavioural so that if a particular blow comes in at a particular speed and approach angle the body responds to block etc automatically that is the body responds like state 2 not actually being sensitive to the current situation but just going through the process

the internal martial art is more like state 1 where things are happening so fast that there is no need to react to an external stimulus hmm... this doesn't sound right

hmmm more thought required for that...

4

two players enemies grinding one anothers walls going in the same direction... we often see this in a game

the one behind accelerating up to say 40m/s and the one in front at 30m/s what is the formula to calculate the event horizon? that is if the player ahead turns suddenly what is the distance that the player behind is allowed to turn freely? well it depends on ping with 40ms ping/2 the player is blind when 1.6m behind with 100ms ping/2 the player is blind 4m behind with 200ms ping/2 the player is 8m and so on

take the first case scenario if the player in front turns when the bike is less than 1.6m behind there is no way for the player to respond since it takes 40ms for the next frame to pop up on the screen anyway

anything within 40ms plays just a like a lan game really

in 40ms he will have travelled a further 1.6m and the bike a head 1.2m so they will match after 160ms that's four frames in a 25fps simulation the bike behind having travelled 6.4m and the bike ahead 4.8m not taking into consideration respective acceleration and deceleration

any point during this approach if the player ahead turns the behind player only knows about it by dieing whether the player was connected to the machine directly or on an internet connection

5

nah this is all wrong because i have been thinking about fps of 25 when with very high speeds it is useful... isn't it?

is there a reason for having fps of 100? does it make the motion smoother?

a higher fps allows a player to respond as close to the event as possible because we work not like machines to a fixed framerate but we respond relative to a change in our environment

in the example above we may see a player go in the ydirection 1.6m of if they made the turn the frame would show them in the xdirection 1.6m this is a major jump but if there were two or three frames faster then we would see immediately when the y-direction changed to the x-direction and then add the 1.6m every 40ms or whatever our biological response cycle is

...

so is the player ahead allowed to turn? well of course he is because he is ahead

the initiative is with the player ahead even if they are entering the event-horizon

then we have the classic scenario where the player ahead double-backs and hits the player behind's wall who has just turned


how is all this determined in a relativistic physics engine?

beats me my brain is mash....

5

the player ahead could receive an image on the screen then the player has just turned to the side as opposed to being nearly 1.6m in a lateral direction

is this correct?

shit this event horizon shit is damned tricky to think about...

why isn't there any discussion around here about this kind of crap?

i suppose it just involves engineers people don't really want to be sitting about thinking about the theory they just build the models and see what happens who the fuck knows how the mind is interacting with the stuff at this level...

i think i am just the state 2 person close my eyes and hope for the best hhehehe and some of the best times i remember feeling is when i do something that i don't even understand myself and there is no way i could have seen it... it was almost random and perhaps it was hehehheahhehah