Board index FlightGear Development New features

Hoops

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Hoops

Postby freevryheid » Thu Jan 10, 2013 6:34 am

Hi, new to flightgear. Learning to fly helicopters I decided to generate a scenario that places hoops on a KSFO runway. The hoop model and the scenario files are below:

Copy hoop.ac to /Models/Geometry directory
Copy hoop.xml to /Models/Geometry directory
Copy hoops01.xml to AI directory

The coordinates in hoops01.xml were generated using the UFO and placing hoops randomly. This is simple enough and fun but I would like to implement a timer to test my progress and implement a system to test if the helicopter passed through the hoops OK. I'll need Nasal scripts for this right?

Eventually I'd like to generate a number of scenarios more complex that the previous. The AC3D file specifies the color of the hoop. Is it possible to change this color during flight or would I need another model? Is it possible to destroy a hoop once it is passed through. Any suggestions on how to go about this or pointers in the right direction are appreciated.

Thanks

Andre
freevryheid
 
Posts: 18
Joined: Thu Jan 10, 2013 6:06 am
Location: Austin, TX
Version: 2.8
OS: arch

Re: Hoops

Postby freevryheid » Sun Jan 13, 2013 7:03 pm

Nasal scripting underway: Here's a first screenshot:

Image
freevryheid
 
Posts: 18
Joined: Thu Jan 10, 2013 6:06 am
Location: Austin, TX
Version: 2.8
OS: arch

Re: Hoops

Postby mr_no » Sun Jan 13, 2013 9:45 pm

Looks great!
I saw something similar on Helijahs site HERE but I don't know if it can be downloaded.
Mosquito-XE JT-5B-autogyro Extra-300s STOL-Ch701
User avatar
mr_no
 
Posts: 360
Joined: Thu Jan 19, 2012 3:20 pm

Re: Hoops

Postby Gijs » Sun Jan 13, 2013 10:12 pm

freevryheid wrote in Thu Jan 10, 2013 6:34 am:I would like to implement a timer to test my progress and implement a system to test if the helicopter passed through the hoops OK.

You may want to take a look at the Red Bull Air Race setup by Torsten: http://www.t3r.de/fg/fgfs-rbar.html (it's very old though, so it may not work out of the box with recent versions of FlightGear)
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9542
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Hoops

Postby freevryheid » Mon Jan 14, 2013 2:09 am

Version 0.1 up and running :)

checkout @ https://gitorious.org/hoops

Thanks for the help on forums and irc. The hoop algo can be improved.
Andre
freevryheid
 
Posts: 18
Joined: Thu Jan 10, 2013 6:06 am
Location: Austin, TX
Version: 2.8
OS: arch

Re: Hoops

Postby freevryheid » Tue Jan 15, 2013 5:00 am

Updated to v0.200:
Added and modified model material properties
Models are no longer solid :)
Now uses only one hoop model
freevryheid
 
Posts: 18
Joined: Thu Jan 10, 2013 6:06 am
Location: Austin, TX
Version: 2.8
OS: arch

Re: Hoops

Postby Hooray » Wed Jan 16, 2013 10:20 pm

Hi,

great job!

freevryheid wrote in Thu Jan 10, 2013 6:34 am:pointers in the right direction are appreciated.


If you haven't already, check out $FG_ROOT/Nasal/glide_slope_tunnel.nas: https://gitorious.org/fg/fgdata/blobs/m ... tunnel.nas

I would like to implement a timer to test my progress and implement a system to test if the helicopter passed through the hoops OK. I'll need Nasal scripts for this right?


Yes, Nasal scripting is the way to go here.
But instead of using timers for this, it would be better to use the position of the hoop and compute a valid set of coordinates for passing properly (i.e. x/y/z distance).

Eventually I'd like to generate a number of scenarios more complex that the previous

You may want to consider integrating your code with the existing tutorial system: http://wiki.flightgear.org/Tutorials

The AC3D file specifies the color of the hoop. Is it possible to change this color during flight or would I need another model?

I think it should be possible to animate the model, so that you could change the color accordingly.

Also, Tom was planning to extend the canvas system such that its textures can also be placed in the scenery, too: http://wiki.flightgear.org/Canvas_Prope ... Pending.29

That would make it possible to place arbitrary procedurally created canvas textures within the FG scenery environment.

You may also want to check out these related threads:
http://www.flightgear.org/forums/viewto ... 17&t=11985
http://www.flightgear.org/forums/viewto ... =36&t=6284
http://www.flightgear.org/forums/viewto ... f=5&t=9841

That should also give you an idea of some related feature requests that you could help implement with your code ... :D
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to New features

Who is online

Users browsing this forum: No registered users and 2 guests