Our idea was to develop something with simple game mechanics that still would be considered fun and addictive.

What it does

In it's current state, not too much. We were unable to do what we wanted due to the guest-wifi's firewall. So we were required to use Unity's HLAPI, which still doesn't work great due to the bad connection between the parties.

How I built it

We built the game thinking we would focus on the Azure challange in particular and having spoken to Kristoffer and David I was fairly certain I had a decent idea of what to actually create from an infrastructure POV. Essentially I wanted to solve two things:

  • Handle bundling of assets so to help with the build process.
  • Serve persistent data during and between states to a bunch of clients that were connected to one host (a glorified client).

The first part of it was solved rather quickly by developing an EditorScript that as it finishes creating an AssetBundle spins through the prefabs and pushes their names up to a WebApi that then parses that and puts it in a SQL table (first marks old ones as deleted, then updates their LatestUpdated column to help with versioning).

The second solution leverages the same API, but two different end-points: which returns a JSON object with this structure`

"IP" : "Your public IP",
"Port" : "A portnumber that you wish to use",
"RoundId" : "To be mapped to a arena prefab" 

and :

        "GameId" : "The current game id, used to keep persistance between rounds",
        "HostIp": "",
        "IsActive" :true,
        "RoundId" : "To be mapped to a arena prefab" 

The second solution essentially leverages a Web Api to first allow a host to set an initial state by calling an end point, which in turn returns his public IP, a port number and a reference to what round they start in (1). Then if a client wants to join the idea was to simply click "Join as client" to then send off a request to the Web API and get the current state. Up to this point it works great from Unity. We are able to send requests to the API to actually get the initial state and the client states. But because of the network we are unable to actually do anything of it.

Instead we had to cram the last few hours in the night to get a HLAPI version going that sent POST requests to Nether, but didn't do much more than that. It does allow for multiplayer, though - but there is only the one state and no clear borders between them.

Challenges I ran into

I believe we went for a bit too heavy of an integration with Azure, which paired together with the fact that UCL's Guest Wifi's Firewall simply didn't want to cooperate.

As mentioned above the issues really started occuring with Azure as we were unable to actually push to Azure via the Guest Wifi. Then it just kept going after we started working with the network manager API. It all seemed easy when looking at it at home and getting localhost versions worked fine. But getting two remote computers to talk (a host and a client) simply didn't work with the guest wifi. We tried setting up a network server instance on one machine that did nothing but create a port-listener that was setup based on the API mentioned above and a client that sent requests to the host based on the API-response. But none of Unity's predefined webhooks or callbacks were fired. It was as if I couldn't actually reach the host from within unity. What was even more troubling was that we were perfectly able to send pings between eachother.

Accomplishments that I'm proud of

I'm really proud of what I did with the infrastructure. Looking at it objectively I think it's a good piece of software. Though it didn't really do anything for us, regardless of how much we tried. I'm also rather happy that we managed to at least get a multiplayer build working, even though it's still not great - it does get some of that out of the way. We also managed to get some basic Nether integration going by using the name of the player who controls the object on the arena to get points whenever he / she is the last person to touch a ball that gets pushed off the scene. Though we didn't have time to get the leaderboard showing.

What I learned

That networking in Unity is a bad idea for a game jam. And so so many more fun things about how much you can learn in so little time with the right people around you. Also really enjoy azure now! :)

What's next for The Floor is Lava

I'll keep working on the infrastructure from home and maybe get an actual repo going. I'll most likely have a look at Nether too to see if there is a possibility to actually help out with that as I think most of my code could be extended to there.

You can see the WebApi code in the Builds-folder on github.

Built With

Share this project: