This section of the archives stores flipcode's complete Developer Toolbox collection, featuring a variety of mini-articles and source code contributions from our readers.

 

  Quick And Dirty Parameter Tuning
  Submitted by



Have you ever had a parameter value that you needed to tune interactively but didn't want to spend the time to make that possible? You can use your debugger to do this easily.

Original code:

thePhysics->ConstrainPosition(0.05,0.04,0);

Tunable code:

static float xstr = 0.05;
static float ystr = 0.04;

thePhysics->ConstrainPosition(xstr,ystr,0);

By setting a breakpoint and modifying the value of the statics you can tune the values in a persistant fashion (i.e. they won't get reset between invocations of the code within the same debug session) without recompiling your .exe.

- Don

The zip file viewer built into the Developer Toolbox made use of the zlib library, as well as the zlibdll source additions.

 

Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.