Sign in to follow this  
Guest Fabio Miguez

XML or C

Recommended Posts

Hi,I'm new to panel design, and I simply wonder which one of either XML or the old .GAU to use? As far as I understand, C is capable of much more than the XML-gauges, but does any one know for how long FS will use the old .GAU-files, or is XML the "way of the future"?Best regards,Jimmy

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hey Jimmy.Interesting question. I am affraid possibly not even MS knows the answer, although they might.XML is a lot easier to learn, but you are right, it cannot be matched to C, or C++, which offer greater programming capabilities.C and C++ also offer vector gauge programming, important if you are doing an EFIS, although I hear XML might be rolling up its sleeves and getting ready to draw vectors.I program in C++, and I would not drop it. I think the capabilities of using objects are just too good to switch to XML.As far as MS supporting GAU files, well, FS9 (FS2004) does, so that gives us at least another 2 years. And I highly doubt they would drop it in FS10 (FS2006).And don't forget GAU files are a lot harder to read than an unprotected format like XML. ANyone has access to the code you write, so for commercial developers, XML is usually not an option.

Share this post


Link to post
Share on other sites

Well, Fabio said the most things.Let's say it this way: If you can work with the C language, and you can handle Microsoft Visual Studio C++, you should try C gauges. A thing which is not so good about C gauges: Even for the easiest gauge, you may need some time, because you need different files(a master .c file, the subgauge(s) .c file(s), the .rc file). This takes some time.In C, you are able to program everything! You just need much time and much knowledge for things like an FMC or a Moving Map.If you don't want to make any complex gauges like an FMC or Moving Map, XML should be totally ok! A gauge is written very quickly(just one file for one gauge!).If you have never done some programs in C, forget about it and try learning XML.At the beginning, keep some distance from calculations, as they look very messy! C code keeps very clear.If you want to calculate 1+1, you must write 1 1 +A bit confusing at the beginning. But after a week or so, you should be able to do gauges like switches or engine instruments or an ADI, Altimeter, ...Best regards,Harry :-)

Share this post


Link to post
Share on other sites

Hey Harry.Well said, thank you for the complement.

Share this post


Link to post
Share on other sites

Thanks both of your for the answers to my question. I have been working with XML gauges a bit and think they work fine and are quite easy to program, but the idea of trying C is not totally unfamiliar to me, but for now I think I'll stick to XML/Jimmy

Share this post


Link to post
Share on other sites

>If you want to calculate 1+1, you must write 1 1 +>A bit confusing at the beginning.Usual postfix (or polish) notation :)Some calculators uses it

Share this post


Link to post
Share on other sites

The GPS is really done with XML??? Crazy, but very interessting. Looks like if XML is much more complex now!What do you mean with : "Though, it somehow must be faked..."How to fake a complete Gauge? You say it has 300kb, so why should it be faked? Everything must be written into the XML. Cause it must be VERY complex and VERY long if you write 300kb of plain text!!!So, maybe I should remove one point of the above said thing: Only in C, you are able to programm complex gauges. Maybe now, you also can do so in XML...would be great!!!Regards,Harri:-)

Share this post


Link to post
Share on other sites

Hi Etienne,Could you confirm though if the GPS functions are all self contained in the XML code or if they are enabled only because supporting functions are embedded in the FS9 modules?Has XML does not allow to I/O as you pointed out, could you confirm when you switch GPS mode in FS9 (for example leaving the NAV mode to the PROC mode, then revert back to the NAV mode) that your personal settings such as map declutter settings, map scale, on screen fields are restored to the last setting you set them to?Best,Jean-Luc

Share this post


Link to post
Share on other sites

Hey Harry and JeanLuc,It seems the XML GPS in FS9 is a "fake" because it is drawing stuff by calling C functions from DLLs. I cannot confirm this, but it seems this is what happens.And Harry, you could always make complex gauges with XML, but it would be so ridiculously messy that most don't.

Share this post


Link to post
Share on other sites

>The GPS is really done with XML??? Crazy, but very>interessting. Looks like if XML is much more complex now!>Yes, and this GPS eats much fps

Share this post


Link to post
Share on other sites

@Harry:Well, as I said, I am no XML guy. What I just mean is that I don't see anything which gets all the airport/nav/terrain info etc., at least I dunno from where it gets them. I didn't say the 'complete gauge is faked', it just seems that both navigational as well as terrain drawings are just not really coded in the gauge, but it must somehow get it from FS directly, since the usual FS map view looks and behaves exactly the same. I'm not very sure about this. You and the other XML guys may have a look at it as soon as you got your copy.And of course you can do complex gauges with XML, no doubt. It's just personal preference if you can handle 4K lines of XML code. ;-)@Jean-Luc:Aren't you a tester by yourself? So why don't you have a look. I won't, since I don't get very much of the code, unfortunately.I was, by the way, talking about file I/O, sure, if you change from NAV to PROC and back to NAV the NAV page will look the same. But I have not found any code, also not in the GPS, which makes me think XML does now support file I/O. I may be wrong, of course, let's wait for the SDK.Rgds,Etienne

Share this post


Link to post
Share on other sites

not made in XML. Only the "visible" things like Mouse Functions and buttons are in XML, the rest is made by a *dll in fs2004 modules folder, called gps.dll (p.e. I/O, GDI Drawings, Terrain).XML now seems to be able to draw GDI polygons and to call "extern" functions in a Flight simulator Module / Gauge.King Regards,Marcel Burrchief programmerbluesky software development

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this