Search Unity

Icarus Flight Simulator

Discussion in 'Made With Unity' started by devin8, May 16, 2013.

  1. devin8

    devin8

    Joined:
    Jul 15, 2012
    Posts:
    19
    Hi

    I'd been working on an Android based flight simulator for past one year. It is based on JSBSIM flight dynamics engine used by FlightGear. Check it out here.
    Tell me how you like it.

    Thanks
     
  2. gl33mer

    gl33mer

    Joined:
    May 24, 2010
    Posts:
    281
    Installing now.

    I've been wondering if anyone has been able to use JSBsim. Good news. Are you willing to share your port/wrapper? thank you.
     
  3. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    It was pretty fun. I did have one major issue. The altimeter was not reading correctly. This caused multiple crashes, as the altimeter was telling me I was 2,000 feet off the ground and I would smack right into the ground and crash. Also second issue was, once I crashed I could find no way to reset my plane, or go back to a menu to start over.
     
  4. devin8

    devin8

    Joined:
    Jul 15, 2012
    Posts:
    19
    @gl33mer
    I have basically compiled JSBSIM and my wrapper into a library. Wrapper exposes FDMExec functions as externs and provides mechanism to get/set fdm properties. On Unity side, data is pulled in every FixedUpdate to C# models that represent different aircraft systems.
    One very difficult thing was implementing ground callbacks that provide terrain data to JSBSIM. Another thing was running it on Android since JSBSIM needed to access xml files from native code using native AAssetManager from within the apk. phew. My C++ wrapper is pretty simple but things are very ugly on Unity C# side and is not marketable at all. I wil continue to clean it up though and put it up on asset store some day.

    @James
    Thanks for playing. The altimeter is not wrong but the whole world is setup in high mountaineous region where ground is that much above sea level.
    When you crash you can press back button to show menu. But I think its not that obvious and I should correct that.
     
  5. EncryptedCow

    EncryptedCow

    Joined:
    Dec 29, 2012
    Posts:
    1
    @devin8
    An altimeter actually shows the altitude (height above the Earths surface at your position). Your altimeter is showing the elevation.
     
  6. devin8

    devin8

    Joined:
    Jul 15, 2012
    Posts:
    19
    I think you're right. Will correct that in next version. Thanks for pointing it out guys.
     
  7. gl33mer

    gl33mer

    Joined:
    May 24, 2010
    Posts:
    281
    Thanks for replying @devin8. I some how missed it.

    I appreciate you taking the time to point out the gist of it with possible pitfalls.

    I'm waiting for a good flight model to appear on the asset store though the features I'm most interested will probably need to be added (environmental effects, winds, thermals, ridge/wave soaring, dynamic soaring, etc.)

    I may give up on this prototype for now.

    Take smaller bites.
     
  8. miniduck

    miniduck

    Joined:
    Sep 27, 2012
    Posts:
    117

    actually its above sealevel.
     
  9. devin8

    devin8

    Joined:
    Jul 15, 2012
    Posts:
    19
    Hi gl33mer

    You're welcome. Yes it would be great to see environmental effects, winds, thermals and soaring. But I think JSBSIM has some support for wind effects. It would depend on the implementation as how far it can push it.
    See the reference class for Wind Gusts
    http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGWinds.html

    I don't have support for wind effects in Icarus. But I think implementing it can be quite involved, especially ridge/wave soaring because it would have to be integrated with terrain data.

    Cheers
     
    Last edited: May 28, 2013
  10. devin8

    devin8

    Joined:
    Jul 15, 2012
    Posts:
    19
    Thanks gigolo,

    I searched a bit and found that altimeters work on atmospheric pressure. So they would have nothing to do with terrain height and are purely based on elevation.
    But having "above ground level" is also necessary. So I will implement a separate digital AGL meter.

    Thanks again guys.
     
  11. georgeciobanu

    georgeciobanu

    Joined:
    Sep 13, 2013
    Posts:
    2
    No worries that it's not marketable - it would still save people lots of time. Could you please share it?

     
  12. devin8

    devin8

    Joined:
    Jul 15, 2012
    Posts:
    19
    Hi All

    I've managed to create an ultra simple wrapper for JSBSIM that I'll put in the asset store soon. It uses dynamic code generation and complex native calls and callbacks, but the end product is very simple to use.
    For more details checkout this forum post
     
  13. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Nice game. Again, don't have my droid on me, so can't test it right now. However, I do have an idea... :D

    Also, which version of OpenGL ES?
     
  14. devin8

    devin8

    Joined:
    Jul 15, 2012
    Posts:
    19
    I think GLES 2.0. Actually, whatever version Unity can run on. Graphics are all Unity 3D, the flight physics is done in JSBSIM.
    The game available on Google Play is an older version, I've since rewritten the whole core which is much faster and clean.
    I will upgrade the game with the new core soon.

     
  15. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Unity can run on 3.0, but my tab can't... that's why i asked.