Little bit sparse on updates this week. Ohio is currently at the tail of some really quite bitter cold weather, as in arctic cold, which has left me running for blankets and a hot drink. Thankfully it seems things are returning to our regularly scheduled winter horror and I’ll be able to focus once again. Having said that, I’ve not been entirely negligent and have some decent updates to report.
To begin, Photon’s PUN 2 has been implemented yet again and while organization leaves something to be desired, it does work.
Additionally the game map has been added, but not without difficulty. See, currently I’m using canvas image components residing in world space for everything. This makes sense as I’m not using colliders or anything that requires physical interactions and Image components are the most efficient way to display the large number of images a tabletop game needs. Like most things however, nothing is as simple as it appears and scaling assets to be of matching sizes despite resolution differences is a difficult task which I’m still struggling with. In the end it might require a custom map system, no longer officially allowing imported maps, but I’d like to have a system that was at least ad-hoc capable for groups that don’t want to port their entire map to BiosHub.
Noting the current map you might notice I took great care to align the tokens to the map grid. This was painstaking but…Nah, I’m just kidding, We have Snap to Grid support now! And dang does it feel smooth. For anyone also needing a snap to grid system, BenZed provided some excellent code on Reddit which is what I’m currently using.
Vector3 SnapPosition(Vector3 input, float factor = 1f)
if (factor <= 0f)
throw new UnityException("factor argument must be above 0");
float x = Mathf.Round(input.x / factor) * factor;
float y = Mathf.Round(input.y / factor) * factor;
float z = Mathf.Round(input.z / factor) * factor;
return new Vector3(x,y,z);
For our future WebGL users, I added a bypass to fix browsers being unable to work with our caching system. Browser security forbids using local storage, but for a browser it’s obvious you have internet and so it shouldn’t be a huge issue.
Max Camera Zoom was added to prevent the world flipping when the camera went into negative zoom.
I need to investigate a regression where the Esc toggle for our Control Panel is not working, probably just broke the game object reference.
Upcoming tasks are reviewing the token/map scale so I can guarantee it works with any map size and also support varying token sizes. Additionally adding a room selection to the main menu is a priority. From there, save/load and ideally a token browser will be all that is needed for alpha support! I look forward to getting feedback and finding what direction the community wants this to go.