Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / (for Paul) AGK 2.0.22 request : SENSOR_DELAY for VR

Author
Message
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 9th Dec 2016 22:53 Edited at: 9th Dec 2016 22:59
Paul,

After having tested my phone for the maximum frequency for my android mobile phone sensors (https://play.google.com/store/apps/details?id=com.cochibo.accfreq) , i see that my LG G5 sensors can run at 200Hz max with the SENSOR_DELAY_FASTEST constant (so... capturing movements every 5ms). so i have searched into the AppGameKit player sources for the SENSOR_DELAY_GAME constant (but nothing was found :p) and i have found that AppGameKit use and set the minimum the sensors can do, while it's not under 16.667ms (60hz), as the screen rendering frequency (60fps) (which at first sight makes sense with sensors prediction algorithm ... but without a prediction algorithm, it's not sufficient) .... so i wanted to try to reduce the delay at the maximum...

To test that, i have commented out from the C:\AGK_2.0.21\Tier 2\apps\interpreter_android_google\AGKPlayer2\src\main\jni\main.c file the following lines (but in VR and specifically with the GetRawRotationVectorW2,X2,Y2,Z2 i think only one or two sensors must be "boosted" ... gyro and rot vector ?) and i have recompiled with NDK ... the result is impressive and movements are much smoother ! (but i can imagine removing theses lines can be a battery killer depending on the phone...) ) :

for the APP_CMD_GAINED_FOCUS and the APP_CMD_RESUME events :



So my request is :
Please add, in the next version, a Tier1 command to specify the sensor and its refresh delay ! (0 for minimum autodetection with the min threashold at 16.6667 ... as today / or a INT in µs , or a float in ms, or a frequency... as you wish !)
Or a simple command "SetVRMode(1)" (which reduce the delay at the minimum when it is 1 for the VR dedicated sensors (gyro,rot,magnetic etc..)... and SetVRMode(0) to come back to previous intial frequency as calculated today)

Thanks in advance Paul !
--------------------------------
Join us on dedicated AppGameKit WeeKChat :
https://week.chat/room/AppGameKit
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 12th Dec 2016 14:07
I've added this to the next version, and also made it so sensors only activate when they are used, to save battery if they are not.
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 12th Dec 2016 21:08
Great addition !

Thanks a lot !
--------------------------------
Join us on dedicated AppGameKit WeeKChat :
https://week.chat/room/AppGameKit
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 12th Dec 2016 21:13
This will be perfect for my little VR project. Should make the user experience a good deal better!

Cheers!
Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 12th Dec 2016 21:36
I hope this will work!

[/url]

Login to post a reply

Server time is: 2024-11-24 22:29:07
Your offset time is: 2024-11-24 22:29:07