UV Lanterns and Matchmaking using Firebase


Echoes of Fellow Swimmers


For this week's devlog, we want to talk about some new mechanics we have added. Essentially, we had this idea of having really subtle community-based puzzles that maintain the single-player aspects, while also feeling like some players are in the game somewhere. In the past week, we have achieved this!

The Lantern

We created a shader that can swap between textures based on a positional coordinate to determine what part of an object's UV map should be "revealed". This means that we can essentially create a black-light effect that allows the player to reveal secret writing. This lantern is in a very dark, and very hard-to-reach level and will be used for a few puzzles, that I won't spoil. But one of these puzzles is our first community-type puzzle! This leads us to our other big topic:

Database Integration

We have also implemented a fairly robust database system to do a ton of fun things. First, it will record player stats such as deaths per level, time spent in shade, time spent swimming upstream vs downstream, etc. Right now, we don't know if this specific information will be available for the player, as it is mainly intended for research outcomes and determining if players are learning the more educational goals we have as pertains to Salmon conservation. However, we are also using the database as a "server" for community puzzles. Right now we upload the player's location, what puzzle they are "participating in" and a string that we can use to determine progress in the puzzle. This means we can do a lot of things, such as detecting how many players are in a specified area and using that to give players hidden collectibles. Another thing we did which we are super proud of, is we used the string to perform a "network handshake" over the database to pair players up. So if a puzzle requires 2 people exactly, and 10 people in the area could potentially participate, the puzzle will be able to pick two players and mutually match them. This means that the players both send data to the database and both know each other's location. I might also add a 16-bit short to use as a bit-string for a little extra leeway as far as what we can do. If we went in this direction, the player might be able to even play tic-tac-toe with a mystery player. On top of all that, the data collection is entirely optional, and the only thing the player loses out on, are these specific features.

Anyway, I hope this has made you guys as excited as we are. We believe all these little features will build up to being a cool and unique final product, and we are so stoked to have you guys play it. Also, finally, we are at 24 out of the 100 unlockable fish we are trying to add before the release. This may sound kind of low, but considering that 7 of those were added in the last week, and the system as a whole is a fairly new one in our development process, we are pretty happy with this progress.

Cheers, Blood Sweat and Beer

Leave a comment

Log in with itch.io to leave a comment.