Jump to content
Sign in to follow this  
Guest

Learn python!

Recommended Posts

Guest

Hi, everybody,Did i write it?LEARN PYTHON!!!!It's just complete object oriented language integrated with Fly!!!!I'm so surprised to read here and there that what make this simulation not as good as the other one (it seems no on dare to say its name...) is that you cannot see you house poping in when your flying 1000 feet above the ground!!! Who care? Is it about flying or about sightseeing?Whit today computer no matter if you have top end stuff with vertex shadder, GMX ordinal calculation, biFlatron with deflective neutrino, you just can't reproduce reality (even if the Andy scenery was so real....and yet unreleased), so dont care about the fancy. If you want to see fancy stuff go out and travel.The other critic is that you haven't 2000 trillon planes available for FLY!...well, it's allready hard to master the tenish or so planes available , so 2000 trillon....maybe when i will have time.The good point is panel. But the downside is that some commercials addons for fs2k2 meet this quality. But, it has allready cost me quite a lot of money to buy my biFlatron stuff to gain 2 more fps as nMerduc advertised that idont have any money left.So...But, quite sure one thing that fs has not is python (and portability to Mac plateform)! Yet, it seems nobody care!?Just look at the Adventure scripting guide: everything can be costumise, from basic stuff, to very advanced one (try CTRL+U when you're in fly...)"Yes, but it is too hard", yes as it is hard to be free. Every single stuff can be changed in this simulation. Not quite like copyrighted microsoft stuff.The point is, it is not too hard: i knew nothing about programming (but had some mathematical background) and i learned what i needed in python and programming in 2 weeks or so. Cause there is good documentation availaible. i suggest "How to Think Like a Computer Scientist : Learning with Python" by Allen Downey, Jeffrey Elkner and Chris Meyers.Not everything, just the first 11 chapters would be enought for a start.( free pdf book, just search with google)After you have understand what is a dictionnary and how it works, face the challenge and dive into Fly scripting guide and try to make something work, in the meantime continue to learn python (the tutorial that comes with the python package on www.python.org is very good to unveil the power of python). The big probleme is about the "sendmessage" fonction cause there is not appendix B in the manual, where the referenced variables for each aircraft sould have been. You have to dig that the hard way.My methode was: an eyes on the "takingchances.py" script, another on the Paul Russell's design notes(availaible here: http://lwalterthum.free.fr/svhdoc.zip, it's for fly! but except from the fact that in fly !II the SVH file is scattered in several files --the files that lies in the "FlyhawkDataWORLD" podded folder--it's enought for me) and my last one on the coffee cup.The result i understand what "takingchances.py" does! Amazing, isnt it?Now i'm working on some kind of log book, i understood that someone else have this project as well. But mine will be in french anyway and i do it for educationnal purpuse. In the meantime i do new objects class that will be realesed, documented (in english as well, as you see i master this language as my mother tongue...) and could be easely reuse in other srcipt, making the process more transparent for the user.You want, random systeme failure, realistic failure, graph of your trip, analyse of your trip, study in detail what are the trade off between the energy tanks of a plane, see your picture saying hello each time you're lauching the simulation, send a email while you're doing this challenging seven houres trip, it's up to you.Thank you, Richard and your team for a product of such a quality.PS to the freeware devellopers: release your souce code documented when you do something.PS to the payware devellopers: release your note about what your have learned and that is not documented elsewhere, especially if your going toward more fruitfull activity.This way the developping process could be easier and the fly costumer base bigger....

Share this post


Link to post
Share on other sites
Guest tonyc

I agree. Python is very powerful indeed. And the help one can get is among the best out there. tony

Share this post


Link to post
Share on other sites
Guest

Chem,Whether people use Python in Fly! or not, I would highly recommend it for those wanting to learn basic programming. It is a very flexible and forgiving language, and very easy to learn. The language itself is completely free (www.python.org) and available on just about every platform imaginable. This made it an easy choice for Fly!, and the nice thing is it allowed us to have a very strong, dynamic language built-in to Fly! that already had a user base and tons of documentation to make learning even easier.Rich

Share this post


Link to post
Share on other sites
Guest tonyc

Hey, maybe we can get those Python user to write adventures for FLY2.tony

Share this post


Link to post
Share on other sites
Guest

Thanks for the feedback,First, i don't know if a Python user who is not interested in Flight simulation in general and in Fly in particular would spend somuch time to learn the internal mecanism of the plane modeling engine (cause from a newbie point of view that's not that easy).But with the class i'm making i just need to know some information about the balise value, i put them in a dictionary in a file and then can use it as easely as Fuelflow=.unMessage("Cessna 172S Trainer","receive","FueF") sendmessage(Fuelflow)and i have then the 'realdata' info in the fuelflow dictionnary.Here is the dictionnary i use for testing purpose:{'Cessna 172S Trainer': {'PosV': ('flap', 'angl', 2, 0), 'FueF':('fFlw', 'gph_', 6, 1), '_RPM': ('tach', 'rpmn', 6, 1)}}(the other balise value corresponding to hardware and engine balise respectively)So here is my first request. If you or one of your relatives know about balise value for wathever plane fonctionning in fly, send me a email...Second, is there a way to update the Fly python compiler to 2.2. I tried to copy the python2.2 folder into the "Fly! IImodulesscriptspython" but, obiously, it doesn't work. The reason i would like it to be upgrade is related with my last request (for the moment)So..., is there a way to use other GUI in python? i tried hard to import the 2.2 comptatible version of Tkinter but always get the same probleme in a line of code in Tkinter.py whish doesn't compile. The purpose would be to use wxPython to be able to print fightPlan in a proper format directly from python. (The GUI in itself is not important, just the cross platform printer capability)I know i should put this in the developper forum. But i'm doing this for two reasons. Firstly to show to the people out there that in 3 weeks (and a couple of "white nights") one can talk about python (CAUSE IT'S EASY), and second cause there are some talented programmer who red this thread....I like long post but i'm opening another thread to have some feedback about my ideas with my script.See you.Chem

Share this post


Link to post
Share on other sites
Guest tonyc

Chem, what is "balise"?. I do have a few single engine manuals from my flying days. I'll be happy to giv eyou the information as soon as you explain that term to me. thanks. And you're right...let's do some python. As for being able to go to v.2.2, I think Richard Harvey said no way back in time when asked.tony

Share this post


Link to post
Share on other sites
Guest

Houps, sorry for my english.Balise is the french word for tag, and "A Tag is a Hard Coded IDType used to Identify a Value Specification for a specific parameter used to control options within Fly!." (cf Paul RUSSELL).For the v2.2, i was speaking about the version of Python, cause the one use by Fly: "The Fly! Adventure Scripting system is based on version 1.6 of the Python language."(cf Adventure Scripting Language manual). Eventually, thank you for your proposition about real plane datas, it does interest me (maybe for scripting some real procedures after some disaster happen to the plane...), but for the moment my scripts are in an too early stage. When the time will come i will ask you.And now, my third eye focus on my coffee cup, i'm going back making some nice user interface.See you.Chem.

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...