Page 1 of 1

WebGL Version

Posted: Thu Feb 19, 2015 1:27 pm
by testtubegames
I just posted a WebGL version of Bond Breaker, which means you can play the game in your browser *without* downloading the Unity WebPlayer plugin. Now, those of you on the forums most likely *have* that plugin already, but regardless this is pretty exciting. Finally my games can start being playable in browsers again without the horrid bottleneck that is Unity WebPlayer.

I'm pretty happy with how it turned out. The game (at least on my computer and with Firefox) runs quite smoothly. There are a few hiccups that I'd like to optimize more, but isn't that always the case?

One note - right now your saved data from the WebPlayer doesn't communicate with WebGL, and vice versa. So when you load the game, all the levels will be locked, as if you're starting over. Because you are. One of my goals is to add in some sort of 'skip code', perhaps letting you copy-and-paste your save data from one platform to the other.

Re: WebGL Version

Posted: Thu Feb 19, 2015 6:16 pm
by A Random Player
Can confirm; WebGL Version loads on Chrome (turquoise bar -> magenta), then loading screen, then the music, and normal. It loaded quite slowly, though, but I checked and it was about the same speed as the Unity version (IE11 and Chrome). (Both were quite slower than usual, I think. Was there a big update? Or is it just me?) I tried on IE11 at first, but it got stuck at the turquoise bar.
Some things you may have seen:
WebGL version has some text issues (at least on Chrome):
Bond Breaker WebGL text issue.png
Text things. Arrows point to some, not all.
Bond Breaker WebGL text issue.png (213.38 KiB) Viewed 13118 times
I think it occurs in some other places as well. Seems to be due to float-to-integers, or the font?

Another bug is the scrolling on the level editor levels goes ridiculously fast (overshooting the whole list). And the load level box has no background, and won't let you paste (turns it into bla bla).
Also, seems timed-spikes type 1 is offset from the cycle by a bit. Occurs in all versions, though, so maybe I've just missed it. Appears more so in WebGL. first noticed in Lasers 1 - 2.
Oh, and death loops (If you move into the spikes almost immediately after the level starts, whether manually or automatically) lag a lot (due to particles?). First noticed in Lasers 1 - 4.
Nothing else really major.
Wait, did I say nothing else? The WebGL version has the new Award Winners levels, but the Unity versions don't. Both say V1.5, but the Unity ones still have the Bond Builder Contest sign.

Posted all this in the hope that something is new or helpful - many of these issues are probably going to be fixed in the next version.
"Keep your eyes peeled for future WebGL ports of my games… I’ve got my sights on the Gravity Simulator next!"
I do encourage you to keep working on more updates for the Unity versions though, otherwise the Unity-users get left behind! :P
(To anyone that hasn't installed Unity - it takes less than a minute, and is fully automatic after the first click. Give it a try!)

Edit: Hmm, Puzzle 1 (2? 3?) by _V_ has been changed a bit.
Edit: Huh, my Love Story isn't working on WebGL - All buttons activate for one frame. I reproduced this only once in IE11's Unity, but it always happens on Chrome WebGL. Something something rounding.

Re: WebGL Version

Posted: Tue Feb 24, 2015 1:21 am
by testtubegames
Thanks for finding all those issues, Random. The WebGL port is definitely in beta (on Unity's end, not just mine), so I'm not surprised that there are some problems...

The loading time should be quite a bit longer than for the WebPlayer version -- I think the file is roughly twice as big. My understanding is that you're basically downloading not just the game, but *also* all the extra code it takes to run it. (That stuff that the plugin would normally take care of.)

I do need to go back and update the WebPlayer version, you're absolutely right. I've just been dragging my heels a bit on it, since I've run into some backwards-compatibility issues with Unity. I didn't realize at the time, the stuff I started using is so beta, that it needs a version of the WebPlayer that isn't even released yet. Oops! So, I'll have to figure that one out. But in general, *yes*, I am totally on board with having both WebPlayer and WebGL versions. I think both have their pros and cons, and once you've built for one, it's not too hard to port to the other.

_V_ told me to change the title of his level, and to add in a pun as I saw fit. So I did :)

As for your level not working, shoot. I tested it out and see now that there's a small chance that all the switches get flipped as the objects 'pop' onto the level. That's been an issue I've wanted to fix for a while, and your level will give me just the motivation I need! And I think your mumbled answer makes a lot of sense as to why it's *always* doing that in Chrome. You know, weak force ... ... ... radioactivity ... and whatnot.