Front end to select switches / mods

Suggest or Vote on new features here.
User avatar
philcha
Posts:17
Joined:Wed Nov 29, 2006 2:08 pm
Location:UK
Contact:
Front end to select switches / mods

Postby philcha » Thu Dec 13, 2007 5:00 am

A while ago I posted about a front-end I was developing to select switch settings from a form. At the time I was using an HTA (Hypertext Application, which runs only in Internet Explorer). For various reasons I now think IE is the wrong vehicle, and I'm looking at alternatives.

Before I go any further, there are some things I need to know:
  • * Is Lord B or anyone else currently working on a menu for selecting mods and setting switches? If so, how's it going? If someone else is making good progress, there's no point in my starting a similar project.
    * Would other MOO2 enthusiasts find it useful to have a front-end which allows them to select from a form which mods and switches to use?
    * Which platforms do MOO2 players actually use? (see below).
The setup I'm considering is as follows:
  • * DOSBox runs my projected front-end, which launches the appropriate app (straight MOO2 v1.4 or one of the mods) with the appropriate switches.
    * Continuing an existing game is handled by an option which launches the required executable (straight v1.4 or a mod) without switches (or atleast without the switches which control game set-up). I suspect continuing a game still needs to go through the form in order to select the mod.
    * The front-end saves the selected mod and switches and makes them the defaults next time it is used to start a new game or continue an existing one.
    * I expect the front-end will have 2 configuration files - one for saved defaults (the user never touches this) and one for menu options, which can be updated / downloaded if new mods / switches are developed.
Please suggest any other features you think I should consider if I start development.

The vehicles I'm currently considering are Pascal (Free Pascal) and Java. Pascal's easier but: I'm not sure that suitable GUIs are available and free for all platforms; a Pascal program would have to be re-compiled and re-linked for non-Windows platforms, and I only have Windows (XP) - this would also make supporting it for non-Win platforms more difficult. Java would be cross-platform and free but: is a pain in the a** because you have to learn the relevant parts of its class hierarchy before starting development; requires the user to have / download a suitable JVM and possibly e.g. Swing; Java runs fast enough these days but is still a memory hog (* see note). Can anyone help me to decide, or suggest other free cross-platform development environments which might do the job more easily?

* Since D-fend is no longer being developed I currently use DBGL as a DOSBox front-end, and DBGL is written in Java. But I've just got a new PC with 2GB RAM. I don't know whether Java's memory requirements would be a problem for players with 1GB RAM or less (my last PC had 512MB).

User avatar
TheDS
Posts:26
Joined:Mon Feb 18, 2008 7:54 pm
Location:Daytona Beach area
Contact:

Postby TheDS » Tue Feb 19, 2008 10:51 am

Interesting project! Any progress on it?
Why do they get to attack me without war being declared, but I can't do the same?

Turbo Beholder
Posts:15
Joined:Tue Feb 26, 2008 3:32 am
Contact:

Postby Turbo Beholder » Fri Feb 29, 2008 7:21 am

Is Lord B or anyone else currently working on a menu for selecting mods and setting switches? If so, how's it going? If someone else is making good progress, there's no point in my starting a similar project.
I like your ideas, but want to say: KISS, KISS, and KISS. :)
Making mods without any file replacements is simplest variant ever (especially to install/uninstall/manage). Just give new names to changed resource files and executable, and replace all references to default files are to corresponding modifyed files.
Player starts Orion2v140.exe when wants default ruleset and BlastEmAllMod140.exe for mod, and that's all — no extra complications and file-shuffling.
And simple editing of "SAVE%d.GAM" string in executable gives separate set of save-slots. :!:
BTW, changed files can be generated on user side from fabric ones, with OCL+ or even better via small diff/patch utilites.
Would other MOO2 enthusiasts find it useful to have a front-end which allows them to select from a form which mods and switches to use?
Mods are simple to choose and launch (multiple entries in DosBox frontend is easiest way), but command-line options is still some problem, yes.
DOSBox runs my projected front-end, which launches the appropriate app (straight MOO2 v1.4 or one of the mods) with the appropriate switches.
But this means frontend works under DOS (and is compiled for). Isn't it simplest to make it with readily available visual GUI-builder without DOS limitations ?
The front-end saves the selected mod and switches and makes them the defaults
...in plaintext format. :)
I would propose to do it as a something like frontend writing simple bat-file, which either
a) runs from another simple batch-file which calls configured bat after frontend termination, or
b) frontend starts DosBox with configured bat-file as an argument (and perhaps kill itself).
Then "frontend" shrinks to few "if-then"s and text-output strings added to generated GUI code.
On the other hand, if this GUI is supposed to change config from last state and not some default, it needs to parse it all.
Or it can save its GUI controls' states in separate file and read it, generating batchfile only onExit. Then new version causes configuration reset, but it's still simple.
I expect the front-end will have 2 configuration files - one for saved defaults (the user never touches this) and one for menu options, which can be updated / downloaded if new mods / switches are developed.
And how much there frontend is beside its GUI ?
Mods, on the other hand, will rise any problems only when there's new command line options — i.e. when have really severe changes or based on different patches.
Please suggest any other features you think I should consider if I start development.
I suggest to do as much coding as necessary and not a line more. :)
The vehicles I'm currently considering are Pascal (Free Pascal) and Java. Pascal's easier but: I'm not sure that suitable GUIs are available and free for all platforms
[...]
Can anyone help me to decide, or suggest other free cross-platform development environments which might do the job more easily?
Actually, as long as you don't need to parse text or something, it's depends merely on which GUI-builder you like. I prefer Glade/GTK+, with C/C++ (OpenWatcom). "GUI2text" frontend can have such a low complexity that all C/C++ knowledge you'll need boils down to "how to get filename from command line" and "how to write text to file with known name", and is accessible via context help. Minor modification of ready code is simple, as long as you can get some general idea how it works: e.g. i myself came from Pascal camp, and learned basics of C (and event-based OOP as such) with QuakeC mods. ;)
But I've just got a new PC with 2GB RAM. I don't know whether Java's memory requirements would be a problem for players with 1GB RAM or less (my last PC had 512MB).
That's why it's better to Keep It Simple and not rely on extra software: it will be completely irrelevant which of DOSBox frontends is used (and whether there's any at all). 3 things to install (MoO2 control frontend, MoO2 itself and DosBox) are necessary and sufficient.
"Two Eyes Good, Eleven Eyes Better."
- Michele Carter


Return to “Suggestions”

Who is online

Users browsing this forum: No registered users and 9 guests