You can finally see what I see
So, that's a cryptic devlog title.
In this game you play as a real mouse that can do things that a digital mouse can do, click buttons. However, I doubt anyone who's played the game so far is actually aware of it. That core functionality hasn't worked online until now.
Basically, I've had the core functions of this game working for days locally but on the internet it's a whole different story. The game actually gets real data from this website and uses that to populate the game world. I've struggled with two things in particular though, CORS and HTTPS encryption. Here's the quick version:
- CORS: The way I got around the first problem was by using node.js to create a sort of web scraper/proxy server hybrid. This allows the game to read information about the rest of the internet. I initially tried to render a webpage behind the game using the power of the browser and an
<object>tag but that was too difficult to interact with so the webpages are sent as JSON and deserialised into "webpages" using Unity UI.
- HTTPS: The way I got around the second problem was by creating my own Lets Encrypt certificates using ZeroSSL and then managing the https connection myself. I originally tried greenlock-express but I couldn't get it working, and hosting services that did it automatically were too expensive for a one off game jam.
The whole thing was set up in a few days, it's just been plagued by constant bugs until now. I initially planned on being able to spend the full two weeks refining this idea, and I'm sure if I did it would've been glorious, but bad timing ruined all that. Now you can see what I see, and though it isn't amazing as a game I still consider it a huge achievement for me. I told a friend that, "As a game it's a failure, but as a tech demo it's a complete success".
And I hope you can see what could've been.
Leave a comment
Log in with itch.io to leave a comment.