So, it's 2am and I'm writing a blog entry. I must be waiting on a Unity WebGL build to complete so I can upload it and THEN check if my Kongregate API code hacks are working yet...
Wow, never expected this journey to be like this. I suppose I never do anything the easy way. So now I'm integrating a JavaScript API into my c# Unity game...
I'll do a more thorough write up/code share later, this will just be some quick notes.. and something to keep me busy between builds..
Go here first for basic Kongregate API initialization and integration: https://www.kongregate.com/forums/1021798-game-programming-subforum/topics/1673115-guide-kong-api-with-unity-jslib-system
The above uses the new(2017.1+) Unity way of including JavaScript (.jslib), so at least you know it's supported, even if there's no documentation on how to use Kongregate with it yet.
I'm currently working on adding support for kongregate.sharedContent to my game, may even contribute to/fork the above when I'm ready for that..
This will allow players of SlingBot Boarding to Create and Share their own race courses. With shared leader-boards it will be pretty close to multi-player without all the headache. I may even simply record race data and use that to generate npcs that actually move like players.
Alright, last build and hopefully I'll have Race Course Save and Load working on Kongregate...
If not, I will sleep anyways, because now it's almost 3am.. haha..
Well.. one more..
Haha.. Still not quite there.. I can save items, I can view saved items, I just can't figure out the callback registration for "loading" the saved file. So the struggle will continue tomorrow.
I never tried Unity WebGL, let me know how the performance is.