Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Tomo on September 20, 2009, 06:36:58 am

Title: FRED Reboot (Discuss)
Post 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:2) FRED is currently essentially modal.
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.
B) An architecture for newFRED should be defined.
Title: Re: FRED Reboot (Discuss)
Post by: karajorma on September 20, 2009, 06:49:13 am
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.
Title: Re: FRED Reboot (Discuss)
Post by: Spicious on September 20, 2009, 07:09:39 am
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.
Title: Re: FRED Reboot (Discuss)
Post by: portej05 on September 20, 2009, 08:31:11 am
I think that last one would mean not just rewriting FRED but completely redoing when and how FS2 parses tables.

Most likely.
Title: Re: FRED Reboot (Discuss)
Post by: The E on September 20, 2009, 08:39:03 am
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.
Title: Re: FRED Reboot (Discuss)
Post by: Aardwolf on September 21, 2009, 06:14:03 pm
There's a launcher flag to output sexps to sexps.html, could something similar be done for this?
Title: Re: FRED Reboot (Discuss)
Post by: Tomo on September 24, 2009, 03:06:51 pm
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.
Title: Re: FRED Reboot (Discuss)
Post by: Aardwolf on September 29, 2009, 07:00:59 pm
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!
Title: Re: FRED Reboot (Discuss)
Post by: karajorma on September 29, 2009, 07:19:59 pm
We could probably add a button to do that now fairly easily.

*Kara adds this to his to-do list*
Title: Re: FRED Reboot (Discuss)
Post by: asyikarea51 on September 30, 2009, 01:17:53 am
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...
Title: Re: FRED Reboot (Discuss)
Post by: Tomo on September 30, 2009, 02:41:37 am
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)
Title: Re: FRED Reboot (Discuss)
Post by: Aardwolf on October 01, 2009, 02:10:23 pm
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.
Title: Re: FRED Reboot (Discuss)
Post by: NGTM-1R on October 03, 2009, 02:54:03 am
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.
Title: Re: FRED Reboot (Discuss)
Post by: Ransom on October 03, 2009, 09:16:06 am
Really? I find it indispensable. It's definitely problematic with a laptop keyboard, though.
Title: Re: FRED Reboot (Discuss)
Post by: Thaeris on October 03, 2009, 01:46:53 pm
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.
Title: Re: FRED Reboot (Discuss)
Post by: Akalabeth Angel on October 03, 2009, 11:22:58 pm
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?
Title: Re: FRED Reboot (Discuss)
Post by: NGTM-1R on October 04, 2009, 01:47:38 am
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
Title: Re: FRED Reboot (Discuss)
Post by: Akalabeth Angel on October 04, 2009, 02:02:25 am
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.
Title: Re: FRED Reboot (Discuss)
Post by: Goober5000 on October 04, 2009, 08:27:40 pm
argh
Title: Re: FRED Reboot (Discuss)
Post by: Akalabeth Angel on October 09, 2009, 12:29:40 pm
argh

Oh wait, 4 years ago. That's still an infant baby for any FS2 project  :lol: :lol: :lol: