Jump to content
Sign in to follow this  
Guest christian

Bgl / Api crash detection

Recommended Posts

Guest

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,

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest

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

Share this post


Link to post
Share on other sites

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 there.arno@nl-2000.comArno


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

Share this post


Link to post
Share on other sites
Guest

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest

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

Share this post


Link to post
Share on other sites

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?

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...