kofstreet's Forum Posts

  • Anyone can help or explain me why I can't preview usermedia camera on NWjs?

  • I need picking up camera frame and manipulate it in my project, so I added user media and tried to run the example in C3, but couldn't succeed in getting camera permission.

    Please if anyone can help me get usermedia working in NWJS project.

    Thanks

    Tagged:

  • I think all I have to do is just wait and keep my project on C2 till the day cordova-plugin-device-orientation is ported to C3 runtime.

    Thanks anyway.

  • It's already supported by the official Touch plugin. As documented in the manual:

    > Alpha is the compass direction in degrees.

    Thanks Ashley for your reply.

    I know Touch plugin already returns compass direction since C2, but it returns only gyroscopic heading not true heading from north direction (magnetic north).

    I just tried to compile an apk from last C3 r195, and tested this:

    Each time I restart my app I get different value for Alpha, for same direction from the magnetic north.

    Maybe checking this link may explain exactly what I mean: w3.org/TR/orientation-event

    4.2. deviceorientationabsolute Event And 4.3. compassneedscalibration Event

    When I use cordova-plugin-device-orientation I can get abolute magneticHeading not gyroscopic heading.

    I compiled some app on android and iOS, it happends sometime when I prompt the watch heading command, that the phone ask for calibrating the compass.

    If Touch plugin is not yet supporting absolute compass direction, I hope if there is any way adding cordova-plugin-device-orientation to C3 runtime, because I really need it for my project.

    Thanks again for your reply.

  • Hi,

    I use cordova-plugin-device-orientation in C2 runtime to get north compass orientation, I want to switch to C3 runtime but cordova plugins are not yet all supported. So I ask if the new Touch plugin in C3 runtime is supporting Magnetic absolute compass orientation ?

    If not, is there any way to get magnetic orientation value in C3 runtime?

    I learned long ago from this link:

    developerdrive.com/how-to-use-the-device-orientation-api

    That I can implement javascript to my project to get absolute compass heading, but I'm not a javascript programmer and I don't know how to implement it in C3, so an example would be very much appreciated.

    Thanks

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks dop2000, that's it, I was missing the "Set response binary to".

    Now I can pack many sprites to one binary file, and keep index(endian) for each sprite in an array, then load each sprite individually.

    I know that I can load images directly to sprite, but now thanks to you I'm able to load it from packed binary data.

  • Maybe I wasn't clear in my previous post, I try to be simple:

    All I want is to be able to :

    1) Load Binary Data from PNG file.

    2) Load Sprite frame from previous Binary Data.

    I hope someone help me make this possible.

    Thanks

  • The Binary Data object is also useful even if you do not access its contents: it integrates with other plugins like AJAX and Local Storage, allowing binary data such as images to be stored or transferred in useful ways.

    I tried to figure out how to use binary data combined with sprites but can't find any way or example.

    My project is based on packing many images in same file, and with binary data I want to be able to load only the needed image to my sprite.

    Any example explaining how it is done would be verry appreciated.

    Thanks.

    Tagged:

  • Same for all my apps, has any one tried to update jquery-2.1.1.min.js manually?

  • Hi Mikal,

    I think you code is linked only to Gyroscope compass and not magnetic compass.

    The plugin I used is cordova-plugin-device-orientation, now I learn that this plugin is/will be deprecated, and it will be supported in browser like touch and gyroscope.

    Thanks for your code, I was looking for it but not in this case.

  • Thank you Mikal, I give it a try and feeedback later.

  • hi, I have 2 questions:

    I Have a project that uses cordova-plugin-device-orientation, but now I discovered that this plugin is(will be) deprecated. I need to know if :

    1) C3 is able to compile with plugin cordova included or not yet?

    2) Is Alpha indication in gyro sensor in C3 plugin, can indicates north direction or only heading?

    This topic blog.phonegap.com/migrating-from-the-cordova-device-orientation-plugin-8442b869e6cc

    gives solution to get compass direction, but I want to know if I can get access to compass noth directy from C3.

    Thank you.

  • > I'm working on the same solution, tried websocket on local server (ws:// and not wss://), I'm wondering if you succeed making a local wss server for websocket, because this will allows me to use iOS mobiles also.

    On this side note, I don't think I'm currently using any secure connection for the server. But I'm sure the iOS players can also connect to the server with the same process as android users. If you wish to discuss this subject further, perhaps could you create a new topic? I would gladly share what was my process so far.

    Telecs

    Not necessary creating another topic.

    iOS 12.2 limited access to accelerometer/gyroscope from unsecured connection, on android we still able to get mobile gyroscope data and send it over websocket to PC. That's why i'm looking for a local wss server, this will allows me get gyroscope data from both android and iOS.

    Coming back to Bluetooth plugin, I'm trying to find out how to use it, maybe this will solve my problem.

  • Hi,

    Still on the topic of bluetooth, I'm wondering if this plugin allows the use of smartphones as gamepad via bluetooth.

    I'm currently developing a game since last year using smartphones as gamepad and, as you can guess, we encountered lots of problems while trying to get the phones working as gamepad for a fast pace game for up to four players. We explored (almost) every possibility for it (AirConsole, webRTC, websocket) and the most stable result is actually the use of a local websocket server with TCP communications. Although, there are sometimes a few lags and the connection process is far from convenient. That's why I'm inquiring about this new plugin.

    Does anybody have an idea whether this plugin allows 1) a fast communication between a smartphone and a computer and 2) the use of UDP to communicate to the computer the state of each button on the phone screen?

    I admit I had a ray of hope when I saw that a proper bluetooth plugin was implemented since our current solution is far from perfect. I just hope this technology can work in our case!

    Thanks a lot for your insights.

    Telecs

    Hi,

    I'm working on the same solution, tried websocket on local server (ws:// and not wss://), I'm wondering if you succeed making a local wss server for websocket, because this will allows me to use iOS mobiles also.

    Back to Bluetooth plugin, I was happy learning that C3 has built in Bluetooth plugin, I hope someone come with a complete tutorial from pairing to communication between two or three devices, I think this will provide better solution for local multiplayer.

    My question for Ashley: speaking about latency for two players connected to the same WIFI router , can you confirm if Bluetooth plugin is better than Multiplayer one? Thanks.