Page 5 of 7

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sat Jan 20, 2018 8:53 pm
by DreamKeys
Input works after clicking into the text field.

also I found this while searching for explanations ... https://answers.unity.com/questions/103 ... focus.html ... might help, might not.

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sun Jan 21, 2018 5:01 am
by Damocles
Thanks for the hint. I will try to see if the problem was the browser not capturing the focus.

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sun Jan 21, 2018 5:46 am
by Damocles
here the same demo using an additional js-function to set the document focus, in case the keys do not react:
spaceclutter RCS demo (start with js focus support)

Please test if you had an issue with the keys not responding. Its basically just adding an event handler that sets the focus when clicking onto the webpage:

document.onmousedown = function() {window.focus();console.log("get focus");};

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sun Jan 21, 2018 6:30 am
by Cornflakes_91
DreamKeys wrote:
Sat Jan 20, 2018 7:24 pm
Yeah, it's strange.

I did test it on chromium, firefox, opera and brave ... runs fine on every browser but no keyboard input.
I'm on a german keyboard layout which should be no issue for those keys.

It's like the Unity WebGL Player doesn't grab keyboard input somehow.

on a german keyboard as well, works fine for me.

not that i'd think that it would change anything, just confirming that thats not it.

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sun Jan 21, 2018 6:57 am
by Damocles
FormalMoss wrote:
Sat Jan 20, 2018 6:43 pm
..
EDIT2: Okie, I get it now, will get this running ona 50" plasma and my 6-core rig tomorrow.. will leave it running for a few hours and see what happens :D (can i reach the sun??)
Yes, of course. The ship flies at 150 m/s max. Since the scene is near a gas giant, the star is about the distance away as Jupiter to the sun, so around 778 million km.

it will take around 164 years. :mrgreen:

(There will be some faster mode of travel between locations)

Cornflakes_91 wrote:
Sun Jan 21, 2018 6:30 am
on a german keyboard as well, works fine for me.

not that i'd think that it would change anything, just confirming that thats not it.
I assume that some linux systems might handle key-events differently, something that the unity key-event implementation does not capture.
At the end, its all javascript that it compiles to.
Maybe I cook up some separate javascript testbed, to narrow down the problem, if its related to unity or javascript in general.

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sun Jan 21, 2018 7:25 am
by Cornflakes_91
Damocles wrote:
Sun Jan 21, 2018 6:57 am
Cornflakes_91 wrote:
Sun Jan 21, 2018 6:30 am
on a german keyboard as well, works fine for me.

not that i'd think that it would change anything, just confirming that thats not it.
I assume that some linux systems might handle key-events differently, something that the unity key-event implementation does not capture.
At the end, its all javascript that it compiles to.
Maybe I cook up some separate javascript testbed, to narrow down the problem, if its related to unity or javascript in general.
i just checked it with my mint laptop
worked with both the integrated keyboard and an external one i plugged in.

did nothing special to get it to work. just started the default version.

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sun Jan 21, 2018 9:15 am
by Victor Tombs
I still keep getting that "where's the firing button?" urge, Damocles. So many asteroids not being blasted! :cry:

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sun Jan 21, 2018 10:38 am
by Damocles
I was just working on rockets ;)

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sun Jan 21, 2018 11:00 am
by Talvieno
Victor Tombs wrote:
Sun Jan 21, 2018 9:15 am
I still keep getting that "where's the firing button?" urge, Damocles. So many asteroids not being blasted! :cry:
Josh seems to have rubbed off on you. :lol:

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sun Jan 21, 2018 11:02 am
by Victor Tombs
Rockets are fun, Damocles! :thumbup: :D

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sun Jan 21, 2018 11:04 am
by Victor Tombs
Talvieno wrote:
Sun Jan 21, 2018 11:00 am
Josh seems to have rubbed off on you. :lol:
He's got a lot to answer for, Nathan. ;) :angel:

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sun Jan 21, 2018 12:47 pm
by Damocles
I have put in some "party rockets",
There have no finished rocket mechanics, its more a placeholder to test the dynamic light emission.
(eg, they fly through everything, and have not dynamic targeting, and not sound yet)

But if you really dislike an asteroid, you can shoot it at least, instead of shaking your fist at it.

spaceclutter RCS demo
(launch barrage with space)

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sun Jan 21, 2018 12:53 pm
by Cornflakes_91
i love how the missiles eject :D

i think it would look a tad cooler if they would speed up visibly after the ejection.

eject -> bit of a delay -> engine starts up and they boost away

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sun Jan 21, 2018 12:55 pm
by Talvieno
I like it too! :D Looks awesome. And I'm with Corn on the speeding-up thing, along with maybe making them get brighter, too, when they speed up. Very nice missiles though! And they look great with the lighting system.

Re: 10000 Asteroids Testlevel (WebGL)

Posted: Sun Jan 21, 2018 1:14 pm
by Victor Tombs
Yes, I agree with whats been said about the rockets, Damocles. They need to behave more like a weapon with purpose. After saying that, l love the way they deploy. :thumbup: :angel: