usermattcancel
reposbox-tabletennis-vrcancel

24 Commits over 214 Days - 0.00cph!

1 Year Ago
Fix for engine refactor
2 Years Ago
Update README and LICENSE - anyone can learn / take code for their own s&box games
2 Years Ago
Update paddle hit physics, calculate bounce with relative ball velocity to the paddle, dont add multiplied paddle velocity to ball on bounce normal, simply transfer the velocity 1:1 Fix up debug mode so the game throws endless balls at you to return
2 Years 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
2 Years Ago
Keep cleaning / refactoring, keep game logic seperated from everything else, isolate RPCs for future lag comp
2 Years Ago
Tidy up, remove any concept of serverside balls, isolate all physics logic to its own class
2 Years Ago
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
2 Years Ago
Client decides when it wants to take control, various other desync fixes Haptic feedback when hitting ball
2 Years Ago
Make the ball completely clientside with a backing server entity for sync, make all of serving clientside too
2 Years Ago
Quick hack to update client values to server values when authority changes to you
2 Years Ago
Pack our ball velocity into the usercmd as well so the server/other client can take it over
2 Years 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.
2 Years 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
2 Years 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
2 Years 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.
2 Years 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
2 Years 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 Years Ago
setting default map and removing something redundant
3 Years 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 Years 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 Years 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 Years 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 Years Ago
Initial commit Base empty s&box game Some basic table tennis physics with accurate gravity, mass, bounce factor and some air drag.
3 Years Ago
Initial commit