Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


Member Since 03 May 2009
Offline Last Active Sep 27 2013 08:40 AM

Posts I've Made

In Topic: PhysX - Scene scaling, object size, timestep and gravity inconsistency.

10 September 2013 - 06:20 AM

logicAndProcessingThread {
   //do stuff
   Sleep(30 - timeTookProcessing); //running at 30FPS

renderingThread() {
   //render stuff
   Sleep(16 - timeTookRendering); //running at 60 FPS

Wait, is that actually representative of your actual code? Those calls to sleep (especially in the physics thread) will not be doing you any good.

The accumulation loop you posted is design to run as quickly as possible (i.e. in a while(true) style loop) and fire the Physics events at the correct time. With the setup you have now the simulation will not be being called at the correct frequency due to differences in sleep time and the fact that your time deltas are going to be huge.

In Topic: PhysX - Scene scaling, object size, timestep and gravity inconsistency.

06 September 2013 - 07:01 AM

The clock() function gives you the ticks elapsed since the program was launch. PhysX expects its delta times in seconds. Try dividing your clock values by CLOCKS_PER_SEC and working in seconds rather than ticks.

In Topic: SDL 2.0 undefined functions and constants problem

12 June 2013 - 06:47 AM

A lot of methods/constants have been changed/removed for SDL2. For example, SDL_GL_SwapBuffers() is now SDL_GL_SwapWindow().

You need to update your code to use the new SDL2 methods.

In Topic: XNA - Making A Sprite Fire A Projectile

03 June 2013 - 09:05 AM

Without seeing any code it's hard to give any advice on how to fit it into your existing setup.

Coudl you post snippets of the relavent parts of your Sprite, SpriteManager, UserController and ProjectileSprite classes? Or at least the parts that seem to be causing you difficulty?

In Topic: First adroid app wont work *SOLVED*

05 April 2013 - 07:25 AM

It exits unexpectedly because the following lines of code need to be moved to onCreate, after the call to SetContentView.





TextView textField = (TextView) findViewById(R.id.textField);
TextView result = (TextView) findViewById(R.id.resultView);
EditText gameObjective = (EditText) findViewById(R.string.gameObjective);
Button button = (Button) findViewById(R.string.submitButton);