Slider menu for programming more efficiently?

Started by
5 comments, last by zuhane 8 years, 5 months ago

A friend told me a while ago about some kind of .dll/library/plugin file available to assist with

game development that lets you adjust variables on the fly. Basically, as my game progresses and

gets inherently more complex, I have to keep recompiling while I tweak variables, and it's really

not very time-efficient. This guy said that there was something out there that provided a simple dropdown

menu with a few sliders that lets you allocate certain variables to it and tweak them on the fly. I'm

currently working on balancing the power of weapons, and this means that the tiniest stat changes

essentially have the hugest implications on gameplay.

Is there anything like this available for XNA/C# that I could temporarily put in to speed up development?

I'd rather not code one myself from scratch if I don't have to! He also said that the one he used was

for a different IDE and language, so it's not of much use to me!

Looking forward to hearing from you guys. Thanks!

Advertisement

Maybe antweakbar don't know if it has C# bindings though..I also don't know the current state of the project( if that what you are looking for anyways ).

If you're able to host your XNA game in a Winforms wrapper, I guess you could use a System.Windows.Forms.PropertyGrid control. Or just pop one up in a new top-level window or something.

You just assign it an object and it uses reflection to let you manipulate properties in the UI.

If you need a slightly different set of values each time, you could put them in a data file format, like INI, JSON, YAML, or even XML, load that file on startup, and set the values from the data in the file.
I have no idea what file format is supported out of the box by XNA, but one of those is bound to exist smile.png

If the number of values is small you could even provide them as arguments to your program, at the command-line (if such a thing exists in XNA country).

One option is to just store as many of the variables as possible that you are tweaking in a config file, and (possibly) hot-reload them.

It's called configuration rolleyes.gif

I once though about designing the whole model part with plain configuration, so you'll eventually write XMLs instead of C# code.

But I completly dislike that idea (For small games/projects at least).

If you're planning to build an engine (Or a full operative game library) then you should use configuration.

For some games I've built simple WinForms editors to adujt the health/attack/speed of enemies.

Thanks guys. I certainly have a lot to consider! I think I'll try phil_t's idea, since I'm pretty comfortable with

forms from uni :D

This topic is closed to new replies.

Advertisement