It looks like you're new here. If you want to get involved, click one of these buttons!

- 7.3K All Categories
- 8 Help with translations
- 4K General questions
- 98 Roadmap
- 328 Game & application design
- 292 Plugins
- 65 User experience
- 69 Marketplace
- 275 Code snippets
- 33 Building a team?
- 247 Suggestions & requests
- 344 Announce your apps made with Gideros.
- 87 Step by step tutorials
- 610 Bugs and issues
- 178 Introduce yourself
- 190 Announcements
- 81 Forum talk
- 385 Relax cafe

## Comments

I let the browser load the app for a least 10 mins but nothing, like an infinite loop.

my growING GIDEROS github repositories:https://github.com/mokalux?tab=repositoriesLikes: MoKaLux

The problem here is that the new gideros didn't throw any errors with those valuable infos. I had to use previous gideros to have the errors in plain:

"json is missing line 35..."my growING GIDEROS github repositories:https://github.com/mokalux?tab=repositorieshttps://deluxepixel.com

my growING GIDEROS github repositories:https://github.com/mokalux?tab=repositoriesmy growING GIDEROS github repositories:https://github.com/mokalux?tab=repositoriesLikes: keszegh, MoKaLux, SinisterSoft

my growING GIDEROS github repositories:https://github.com/mokalux?tab=repositoriesLikes: MoKaLux

I never used the compression before because of the warning: higher memory usage during loading but it seems to run faster than before so I am going to compress html5 from now on.

my growING GIDEROS github repositories:https://github.com/mokalux?tab=repositoriesmy growING GIDEROS github repositories:https://github.com/mokalux?tab=repositoriesTry changing the formula like I said and checking the modified formula on your devices.

-Do not use GPS data, but only using magnetic sensor data!

-Remove the cover (case) from the phone - it may have magnets to automatically turn off the screen.

I have tested both formulas, the old formula does not always show incorrectly, it shows incorrectly depending on the position of the phone. The new formula always shows the correct result

ps/ I'm not mistaken! Or in different phones the axes of the magnetic sensors have been changed

in that case it is more logical to put "y" instead of "-y"

https://play.google.com/store/apps/developer?id=razorback456

мій блог по гідерос https://simartinfo.blogspot.com

Слава Україні!

Could it really be that different phones have different axis ????

Likes: MoKaLux

In the new 2019.12.1 there are two new plugins:

easing and scenemanager

So you don't need to include the sources for those in your code anymore, just require them if you want them, eg:

require "easing"

require "scenemanager"

Don't forget to add them in the project plugins too.

This makes it much easier for us to make demos that include easing and scenemanager functions - I'll be posting an example later today of some skeleton game code that has menus controlled by touch, mouse, keyboard or gamepad controller.

Likes: MoKaLux, plicatibu

https://deluxepixel.com

Viva Gideros!

my growING GIDEROS github repositories:https://github.com/mokalux?tab=repositoriesMagnetic sensors are not available on all phones, it is very easy to check, you can swipe the magnet from the bottom of the phone from the bottom up and the phone should switch off

Or you can use the program:

https://play.google.com/store/apps/details?id=com.cpuid.cpu_z -

There is a difference between the upper and lower hemispheres of the earth - in Australia the magnetic field will point to the sky, and in Europe the magnetic field will point to the earth, but the direction of the pole will be indicated equally in Australia and Europe.

- You are right if you keep the phone parallel to the ground, but the number pi is required to calculate the correction to rotate the phone relative to the ground. - instead of the number pi, you can use the accelerometer sensor to make a correction. If we compare 2 formulas - which is now: 'A' - then it is not logical that the y-axis is expanded. Logical option 'b'

Likes: antix, MoKaLux

https://play.google.com/store/apps/developer?id=razorback456

мій блог по гідерос https://simartinfo.blogspot.com

Слава Україні!

https://play.google.com/store/apps/developer?id=razorback456

мій блог по гідерос https://simartinfo.blogspot.com

Слава Україні!

http://forum.giderosmobile.com/discussion/7975/skeleton-game-code?new=1

https://deluxepixel.com

Of course if you are only interested in magnetic north as opposed to true north, then you don't need to care. For a mapping applications, true north is certainly better. I agree that accelerometer should be used, but I can't see any logic in adding 180° to account for non parallelism to ground. Adding a constant offset would just correct for application orientation, if different from the sensor orientation. In android, magnetic sensor axis are supposed to match the phone axis in its standard orientation, which is supposed to be portrait, although not clearly stated (https://developer.android.com/reference/android/hardware/SensorEvent). If the phone is not held strictly horizontally, then the 'z' component of the magnetic field should be used in our computation, which we never do. I don't deny that current option is wrong in theory, and that yours is more logical, but adding that 180° offset shouldn't be needed. I am ok to reverse the sign of y, but unless you can explain me why that 180° offset is needed in theory, I'll keep feeling that we missed something. I'd rather do it right once and for all, that's all.

Likes: SinisterSoft

The compass is designed to show a magnetic pole - and it shows a magnetic pole without displacement

It doesn't matter where the magnetic pole is - it's just a reference point for azimuth calculation Imagine that a compass is a 3d sphere that is rotated by its pole to a magnetic pole.

We need to make a 3d sphere projection on a 2d image

To do this we need to calculate the rotation of the sphere along the X axis and the Y axis

This formula is described in Wikipedia, I cannot mention the title of the article because I have read a lot of articles on this topic

https://play.google.com/store/apps/developer?id=razorback456

мій блог по гідерос https://simartinfo.blogspot.com

Слава Україні!

Because the formula is about a magnetic sensor 180/pi -In order to translate radians to degrees

https://play.google.com/store/apps/developer?id=razorback456

мій блог по гідерос https://simartinfo.blogspot.com

Слава Україні!

double magneticHeading = (Math.atan2(x, y)

+ Math.PI) * (180 / Math.PI);https://dustinpfister.github.io/2019/03/19/js-math-atan2/

https://play.google.com/store/apps/developer?id=razorback456

мій блог по гідерос https://simartinfo.blogspot.com

Слава Україні!

The best way out would be to make the compass 3 arrows of 3m different formulas and test their behavior

Only formula (A) gives correct readings

Formula (b) points in the opposite direction

--If screen rotation is enabled on the phone - formula b does not work and formula a is working correctly

https://play.google.com/store/apps/developer?id=razorback456

мій блог по гідерос https://simartinfo.blogspot.com

Слава Україні!

1° My compasses were not properly calibrated, I fixed that

2° Original Gideros function (atan2(x,-y)+180°) to compute magnetic heading was correct on my phones (it gives the same result as google functions, and the results are correct in practice)

3° Changing it to (atan2(x,y)+180°) as suggested by @oleg gives incorrect results

4° Making it just atan2(x,y) as suggested by me is incorrect too

5° Using atan2(-x,y) gives correct results (that's logical, if 2° works)

This leads me into thinking that magnetometer placement isn't what I expected by reading the docs, and maybe even not consistent across devices. If we suppose that this is the case, and that, hopefully, accelerometer is still always placed in the same orientation as the magnetometer (as required per android specs), then using google functions which correlate accelerometer to magnetometer may fix it (I am not sure actually)...

I tested with gideros compass example, on samsung A3 and A70.

Dislikes: oleg