VRCBilliards: Community Edition
Hey! This release is happening because there hasn't been any real changes to the prefab in almost a month with 2 major pull requests still being worked on for 1.6.0! There were a couple of changes made after 1.5 though and I'd prefer to have a proper unitypackage for them rather than tell people to pull directly from master over and over.
Those changes are:
I uh, should've definitely done this weeks ago. Though me and Panda were fairly preoccupied with both personal work, secret VRChat stuff neither of us can talk about, and her coming to visit me for nearly 2 weeks. We went to several disney parks, hit up some water parks, AND gave each other lots of hugs! Ya pool table maintainers had a BLAST of a 12-day trip; sliding, zooming, and consuming. So it's been a bit. Apologies!
Hello! Apologies for the multi-week delay: Panda and myself have been getting increasingly busy with VRChat world work. Panda's working on her spookality entry while I got sidetracked with the latest VRCPrefabs world jam and made something for it (and subsequently took a mini-break from Unity afterward). On top of that, I've had to balance a few other side projects for people that have approaching deadlines as well (like recording voice work for a certain annual animation series), leaving sparse time for pool table work (outside of the usual free time playing video games).
Let's get to it then! β¨
The ever-skilled @jamestruhlar (Juice) decided to create a pool table themed around their CottonFoxes: an avatar base they created of a tiny plush fox resembling a ball of cotton. They're cute, round, fluffy, and now can be smacked into each other at high velocities for your amusement!
The table itself is fantasy-like and themed around nature, modeled in a similar style to previous works focused on their CottonFoxes, like the CottonFox Isle
Unlike the other tables, you may notice that this one is floating in the air. While not necessarily special or cool on its own, this DOES allow the table to take advantage of a particularly cool new feature...
Walking around to the backside of the table will reveal to you a nearby floating handlebar pickup that you can grab and move. The entire table is tied to the pickup using a Position Constraint (locked to the Y axis), and thus- allows anyone to move the table up and down to scale with their height accordingly! You can play a game while the table is at floor-level, almost like you're playing on the ground under a canopy of trees; and you can also play a game high up in the air, with relevant parties playspace'd up to get out of the way of people- perhaps having conversations below. Now, we didn't have time for this release to implement a "reset height" button (that's planned for 1.5.1), so.. uh- we kindly ask people to not be a dick about table placement π
Juice and myself did a fair bit of back-n-forth work to ensure that the table's visuals were top notch while being as performant as possible (more can be done still!). Overall, I'm happy with how it turned out aesthetically and am more than glad to welcome it to our roster!
(Oh and by the way: The table has a tiny phone propped against one part of it, and the phone's screen takes up a decent amount of UV space... allowing you to change it to your hearts content π)
LOTS of work was done to improve collision behavior after a ball has been pocketed. The issues of balls often "flying off the table" or "rolling back onto the table" when being pocketed at high velocities or at weird angles has been my personal biggest pet-peeve. And I've toyed around with a lot of solutions to try and ultimately have my cake and eat it too. I think I've conjured up a solution in the form of a special set of box colliders wrapping around each hole for both the primary and metal tables, as well as modifying the metal table's custom colliders to be more lenient AND greatly reduce the chance of balls getting stuck in the middle! It's more effective on the metal table than the primary one; the primary table still has a decent chance of bounce-back when pocketing a ball at max velocity, but there's no way around this without causing other issues at this time. However, due to the basically nullified chance of balls flying OFF the table now, I was able to double the velocity clamp which makes pocketed balls look far more natural! Extensive testing has shown the metal table to be almost entirely reliable even with heavy use; you have to actively try to make a ball bounce back or get stuck in the rails!
There are more elegant solutions we can still experiment with in the future (like toggling larger colliders but only for a brief period of time immediately after a ball is pocketed, or fine-control the velocity programmatically), but this will do for now.
We've also gone and done a number of quality-of-life changes to the various UI panels! We've added support for multiple score panels existing in a world (with the score panel itself being abstracted into its own prefab), all mirroring the scores of the current game. On the prefab itself, we've utilized this by hiding the info canvas during gameplay and replacing it with a secondary score canvas; allowing players to check the current state of the game without having to move to a particular side. I also painstakingly went through and shifted values around to make the structure of all the UI canvases cleaner and more sanely scaled. Additionally, @daalta (Faxmashine) graciously provided us with a better rounded rectangle UI sprite for use in our canvas backgrounds; no more pixelated canvases!
Okay, aside from that... I feel as if I owe you all an apology. You see.. all this time, we here at VRCBCE have been deceiving you about the quality of our textures. All this time, you've been playing 9-ball with balls so.. digital. So utterly fake looking. It's almost as if you're just looking at the normal 8-ball texture but.. recolored. Gross. It's a good thing that @synergiance took it upon herself to create a texture based off physically referenced american pool balls with hand-made numbers to boot! Check it out!
I've changed the README a fair bit and added a section about properly adding credit for your worlds. The TL;DR is that it's best to credit "VRCBilliards" as to cover everyone fairly and reflect the new organization's name. Please go give that a look!!
Hi there! I'm releasing the update this time around, as I'm responsible for most of the work and may or may not have convinced Panda to let me have a go at it π
We've got some exciting changes for you all this update, with plenty more to come soonβ’!
Let's get started! β¨
Had your fill? I don't blame you! This stainless-steel beast of a table was graciously created and provided to us by the fantastic Ivylistar!
It features an intricate rail system, prominently visible beneath the glass, which pocketed balls roll through to rest within the rack at the end. As consequence, we've not only abstracted whether pocketed balls should teleport after the round ends or utilize unity's physics system with custom colliders, but we've also exposed the location racked balls get teleported to. Both of these should make it easier for the end user to mod the table and create unique ones that fit the style of their world! π
In order to make the table look as good as it is, we've introduced Silent's fantastic Filamented shader to the repo, which is a modified version of Unity's Standard shader with better shading models for metallic surfaces with specular highlights. It's really good, and we're also now using it for most of the other materials as well. π Overall, this should result in better looking tables in both realtime and baked lighting scenes.
The large UI canvas on the side of the table has been split into 2 smaller canvases on each side; one for the teams/scores, and the other for information (name, version number, link). The score canvas also was redesigned to fit better with large names and be more reasonably spaced. As a result of the split, both canvases fit nicely on the side of the table without hanging off and it looks far better overall!
The end game buttons were also moved to the same side of the table that the info canvas and toggle UI button resides, making that side feel nice and complete π
The floating TextMeshPro text in M.O.O.N's UI has been swapped with Esnya's equivalent icons since they just... look nicer than floating text (and are also more readable on the metal table). This applies to the enable table button, the end game button, and the toggle UI button. Similar (but different) icons might be created at some point for diversity π₯΄
We've also made some changes to clamp the velocity of pocketed balls in order to reduce the chance of balls flying off the table at high velocities. This wasn't as much of an issue previously, but with tables like the metal one which don't rely on ball teleportation, it's important to ensure they don't just permanently roll away. We've exposed a variable for the velocity clamp (0.5 by default) which allows you to tweak it to meet your preferences. The current default value makes it so the balls almost never fly off, but have a chance of "bouncing back" onto the table for a bit, as well as obviously making the pockets look ever-so-slightly "artificial" with the speed of the ball rapidly decreasing after entry. Making this value higher will lessen that effect while also making it more likely for balls to fly off the table. Tweak this at your own discretion. (As an aside: you probably shouldn't make it higher than 1, and definitely shouldn't make it higher than 2)
Glad you asked!
Table is responsible for much of the work this release. Otherwise, the cue code was cleaned up somewhat, which should hopefully stop the wonky cue rotation bug when the game ends.
By default, the two cues have been placed on top of the table rather than floating off to the side. You can move the cues to wherever you like for their default location: make sure that the cue orbs and the mesh itself are both moved, though!
Table's changes:
The UI has generally been cleaned up. Let us know what you think!
This one is a big ol' chungus:
0. Upgraded to Unity 2019.
1. Logger will now not print logs to console unless told to.
2. Various fixes and improvements to the two main prefabs.
3. Cue performance optimizations to reduce CPU load when
their table is inactive.
4. Timer feature improved, UI added.
5. PoolStateManager no-longer pointlessly calculates
deltaTime when Time.deltaTime exists.
6. Fixed crash when playing the two 4 ball variants with
the Logger removed from the table (thanks BeastChild!)
7. Assorted code improvements.
8. Fix code errors during building & publishing to VRChat.
9. Stop local events being RPCable (Thanks for reminding me, Castle!)
10. Fix the unsafe 'Reset()' in PoolStateManager that caused odd errors.
11. Make the cue offhand grip lock on trigger down. (thanks Ruuubick/Vowgan!)
12. Remove an errant CyanEmu include in PoolStateManager (thanks Orels1!)
13. Fix the lossyScale warning that, whilst amusing, was a false positive
most of the time.
14. Improve the UdonChips integration so that if you get kicked out of
the game before it starts, you get a refund. Don't say we at VRCBCE are
not generous!
15. Added a new skin for the pool table, as the main one is a smidge plain.
Now you can have a pool table that features the letters VRCBCE!
16. New JPN Readme and updates to the ENG one.
17. Made the Logger script not break random projects.
18. Improve the score UI.
This release contains updates from @Metamaniac, @Legoman99573 and @esnya. Thank you to all three!
This release of VRCBCE contains the following changes:
Note that this update requires the latest VRC SDK and the latest UdonSharp thanks to Merlin and co adding properties support, which Esnya has used for UdonChips integration.
A NOTE ON UNITY 2019:
VRCBCE should work out-of-the-box on Unity 2019, but I've not actually checked yet. IF YOU ARE TESTING UNITY 2019 AND SEE AN ISSUE WITH THE TABLE, PLEASE LET US KNOW VIA THE ISSUES PAGE.
1.2.0! Given the changes in this release with regards to prefab structure and new features, this release has been upgraded from 1.1.8 to a full 1.2.0 release.
This release is a breaking change and we advocate a FRESH install. If any issues with 1.1.7 emerge, a 1.1.8 fix will be released.
Preview of 1.1.8.
!! POTENTIAL BREAKING CHANGES DUE TO PREFAB MODIFICATION !!
1. Performance improvments provided by Varneon.
2. Desktop view overhaul to get rid of the Layer 23 requirement
and make it far easier to maintain.
3. Prefab restructure for maintenance: making it easier to
maintain the core table code with multiple menus.
This patch revises the ForceReset on the main pool table to use less generally janky code.
The conditions for resetting the game are one of the following:
In addition, OnPlayerLeft now calls a Reset outright when you're the owner of the table and the person who has left is one of the players (previously the only way the table would reset is if you were the owner and one of the players).
Furthermore, resetting the table and ending the game are now unRPCable, meaning hostile clients cannot end your game of pool (they can still totally ruin it in other ways - this will be fixed in 1.2.0).
Credits to Blue and SpookyGhostBoo for prompting work on this:
Some jitter was introduced into the cues with 1.1.4. This has now been fixed.