topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 7:44 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Q: Best Prog Lang for Building a Text-Based Flight Simulator?  (Read 7997 times)

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Hi,

Been awhile since I have been in the coding environment.  Due to my vision getting worse I am interested in taking my hobby of flight simulation from the GUI to the Command Line.

The program will involve physics, time and an internal 3D "space."  Essentially, the screen would present a list of information, the "pilot" would make a selection then process the choices and present the new information back on the screen.  While this would probably not serve inexperienced sim flyers, it would be usable for experienced pilots both real and simulated.  With the addition of text-to-speech and speech-to-text, I can see someone who knows aviation might enjoy "flying" while driving over a long distance.  I know I would.  Obviously, this might allow sight-challenged people to enjoy some aspects of flight simulation.

Frankly, this is going to be lots of work to start with and will only become more involved as more realism, features and (hopefully) interactive Air Traffic Control.  This is why I would be very appreciative of any comments for the coding language.  Questions are most welcome.

Thanks,
Calvin

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Q: Best Prog Lang for Building a Text-Based Flight Simulator?
« Reply #1 on: October 12, 2017, 09:49 PM »
I think no matter what it will be an interesting and challenging project.  One of the nice things about doing a "text-based" simulation is that it will really force you to focus on the core simulation and structures rather than getting caught up in graphics, etc.

As for the best programming language -- one of the other nice things about doing text-based coding is that you can use almost any programming language.. speed won't be an issue and neither will library support, etc.

So I would fall back on my default language suggestion these days to use Python (sounds strange coming from a C++ lifetimer).

But mainly I would suggest you do most of your coding virtually in the form of planning, before you ever start coding.

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: Q: Best Prog Lang for Building a Text-Based Flight Simulator?
« Reply #2 on: October 12, 2017, 10:10 PM »
Hey Mouser!

Long time no talk to! I thought I got lost or something because I tried to login two or three times and was "blocked."  I almost didn't try tonight.  I'm glad I did. :) 

I think no matter what it will be an interesting and challenging project. 
Thanks for the input.  One of the best things about this project is I can focus on my strengths of over 2000 hours of simulated flying in all kinds of aircraft and several hours in a number of real aircraft large and small.

As for the best programming language -- one of the other nice things about doing text-based coding is that you can use almost any programming language.. speed won't be an issue and neither will library support, etc.
I was hoping someone would say this.

So I would fall back on my default language suggestion these days to use Python
Thanks.  Python never crossed my mind, although I played with it some years ago.

But mainly I would suggest you do most of your coding virtually in the form of planning before you ever start coding.
When I was coding COBOL, DB2, and (my favorite) CICS back in the '90s it was normal to spend weeks/months in planning and prototype before committing hours to coding.  Today, a programmer can get instant results and debug.  Back then we condsidered getting our printouts (there were no screen views) in under four hours as something short of a miracle.  But, that was a good thing as we really thought through the whole process and not just take a guess and see how it worked out.  LOL

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Q: Best Prog Lang for Building a Text-Based Flight Simulator?
« Reply #3 on: October 12, 2017, 10:15 PM »
I'm an OOP (object-oriented programming) fanatic.  I believe that object-oriented programming helps organize the way you think about a project.  So for this idea (as for most things non-trivial), I think the only strong recommendation I would make is to use an OOP language.

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: Q: Best Prog Lang for Building a Text-Based Flight Simulator?
« Reply #4 on: October 12, 2017, 10:54 PM »
...
I think the only strong recommendation I would make is to use an OOP language.
Python fills this bill, does it not?  Ha!  Funny thing is I have always wanted a project that would be a good one for Python. :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Q: Best Prog Lang for Building a Text-Based Flight Simulator?
« Reply #5 on: October 12, 2017, 11:11 PM »
Yes, Python is OOP and is very good playpen for coding, once you get used to it.
Just be prepared for a struggle whenever you start to learn a new language.

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: Q: Best Prog Lang for Building a Text-Based Flight Simulator?
« Reply #6 on: October 16, 2017, 03:07 PM »
...
Just be prepared for a struggle whenever you start to learn a new language.
Roger that.  Thanks.

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: Q: Best Prog Lang for Building a Text-Based Flight Simulator?
« Reply #7 on: October 27, 2017, 05:21 PM »
UPDATE:  Turns out another project I need to do requires C++, so a pointing I will go. 
The good news is a 24-year-old C++ guru wants to re-mentor this old COBOL/CICS dinosaur. :)
Now all I have to do is find some ancillary coding tutorial.  Did I mention he wants to mentor, not babysit?   ;D  FYI - my IDE is VS2015 Pro.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: Q: Best Prog Lang for Building a Text-Based Flight Simulator?
« Reply #8 on: October 27, 2017, 08:57 PM »
There are some that come up if you google "C++ tutorial"

Some I found there:

http://www.learncpp.com/
http://www.cplusplus.com/doc/tutorial/

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: Q: Best Prog Lang for Building a Text-Based Flight Simulator?
« Reply #9 on: October 27, 2017, 09:00 PM »
Thanks for the links Wraith!  They look pretty good.  :Thmbsup:

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Q: Best Prog Lang for Building a Text-Based Flight Simulator?
« Reply #10 on: October 27, 2017, 09:01 PM »
The good news is your flight simulator mathematics will be fast, and c++ would be the language of choice for doing hardcore simulations where mathematical calculations need to be done as quickly as possible.
The bad news is you've made your job a lot harder, and you've already bitten off more than almost anyone can chew.

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: Q: Best Prog Lang for Building a Text-Based Flight Simulator?
« Reply #11 on: October 27, 2017, 09:17 PM »
The good news is your flight simulator mathematics will be fast, and c++ would be the language of choice for doing hardcore simulations where mathematical calculations need to be done as quickly as possible.
The bad news is you've made your job a lot harder, and you've already bitten off more than almost anyone can chew.
I agree this is a tough road and I am over my head, but C++ is the tool my mentor wants to use to program the DLLs/apps to use with the Microsoft Flight Simulator X.  With his help and a template he has helped me code a function which holds a floatplane/seaplane/amphibian locked in one position next to a dock (docking) and pivoting like when a floatplane/seaplane/amphibian is anchored offshore.  He did most of the coding for locking to a location, but left me to take a crack at coding locking the heading as well and it worked!  There is A LOT I don't know, but at least I have had a successful start.  FWIW - I won't be coding any 3D graphics, so at least it will be a little less complicated.  We'll see?  In the meantime, I have not done any coding on my text-based flightsim.  I have only been planning, per your encouragement.  Based on that rough sketch I will probably not have any kind of real prototype until next summer, but I should have a simple, linear, basic alpha before the end of the year.  Here's hoping!  :)

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: Q: Best Prog Lang for Building a Text-Based Flight Simulator?
« Reply #12 on: October 28, 2017, 03:44 AM »
Ah, another potential NANY participant :) Great!