Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Bgl / Api crash detection

Featured Replies

Hi,I found some code on the forum a while ago that would add crash detection to bgl's called from an api as a library object via fsregen.I have found that when an aircraft nears the object in the sim psychedelic effects appear in the sim, if I remove the crash detection everything seams fine.I have been searching for the forum for the original example to check what I did, I think it was a post by Arno, but I am unable to find it.Could someone point me in the right direction.Thanks,

  • Replies 31
  • Views 2.5k
  • Created
  • Last Reply

Top Posters In This Topic

  • Commercial Member

Can you point to code maybe? I think there might a small error in it causing the problem. If you post it we might be able to spot it.Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Thanks for the reply Arno,I am writing a small prog in c++ to edit small things that have to be changed in different files, changing

  • Commercial Member

I wanted to see if all label are OK, etc, but that seems fine.I'll try at home and see if I can reproduce the effects there when adding the crash code.Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Hi David.I'm attaching 2 TXT files. The first is the Object Library ASM code for a huge house, made in GMax, and processed by fsregen into an object libray BGLC code... and has the 'ripped' crash-detection added.The second file is a SCASM code that places the object.Crash detection works fine. And you should see what needs to be extracted from HouseObject.asm and where it should be added to the object library code.Dick

Dick,I "chop n changed" my file as your example 1, but had the same problem. So could the problem be the api macro.I am using FSSC to place the macros and have three different examples, I'm not sure of the difference, or could it be FSSC causing the problem.Here are the three examples, one is FsRegen generated, another from the FsRegen tutorial and the other from the Arno tutorial.Thanks again for your help, David

Hi David.Did you compile the bgls from the examples I attached, then used them in the sim? Can you crash into the huge house? I just saved them from the attachments and compiled them again, and they work as expected on my system with FS2002.If those examples still produce odd visual results on crashing, there's either something wrong with your computer, or your FS2002 setup ( or addons ).I don't see anything with any of those API's that would cause a problem. They just place a library object.Dick

Hi Dick,When I tried your example, FSSC reports:Error in macro file C:MYDOCU~1FS2002~1MACROSDICKCR~1.SCM line 21 -> EndA -> unresolved label :PlaceObject1 in line 10Scasm compilation status: error(s) 1David

  • Commercial Member

Little typo in the file, replace the :PlaceObject1 with :PlaceObject_1 and then it should work.Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Hello again, no luck,Must be something peculiar to my system. If I do things the original way and leave out the crash detection, no problem. I used Dicks example files with the correction, and the whole of my scenery was excluded.Dont know if its the directories used or what, maybe a complete re-install would help.Thanks again, David

  • Commercial Member

Hi David,Can you mail me the BGL file(s), then I can test it on my PC this evening and see if with the same BGL it works [email protected]


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Thanks for the help Arno, I'll send them now.David

Hi David.One file can be drag'n'dropped onto SCASM's icon to compile. The other can be Drag'n'dropped onto BGLC. FSSC should even be used with those examples to see if they work. Just compile them, and go to the location, and crash you plane into the huge grey house. ( grey because you didn't get the textures ).I'm sensing a dependance on FSSC here that's interfering with your need to check out this problem. If without the use of FSSC, your crash detection is fine, then it is FSSC that is causing the problem somehow... or perhaps your version of SCASM used by FSSC is somehow not quite right.If you give Arno the sourcecode produced by FSSC, maybe he can find a problem.But the visual deformities you have mentioned, point to a hardware problem... not a SCASM coding problem.Dick

Dick,I did as you suggested and compiled the raw files, took the aircraft within a few feet of the BIG house, look round from virtual cockpit or external view and the effect is like having the "pointer trail" for the mouse turned on in the control panel (as near to the effect as I can describe)Where next? David

Hi David.I'm sure this is a problem with your hardware, probably the way it renders Directx7 or 8.Try changing the resolution of your videocard to different Fullscreen settings.. 16 bit instead of 32.. or different sizes... or bilinear filtering rather than trilinear. If it's the videocard ( or it's driver ), different settings will have different odd effects. DickP.S. What are your computer specs?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.