Log In  

I'm making a cursor-based game.
I notice that when playing in the browser, the user's cursor is still shown.
But in the desktop, it's hidden.

Is there a way of detecting whether we're running in the browser or on the desktop? So I can decide whether to show a custom cursor or not?

(Or alternatively, is there a way of hiding the default hardware cursor when playing in browser?)

P#45837 2017-11-03 13:38 ( Edited 2017-11-03 21:30)

it's always been puzzling to me that the "devkit" mouse even functions in an HTML export, which is obviously not a "devkit" since it has no editor tools...

P#45838 2017-11-03 13:40 ( Edited 2017-11-03 17:40)

I haven't tried it but because you can do GPIO stuff with Javascript, in theory you can have a JS call set a variable in Pico-8 and then know if it's in the browser.

P#45839 2017-11-03 14:56 ( Edited 2017-11-03 18:56)

Mouse support is not official. I think it should either go away from the bbs or become standard. In any case it should be FIXED where available: it doesn't work in fullscreen, and hardware cursor should be hidden.
The way I see it, "core" pico-8 for BBS but anything goes for devkit or exports (including a way to lock the pointer for mouse deltas).

but of course the keyboard is lurking in the dark, waiting for mouse support to become official...

P#45840 2017-11-03 16:35 ( Edited 2017-11-03 20:37)

> "core" pico-8 for BBS but anything goes for devkit or exports

that sounds like a pretty good compromise to me. if devkit mouse was unimplemented on the BBS it would have the benefit of preventing the frustration/inconsistency of running into a cart on SPLORE which requires a mouse, when the rest of SPLORE is 100% controllable with a gamepad...not so fun when I'm sitting on my couch with a wireless gamepad and literally no other input device within reach ;)

P#45841 2017-11-03 17:30 ( Edited 2017-11-03 21:30)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-05-29 05:00:29 | 0.007s | Q:16