Monday, July 25, 2011

Tweaking Values In Game – AntTweakBar

A common problem when working on games and other programs is that you end up with some magic numbers in code which need lots of tuning. If you don’t have a good solution to the problem, you end up repeatedly making changes, recompiling, running, and then repeating.

Wouldn’t it be great if someone made a drop-in system which gave a UI for tweaking values at run time? Well, Philippe Decaudin has done just that, and has written AntTweakBar.

I just used it. It dropped in with just a few lines of code, and looks/works great in game. Now it just takes one line of code for each variable I want to tweak in game. I’m very impressed. Check out this video of AntTweakBar in use.

(This is for C/C++ by the way.)