Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Tomo on September 20, 2009, 06:36:58 am
-
- Inspired by the comments in http://www.hard-light.net/forums/index.php?topic=63215.60
First of all, this is merely a feasibility study.
Don't take the existence of this thread as an indicator that anything is actually going to happen.
Rewriting FRED from Scratch
(Referred to as newFRED here)
The current architecture of FRED has several fundamental flaws, that make it extremely difficult to maintain.
This is both in terms of adding new features (including insertion of SEXPs), and correcting bugs.
There are several reasons for this:
1) FRED is currently based around the Microsoft MFC classes. This leads to the following issues:- It cannot be ported to other operating systems (eg Mac, Linux)
- It cannot be compiled using any free or opensource tools, thus much of the community cannot currently assist
2) FRED is currently essentially modal.
- Edits made in one dialog while another is open may not be applied correctly
- No possibility of an Undo option
3) The current UI is far too reliant on the mouse.
4) Many new features have been requested that simply can't be done with the current architecture.
Item 1 can be essentially solved by a port to wxWidgets or QT, but this port appears to be relatively complex due to the lack of separation between GUI and functionality.
However, before a reboot can be done, two things need to happen:
A) A complete specification for the FS2 Mission and Campaign formats must exist.
- This is key to the project, as the output must be usable from the first semi-operational builds or the project will fail
B) An architecture for newFRED should be defined.
- It must use a free and multi-platform (Windows/Mac/Linux) GUI system
- It must include full multi-step Undo stack
- It must not rely on modal dialogs for normal edit functions
- It must be easy (and obvious) to select mods and multi-mods
- It must be easily extendible - preferably it should be trivial to add/edit
SEXPs and flags by editing a single configuration source file. (Already exists for SEXPs in FRED) - It should allow editing and assembly of mods into the correct folder structure on disk
- It should include error-checking editors for TBMs and TBLs. For these, there should a second configuration source to define rules
-
I think that last one would mean not just rewriting FRED but completely redoing when and how FS2 parses tables.
Not that I have a problem with that as it would be a step towards making it possible to change tables while the program is running but it does mean extra work.
As for adding SEXPs, I don't find that hugely difficult to be honest. You only really need to edit sexp.cpp/h most of the time. The only exception is if you are adding a set of arguments for the SEXP that don't match the ones that already exist (i.e not a list of ships, weapons, ship classes, messages, etc) in which case you have to edit sexp_tree.cpp/.h
The rest of the post seems reasonable though.
-
I still think we need to remember that it's primarily a mission editor and anything unrelated needs to be considered as secondary concerns.
I don't see any reason to rewrite any of the parsing code.
Mod selection could easily be achieved through an expanded launcher.
-
I think that last one would mean not just rewriting FRED but completely redoing when and how FS2 parses tables.
Most likely.
-
I still think we need to remember that it's primarily a mission editor and anything unrelated needs to be considered as secondary concerns.
I don't see any reason to rewrite any of the parsing code.
Mod selection could easily be achieved through an expanded launcher.
The point is to get an immediate feedback on whether or not the table changes you made are actually valid, and to get a unified interface to mission and table editing.
-
There's a launcher flag to output sexps to sexps.html, could something similar be done for this?
-
There's a launcher flag to output sexps to sexps.html, could something similar be done for this?
Don't quite see how these are related.
That line is referring to an editor that does error and type-checking on edits to TBL and TBMs. Even if we can't figure out a way to do this 'live', it would still be useful to have an editor that prevents you from making silly mistakes.
- There have been a great many support request posts made to this forum since I started coming here that were caused by faulty tables.
-
Ok, here's a bit of a gripe/something-to-do-better:
When you create a ship, it by default will load the weapons from a table, and will only add entries to the mission file for weapons you change. There's no easy way to change it back to load-from-table mode, other than by manually deleting the entries in the mission file. There should be a way to do that.
I totally came up with this idea on my own... The_E is lying if he says I just came onto IRC to gripe about it without actually realizing that it would be a good feature addition...
*Fingers in ears* I can't hear, you, lalalalalalalalalalalala!
-
We could probably add a button to do that now fairly easily.
*Kara adds this to his to-do list*
-
Controls that can be edited? XD
To some extent I'm actually ok with the fairly heavy use of mouse (considering all the console ports of games we get nowadays, yes I know FRED is just an editor but still), if anything I'm all #@$%!!!! with the numpad for camera rotation and on this laptop I have to literally spam the function key just to turn the camera...
-
With the 'too reliant on the mouse' comment I'm mostly griping about the other editors - eg you can't edit Events without the mouse, as everything is a context menu or a button.
(<Spacebar> activates text editing mode so you can at least change the name, but F2 is a more generic shortcut for that)
I would also like better mouse control of the 3D view - eg using the mousewheel to zoom and middleclick to rotate around the currently selected object, maybe ALT or CTRL modifiers to middleclick to move and pan the camera.
(Exactly which modifier does what would obviously need to be discussed)
-
On a related note, my keyboard has no numpad, and having to hold the little fn key and search for the matching keys, in order to move the camera, is annoying.
-
I have never built a mission I released in which I moved the camera in FRED, so yes, I'll agree: the camera is very bad.
-
Really? I find it indispensable. It's definitely problematic with a laptop keyboard, though.
-
The only real advantage a 17" laptop has is that it *should* have a number pad. Mine does. Strangely, a great many new 17"-ers don't have the number pad... which is wasteful in terms of space.
-
I have never built a mission I released in which I moved the camera in FRED, so yes, I'll agree: the camera is very bad.
eh?
-
eh?
Well, that's not totally true. I have used the built-in zoom in on ship/zoom out to encompass all ships in area tools, but never altered the perspective in any mission I've ever released to the public, or pretended to as was the case with the design contest. :P
-
eh?
Well, that's not totally true. I have used the built-in zoom in on ship/zoom out to encompass all ships in area tools, but never altered the perspective in any mission I've ever released to the public, or pretended to as was the case with the design contest. :P
Yeah what the hell ever happened to that contest? It started like 7 years ago.
I think she's dead.
-
argh
-
argh
Oh wait, 4 years ago. That's still an infant baby for any FS2 project :lol: :lol: :lol: