Board index FlightGear Development Canvas

What would you think of this?

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

What would you think of this?

Postby MasteroftheSKIES » Sun Aug 03, 2014 10:19 pm

Hello once again fellow simmers. I was thinking recently about making an application that allows you to customize FG without having to search through a bunch of files, to easily change things such as mouse sensitivity that would otherwise be hard to change. Is there already something like this? (not FGRun) If not, would anybody be interested?
I would use FSX but I use FlightGear because it's a project with goals.

Windows 7; Processor: 8 core 4 GHz; 8GB RAM; Graphics: NVIDIA GeForce GTX 770 (a pretty good graphics card if you're wondering)
MasteroftheSKIES
 
Posts: 216
Joined: Tue Oct 22, 2013 11:10 am
Version: 3.2
OS: Windows 7

Re: What would you think of this?

Postby elgaton » Mon Aug 04, 2014 8:31 am

Not that I know of. It would be nice to include the modifications in the core interface, if possible.
NIATCA 2nd admin, regular ATC at LIPX and creator of the LIPX custom scenery
elgaton
 
Posts: 1107
Joined: Tue Mar 19, 2013 4:58 pm
Callsign: I-ELGA/LIPX_TW
Version: Git
OS: Windows + Arch Linux

Re: What would you think of this?

Postby Hooray » Mon Aug 04, 2014 8:44 am

anything like that should not be an external application, but simply a custom FlightGear dialog (e.g. using Canvas tabs) - no need to create a separate application, which is likely to get out of sync quickly. Adding more configuration options and a a handful of dialogs/windows ("Canvas applications") should be fairly simple, and it will be automatically portable across all platforms supported by FG.

Thanks to the Canvas GUI framework, we can now create fairly modern GUI dialogs pretty easily:

http://wiki.flightgear.org/Aircraft_Center
Image

Creating a corresponding configuration dialogs with tabs, checkboxes, radio buttons and combo/drop-down menus should be fairly straightforward.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11437
Joined: Tue Mar 25, 2008 8:40 am

Re: What would you think of this?

Postby MasteroftheSKIES » Mon Aug 04, 2014 11:50 am

I'm not disagreeing with you here, but is there anything wrong with making an external app? I don't really know any of FG's 3 main languages (XML, Nasal, C++), and I'm trying to think of ways to help.
I would use FSX but I use FlightGear because it's a project with goals.

Windows 7; Processor: 8 core 4 GHz; 8GB RAM; Graphics: NVIDIA GeForce GTX 770 (a pretty good graphics card if you're wondering)
MasteroftheSKIES
 
Posts: 216
Joined: Tue Oct 22, 2013 11:10 am
Version: 3.2
OS: Windows 7

Re: What would you think of this?

Postby elgaton » Mon Aug 04, 2014 12:26 pm

MasteroftheSKIES wrote in Mon Aug 04, 2014 11:50 am:I'm not disagreeing with you here, but is there anything wrong with making an external app?

It's more difficult for non-technical users to get, install and use it; moreover, as Hooray said, if you write it in XML+Nasal it's already cross platform (no need to maintain three ports - one for Windows, one for Mac and one for Linux).

Anyway, I had a look at the Nasal documentation on the wiki, if you have some programming experience it shouldn't be hard (I'm starting to learn Nasal and XML as well to implement a visual docking guidance system once I'm done with some work for the Festival of FlightGear and my LIPX custom scenery). Should you have any questions or doubts, all of us on the forums are willing and happy to help :)
NIATCA 2nd admin, regular ATC at LIPX and creator of the LIPX custom scenery
elgaton
 
Posts: 1107
Joined: Tue Mar 19, 2013 4:58 pm
Callsign: I-ELGA/LIPX_TW
Version: Git
OS: Windows + Arch Linux

Re: What would you think of this?

Postby Hooray » Mon Aug 04, 2014 12:29 pm

Obviously, you are free to do whatever you want - however, any 3rd party "toolkit/language" is likely come with its own drawbacks in comparison to a more native approach.
Just look at the number of FlightGear related 3rd party tools and how most of them have become irrelevant fairly quickly, or even just the plethora of FlightGear GUI launchers:
http://wiki.flightgear.org/Aircraft_Cen ... _Situation

Also, XML is not a programming language - so given that you are considering to use a real programming language to create such a tool, learning the tiny subset of XML that is relevant to FlightGear/GUI files should be fairly straightforward. Our GUI files are extremely simple actually.
C++ knowledge really isn't needed at all - and Nasal, well - as long as you know any other language, the relevant bits of Nasal should be easy to "master" quickly.

Honestly, just tell us the kind of programming language or GUI toolkit that you are considering to use.
Usually, this will involve a fair amount of boilerplate code and a lot of external dependencies - none of these would be an issue once you simply use FG technologies, and just consider FlightGear as a "technology stack" (XML, scripting, GUI, networking, logging etc).

Or just look at the AircraftCenter.nas file - which is fairly compact and could be easily extended to provide 70-80% of the front-end functionality supported by external tools like fgrun etc.

Don't get me wrong: your idea sounds good, just the approach is unlikely to work in the long term - simply because we're seeing an increasing trend to improve usability and consolidate external functionality by making FlightGear better configurable at run-time and more modular overall.

FlightGear is a very chaotic project, and all those external tools are there for the same reasons that you mention now - for years, developers would state that they'd follow the "unix philosophy" of providing standalone tools that can be chained together - yet, what we've arrived at, is quite the opposite: a highly monolithic application where the majority of subsystems/features are not run-time configurable, and where many features cannot be easily made optional. That is leaking memory like crazy and showing segfaults/race conditions in several areas - pretty much like MS Windows, and not *nix :D
It's only since very recently that this mess is getting cleaned up by a few people.

There certainly will be a place for external/standalone tools that work with FlightGear, especially once HLA support has matured some more - but overall, the whole practice of coming up with dozens of 3rd party tools, using all kinds of weird languages, dialects and toolkits/dependencies, really hasn't served FlightGear very well - quite the opposite, we've seen hundreds, if not thousands, of coding hours spent developing and maintaining tools that would have been better integrated right into FlightGear - no matter if it's a moving map application like atlas (see the Map dialog) or an external GUI launcher (see the Aircraft Center).

But like I said, it's up to you obviously - but if you are hoping to make this work for the majority of users, it should better be a "native" addition using existing tools like XML, Nasal and Canvas - which is far from rocket science actually - and we've been providing fairly good mentoring/supporting to newcomers interested in such efforts.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11437
Joined: Tue Mar 25, 2008 8:40 am

Re: What would you think of this?

Postby MasteroftheSKIES » Mon Aug 04, 2014 1:19 pm

I have a lot of .NET (C#) and some C++ experience. I have a detailed understanding of methods, functions, and classes. I can understand most C++ syntax. I'm sure nasal is pretty similar to most languages. I feel like I'm writing a resume :D
I would use FSX but I use FlightGear because it's a project with goals.

Windows 7; Processor: 8 core 4 GHz; 8GB RAM; Graphics: NVIDIA GeForce GTX 770 (a pretty good graphics card if you're wondering)
MasteroftheSKIES
 
Posts: 216
Joined: Tue Oct 22, 2013 11:10 am
Version: 3.2
OS: Windows 7

Re: What would you think of this?

Postby Hooray » Mon Aug 04, 2014 1:33 pm

with that sort of background, you'll find Nasal pretty simple probably - also, keep in mind that even if you were to create a GUI front-end using .NET/C#, that an equivalent version using just Nasal/Canvas is likely to be more "dense", i.e. even a fairly complex GUI front-end like fgrun could probably be re-created using a fraction of the code. A simple configuration dialog/window with tabs could be implemented in under 300-500 lines of Nasal code - just look at the failure manager dialog that Necolatis has been working on - the whole dialog is created procedurally (i.e. at run-time), and otherwise very lightweight:

Image

Adding tabs, or other widgets, should be fairly straightforward.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11437
Joined: Tue Mar 25, 2008 8:40 am


Return to Canvas

Who is online

Users browsing this forum: No registered users and 2 guests