Jump to content

  • Log In with Google      Sign In   
  • Create Account


Neometron

Member Since 22 Feb 2007
Offline Last Active Aug 29 2014 11:47 PM

Posts I've Made

In Topic: Floats and Android Devices

13 August 2013 - 08:13 AM

Thanks Hodgman for the article. I have seen fixed time step method used in the Minecraft server code when I created mods for my home server. However, I have not used this method in my current project. Although, while debugging, I have set my time delta to 1.0 to check consistency between devices.

It turns out this was causing different values:

double mag = Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2) + Math.pow(this.z, 2));

 

I have changed it to this and everything became consistent and my ball collides on both devices: 

double mag = Math.sqrt((this.x*this.x) + (this.y*this.y) + (this.z*this.z));

 

Why is this?


In Topic: Floats and Android Devices

05 August 2013 - 11:05 AM

SiCrane,
My physics is essentially the same from you have shown.

This worries me that over time values will have so many errors that it will break the game.


In Topic: Floats and Android Devices

05 August 2013 - 10:57 AM

Very interesting;
Running
 float sum = 0; for(i=0; i<10000; i++) sum += 0.0001; yields 1.0000535 where doubles are 0.9999999999999062.

So currently there could be a potential problem even on my tablet over a span of time. I do check some results against an epsilon value of 0.001, but does this have to be done on every operation? How would one combat error accumulation? Is switching to doubles the answer or is that kicking the can down the road? Do I have to round all results before continuing?

Questions seem to result in more questions ;)


In Topic: Backgrounds for full 3D camera rotation

20 August 2012 - 12:22 PM

#1 is the most efficient and what you described is called a skybox. However, there should be no collision detection applied to the cube.

In Topic: Problem with Debugging of C++ Error

12 August 2012 - 12:35 PM

What is then example app? What entry point was used in relation of how the project is set up?
Basically the code compiled but the linker has errors.

"LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup C:\Users\Simon\Programme\DirectX\DirectX11Framework\DirectX11Framework\MSVCRTD.lib(crtexe.obj) DirectX11Framework"

MSVCRTD.lib is Microsoft C Runtime Library
Within the library or (crtexe.obj) the function __tmainCRTStartup() is trying to reference _main() which is non-existent.

PARTNERS