usermattcancel
reposbox-tabletennis-vrcancel

21 Commits over 92 Days - 0.01cph!

5 Hours Ago
Calculate drag properly, remember that we use kg/in³ and in/s² - fuck knows how what I was doing before worked in the slightest, this feels much better Bounce a bit higher Only use this paddle sound, it's cooler
Today
Keep cleaning / refactoring, keep game logic seperated from everything else, isolate RPCs for future lag comp
Today
Tidy up, remove any concept of serverside balls, isolate all physics logic to its own class
Yesterday
More sync fixes, got a better idea though Adjust networking even more, this is very playable now, but I think I can still do better Don't bounce on carpet, scale bounce sound w/ velocity
Yesterday
Client decides when it wants to take control, various other desync fixes Haptic feedback when hitting ball
Yesterday
Make the ball completely clientside with a backing server entity for sync, make all of serving clientside too
2 Days Ago
Quick hack to update client values to server values when authority changes to you
2 Days Ago
Pack our ball velocity into the usercmd as well so the server/other client can take it over
3 Days Ago
Alternating client authoritative networking * Implement an alternating client authoritative model - whichever clients side of the table the ball is on gets complete authority over the ball position and velocity. * Physics are simulated entirely on the current authoritative client now. Pack the ball position into the UserCmd and the server sets the ball entity's position so the other client can see it and takeover when authority switches. * Substep the physics at fixed(ish) 0.005ms steps within FrameSimulate's delta time, each step moves the ball and checks against the paddle sweep. This may be unconventional but it gives us a perfect result and never misses. * Fix paddle collision sometimes sending the ball backwards because of a negative velocity length, added an abs.
3 Days Ago
implement simple debug slowmo to make sure the angular hits are correct Implement alternating client authoritative - whoevers side of the table the ball is on gets complete control of the ball
3 Days Ago
Neater way of giving client authority over the ball Implement physics substeps on a fixed-ish time step within FrameSimulate, move the ball and try to collide with the paddle each step - this is probably quite unconventional but it gives us the perfect result and never misses
4 Days Ago
Use abs on our paddle return velocity length before multiplying by the sweep normal, stops the ball flying behind the paddle Simulate physics entirely clientside each frame, make the client authoritative packing the ball position into the usercmd. The game should decide which client is authoritative based on which side of the table the ball is on.
3 Months Ago
Bounce particle goes on the hit pos, don't follow the ball you silly bugger Use HitPosition instead of EndPosition on our sweep traces
3 Months Ago
Sweep trace the paddle into the ball, way way more reliable, setup a nice cylinder hull for the paddle too Better physics, account for paddle angular velocity, original ball velocity reflects, and resolve movement after we've been hit instead of before
3 Months Ago
setting default map and removing something redundant
3 Months Ago
set ident to facepunch.tabletennis Can drop the ball with your left hand by pressing X, and transfer paddle velocity into the ball on hit. Need to do this better by figuring out local velocity of the point from the angular velocity of the paddle.
3 Months Ago
Move the paddle a bit further down so you're actually holding it Make surface assets for the ball, paddle and wood with realistic restitution values (can you hook these up to the models/materials @bakscratch) Tidy up our physics code a bit and use the restitution coefficients Set MaxPlayers to 2
3 Months Ago
Oops, make sure it's this paddle that's colliding with the ball Put different client pawns at the end of each table how'd I cock this up Improve VR anchor positions Turn the paddle around, black side is back hand I think?
3 Months Ago
Better test camera position & fov so I can see wtf is going on Add a PlayerPawn which has a Paddle which tracks the ActiveBall Paddle hits the ball from a Simulated context, if the ball hit the paddle it'd be shite, do this from Simulate so it can be predicted/clientside authorative Also get some bounce / hit sounds going Hook our paddles up to Input.VR.RightHand and set our anchor position, can whack balls in VR now
3 Months Ago
Initial commit Base empty s&box game Some basic table tennis physics with accurate gravity, mass, bounce factor and some air drag.
3 Months Ago
Initial commit