Sign in to follow this  
rhumbaflappy

BGLC Compiler SDK was added

Recommended Posts

Help AVSIM continue to serve you!
Please donate today!

All I can say is wow. As a web developer who's been scripting for years, I was always confused by the syntax and flow of BGLC code. From just a quick glance at the new docs I'm already way more comfortable with the new XML-based methodology. Of course the real test will come when trying to actually use this stuff, but I'm already much more hopeful. Thanks for the heads up!

Share this post


Link to post
Share on other sites

Great news :D.Had a quick look, but I don't know if I like the new XML format more then the old BGLC format. Will take some time to get used to it I guess.Also I have the idea that not all aspects of the previous BGL Compiler SDK are covered, for example the code to define the vertices and triangles of an object are not there. Maybe these are moved to a different SDK now.Arno

Share this post


Link to post
Share on other sites

Hi again,After playing for a while with the bglcomp I have one problem: when i call to library

Share this post


Link to post
Share on other sites

They seem to have split the creation of models from the layout of airports. The BGLComp program seems to assemble the airports. The creation of models, seems to be handled by MakeMDL, the SDK for which will supposedly be coming soon. I can see this opening up a lot of possibilities for new scenery design tools. This actually looks more like SCASM than BGLC with regards to the ease of creating scenery, so I applaud that. I'll be very interested to see the new MakeMDL SDK now.

Share this post


Link to post
Share on other sites

Well, I am somewhat confused. I start reading the FS2004BGLCompSDK.doc, paying particular attention to the Scenery File Format. As a comparison, I open one of the sample XML files. I find that the sample doesn't follow the format given:Scenery File Format:<?xml version=

Share this post


Link to post
Share on other sites

I got the example files to compile, Bill, so I guess it works even without the initial XML declaration. I don't think it makes any difference whether you include the line breaks to organize the code within the XML tags, it's purely a matter of making it more readable for the coder.

Share this post


Link to post
Share on other sites

It could be that the area in which the library is valid is limited, so then the objects could only be used in the New York area and won't show else where. This was the case in Fs2002.

Share this post


Link to post
Share on other sites

Hi!I had som serious trouble getting my first try (a refuel area) to compile - I got errors on words that, according to the documentation, should be correct. For example: I wrote, as stated in the doc, REFUELREPAIR (a trigger) which was not accepted. Same thing on the availability-variable...I opened the file bglcomp.xsd with the Notepad (just drag-n-drop) and found the correct syntax to be REFUEL_REPAIR. Bingo - compiled without errors. Might be useful to know if you get strange errors reported. Seems easy, but if MS tells you to write REFUELREPAIR, then you do... ;-)/hans

Share this post


Link to post
Share on other sites

Arno, that was my concern, too. I tried placing the leaning tower of Pisa in my own scenery with Airport and it worked fine. There must be some other reason why it din't work. Best regards, Chris

Share this post


Link to post
Share on other sites

I tried to place both on a test location (far away from both cities). The leaning tower of Pisa does appear, but the Statue of Liberty does not. So I think there is still some difference between the library files, maybe some are basically still the old Fs2002 files?

Share this post


Link to post
Share on other sites

Hi all.You can easily place objects at a height relative to the ground elevation:<?xml version="1.0"?>This code suspends the Oil Rig example at Tacoma 100 meters in the air.Dick

Share this post


Link to post
Share on other sites

Wow, I'm pretty much impressed. This is really early for the "main" scenery SDK. I've just browsed through the document and it looks pretty complete as well. Not much there I haven't figured out myself by now, but still one or two gems.Arno, the object code is in RIFF files now and gets attached to the bgl files, but really seems to be a standalone file (similar to TMF files, that are really different files, but get a BGL header slapped onto them). We will only be able to create new objects with makemdl. This worries me, because we probably will loose functionality like seasonal texturing, access to FS intern variables, etc. But we'll see when the SDK comes...Another word of warning: Not everything will necessarily work as documented. For example, I haven't managed to set different colours for the heliports when I was playing around with them a few months ago (with a hexeditor). The values for the colours are there alright, but changing them doesn't seem to have any effect. Similarily, the VASI types BALL, APAP, and PANELS don't work. BALL and APAP don't show the correct lights, PANELS shows nothing at all.Also, it seems like we can't delete navaids or airspaces.Cheers, Christian

Share this post


Link to post
Share on other sites

Hi all.Another small discovery...latitude and longitude for object placement can be in decimal degrees, and using negatives for southern and western values... so lat, long and heading can be copied from TCalc2004 and added directly to XML file:<?xml version="1.0"?>This was saved as "Shuttle.txt" and compiled correctly. http://forums.avsim.net/user_files/53221.jpgHere I added a space shuttle launchpad to my home area of Delavan Wisconsin.( Seems a bit cold for a launch ).===================link to Microsoft's MSXML 4.0 download site:http://www.microsoft.com/downloads/details...&displaylang=enDick

Share this post


Link to post
Share on other sites

I'm only about 1/3 of the way thru doing careful study, but I'll say that this seems to be a step in the right direction. The XML code seems so simple compared to what we've been working with in the past. Still much to learn. From a standpoint of considering how it meshes with the trend of my own design work, it fits very well. Bob Bernstein

Share this post


Link to post
Share on other sites

Just going through the SDK and want to comment:In case anyone is wondering about the boundaries / spatial sorting FS2004 is using: - facilities are divided into LOD7 cells- scenery objects are divided into LOD8 cellsthe bgl compiler should do that for you. file wise airport facilities are grouped into LOD5 and the rest (other facilities and scenery objects) are grouped into regions (eg oceanic).Christian

Share this post


Link to post
Share on other sites

Hi Christian,Thanks for the extra info about how the file format is organized now.Your remarks about the working of 3D objects in this new format are interesting. I had similar thoughts about it when I looked at this XML format for the AFD data. I am wondering how things like checks with the IFIN1 command or so will work in this format. I hope we will get that info (with a new GMax plugin) soon :).I also noticed that the airspace commands are nicely documented in the last SDK, but just like you mention I could not see an exclude option yet. Very strange, why offer a way to make new ones if you can't remove the old ones. I will try to make some tests with it soon, maybe the old ones are overwritten automatically or so.

Share this post


Link to post
Share on other sites

That is very interesting Bob. I don't know if you followed the autogen discussion that was going one lately? There we found that replacing an autogen library object out of the default.xml file with your own library object didn't work. Just like you described they did not show. That you have the same effect now points again in the direction of a changed library format as well. I hope a future SDK will give some more info about that.

Share this post


Link to post
Share on other sites

No, not yet. Look at the post above by Bob that indicates that it is still not possible to use your own library objects with this commands. I think we need to wait for another SDK that describes the creation of libraries and 3D objects.

Share this post


Link to post
Share on other sites

As a relative novice I just placed 2 library objects (cruise liner and powerboat) into a scenery very easily.But this leds me on to another line of thinking. I'm not a programmer but I would have thought that it should be possible (he says! :) ) to make the objects move by some mechanism whereby the coordinates are made to change and are repeatedly re-read within fs9 and the object redrawn.Any chance of this?We might even see things like landable moving a/c carriers soon if so.

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