branchsbox-tabletennis-vr/mastercancel
144 Commits over 670 Days - 0.01cph!
menu: Only create the VR player when we're running in VR
Add button for toggling hold manually in the editor (outside of VR)
https://files.facepunch.com/tony/1b2211b1/sbox-dev_HsOtOwwohC.mp4
If a player fails a serve, reset the state back to serving
Kick off the game loop, place ball in player's hand accordingly
Ball hit loop
Create PlayArea utility component to dictate who owns the area where the ball is bouncing (https://files.facepunch.com/tony/1b2211b1/sbox-dev_qfxGhcSR1G.jpg)
Ball bouncing game loop
Minor refactors to holdable/hand placement
Some boilerplate on game loop, add TeamComponent, Team enum
Add global events for when the ball is hit, ball bounces
Refactor a bit
Team changed events
Added HandMenuPointer, use the hand's index finger to cast a ray forward for WorldInput, use RayToLocalPosition to grab transformed ray distance (feel like we could expose this in a better way)
Use particle for menu pointer
Add DisableIfInVR component, good to get rid of useless flatscreen cameras
Simple main menu (https://files.facepunch.com/tony/1b2111b1/sbox-dev_dYwBHI94uZ.mp4)
The ball is a global instance stored by GameManager
Add PlayerBallManager, can spawn ball, recall ball to hand
Added super basic paddle ball test (https://files.facepunch.com/tony/1b2011b1/sbox-dev_jUVBNTwkXj.mp4)
Give ball and paddle suitable triggers
Refactor controller input, add InputState
Bunch of work all around, code to plant a paddle and ball in the player's hands, start designing hold types
Add Hand, HandPreset system from Gunbuilder
Create Player Prefab
Create other needed prefabs (Ball, Paddle)
Start designing player class
Fixed barrier prefab being movable
Start writing a bunch of code for holding objects w/ hands (based off Gunbuilder, goal of cleaning it up for a lib)
Scene Project Start - move all code to another folder for reference, create a basic scene map (https://files.facepunch.com/tony/1b2011b1/sbox-dev_0EoXrWDBgh.png)
Update .sbproj to include resources
Removed unused sounds, added another ball bounce sound
Goodbye Poppins, you had a good run
Updated Helpers to Razor, fixed all game warnings
Get rid of ClientPreferencesWidget's template, fixed incorrectly grabbing display title for PropertyDescription
Converted MenuWidget to Razor
Added non-VR debugging methods to interact with MenuWidget / ClientPreferences
ScoreWidget converted to Razor, less code, less shit stylesheet
Converted HintWidget to Razor
Add VR check to set VR anchor
Fix for last month's engine refactor
Updated ClientPreferences to use PropertyDescription
Edited the velocity reflection to be a bit more arcadey
This is an odd take, but alter the timescale a bit
Remove blur from menu, doesn't seem to work in Vr
Give the point to the other team if the serve hits the opponent's side on the first bounce.
Actually remove the failed serve sound
Game Loop rewrite to account for correct serving rules
Started work on menu widget, instead of going straight into client preferences.
https://files.facepunch.com/devultj/1b1611b1/sbox_n0LKi4Seg7.jpg
Improve menu widget style
Give players a camera outside of VR, fake WorldInput outside of VR
Give menu widget avatars a nice box shadow based on team
Can open client prefs from menu widget
Added Menu Widget toggle
Unset active page if disabling menu
Don't play the failed serve sound for now
New Menu (left joystick down)
For debugging, positionthe player's hands manually in non-VR
Game loop cleanup, fixed losing score not being submitted.
Non-VR players get chucked into spectators, unless the host is running in tools.
Fixed LeaderboardType being inverted
Decreased distribution of elo rank brackets
Added shitty failed serve sound
Only show serve failure helper 5 times
Add GameState.FailedServe, don't instantly reset the serving state.
Add ReleaseGripToServe to client preferences
Added straight forward helper hint system
Changed serve grip behavior, now you hold then release, instead of just gripping.
Fixed game end not actually resetting state
If the paddle is hit by a player, and the ball hasn't bounced yet - award the serving team a point.
Better scoremaking decision for illegal shots
Use SetGameResult to send win/loss metrics