usermattcancel
branchsbox-tabletennis-vr/mastercancel

20 Commits over 214 Days - 0.00cph!

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