Advertisement Jump to content
  • Advertisement

Hello Unity + WebGL + Kongregate, goodbye sanity.

Septopus

931 views

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... :D

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.



3 Comments


Recommended Comments

I'm incredibly surprised so far, after killing the dynamic lighting and reducing the numbers of objects in the scene(trick glitter, excessive numbers of course barriers), which I needed to do for PC anyhow, I'm hitting 30+fps.  I have it capped there to save cpu/etc.. so I dunno how fast it will go, but no issues..  It plays at least as well as it does compiled for win32, in a browser tab...  haha.  Same performance running locally vs. on Kongregate too, fwiw.(not considering load times that is)..

Hoping I can figure out the JavaScript API bits I'm struggling with and get it published for y'all to check out sometime tonight. 

With how well it's performing so far, I'm thinking that instead of releasing several platforms at once, I'm just going to focus on getting WebGL going with the Kongregate API, then I'll be able to focus more on a solid social gaming experience with one platform and see how successful I can make it. 

Then when I get MY server up and running I can update it with some full client/server goodness that I can make work across all platforms seamlessly. 

Share this comment


Link to comment

Hmm, guess I just needed to sleep on it.. 

First change I made and I'm now saving and loading race courses on Kongregate!!  WOOOO!!  okay.. now..  Lots of tweaks still need to happen before I give out the link to anybody.. ;)

 

This is going to be awesome!!  Their system already has a rating system and social sharing for all of the shared content.  Perfect!

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!