Hard Light Productions Forums

Off-Topic Discussion => Programming => Topic started by: z64555 on April 01, 2012, 08:06:46 pm

Title: Trying to make a GUI tool
Post by: z64555 on April 01, 2012, 08:06:46 pm
As some of you may be aware, I was working on several radar mods some time back. Well, I ran into a wall. I wanted to thoroughly test them, but didn't want to go the usual modder way of mod the code, compile, wait for 30 minutes, run the .exe, find a problem, fix it, rinse wash repeat.

Instead, I wanted to get a GUI tool where I could test the algorithms completely seperate of the FSO .exe. While at first glance this may seem to be a frivilous idea, I should point out that it would be a benefit to modders seeking to make adjustments or brand new configurations for the mods.

I need help. I've looked around for some lib's to help get started, and so far I've come across wxWidgets. I'm having trouble getting it to work with Code::Blocks. :(

No, this is not a joke, unfortunately.
Title: Re: Trying to make a GUI tool
Post by: Nuke on April 01, 2012, 08:56:14 pm
if what you are testing is scripts, i might suggest lua for windows. you can use the iup library for gui elements, its fairly easy to use (theres also a set of wx bindings, but i find iup is much easier to use). lua for windows also has bindings for opengl (up to 1.3) so you can do graphics as well. before i started using those i used luasdl, which lets you build a software renderer, which for 2d stuff is ok. but ive been doing some pretty cool stuff with lfw, like writing a game engine.
Title: Re: Trying to make a GUI tool
Post by: z64555 on April 01, 2012, 09:04:09 pm
Well, the stuff I've been working on is in C/C++

I really should take a couple of weekends to look into lua, though.
Title: Re: Trying to make a GUI tool
Post by: jr2 on April 01, 2012, 11:00:44 pm
*ahem (http://www.hard-light.net/forums/index.php?topic=80302.0)*

Yes?  Or no help?
Title: Re: Trying to make a GUI tool
Post by: Nuke on April 01, 2012, 11:12:32 pm
i prototype a lot of scritping stuff in the standalone lua shell, outside of the engine. it allows me to make sure something fully works before i merge it into whatever script im developing. of course if your working in the source instead of script thats probibly a different matter entirely, and better off doing a c/++ executable.

you might want to consider trying scripted radars. ive done several.
Title: Re: Trying to make a GUI tool
Post by: z64555 on April 02, 2012, 07:46:48 am
*ahem (http://www.hard-light.net/forums/index.php?topic=80302.0)*

Yes?  Or no help?

Nope. No help. :(

you might want to consider trying scripted radars. ive done several.

Well considering that I don't know what scripting is capable of, I'd say that modding the source code was te only way I got get stuff done in a hurry. The two radar stuff's I'm working on is an N-gon radar gauge and an improvement on the ship radar visibility field on a per-ship basis.

The N-gon radar gauge is simple in theory, all it does is transform the set of radar blips so that they fit inside an N-gon of the modder's choosing. The projection of the blips to the gauge is the same as the standard oval radar, but when the blip goes outside the N-gon's boundry it is constrained to the N-gon's perimeter in a radial fashion. Modders have the option of setting N, the number of sides, and a offset angle that will rotate the N-gon. http://www.hard-light.net/forums/index.php?topic=79567.0 (http://www.hard-light.net/forums/index.php?topic=79567.0)

The radar fov improvement allows ship fov's to get a more realistic interpretation than the standard cone/sphere volume. It does this by allowing the modder to define a number of fov angles along with a % of maximum range. The algo then interpolates the defined fov cones into an ellipsoid volume. http://www.hard-light.net/forums/index.php?topic=78952.0 (http://www.hard-light.net/forums/index.php?topic=78952.0)
Title: Re: Trying to make a GUI tool
Post by: Nuke on April 02, 2012, 02:06:20 pm
you can get all the information about every in game object, position type, etc, and you have draw functions, what more do you need?
Title: Re: Trying to make a GUI tool
Post by: z64555 on April 02, 2012, 10:31:36 pm
you can get all the information about every in game object, position type, etc, and you have draw functions, what more do you need?

Time, Patience, a notebook or two, LUA references, and  An Endless Supply of Coffee
Title: Re: Trying to make a GUI tool
Post by: Nuke on April 03, 2012, 06:08:51 am
all you need for references are

http://www.lua.org/manual/5.1/

and the scripting.html file that gets spewed out by the engine when the appropriate parameters are selected.

time patience rigs and coffee can be accomplished by quitting your job, meth, dumpster, and shoplifting, respectively :D