Giter VIP home page Giter VIP logo

flightsimulator's Introduction

A flight simulator in your browser

An F-16 flight simulator with realistic graphics, flight dynamics and audio. Runs smoothly at 60 fps on an average laptop.

Try it out! Use arrow keys for control. (See below for more info.)

Screenshot

July 20th 2021: New version!

Highlights:

  • Audio problems are fixed, now using audio worklets.
  • Most prominent tiles are loaded first, reducing apparent loading times.
  • Updated three.js.

April 9th 2021: New version!

A new version has been released. Highlights:

  • Updated satellite photos, taken summer/fall 2019, giving better image quality and more realistic colors.
  • New external cameras: Press space bar to cycle between internal camera (cockpit), external "chase camera" and external "static camera".
  • Geometry and textures have been omtimized. Mesh simplification reduces vertex counts, and compressed texture format reduces upload times and GPU memory.
  • Start coordinates can be given both as UTM 33N and lat/lon values. A starting direction can also be given. See below for examples.
  • Code has been rewritten to use three.js.

Features

  • Realistic visualisation of all of mainland Norway
  • Tiled terrain rendering: The surface is divided into regions that are loaded and unloaded as needed
  • Highly efficient loading of terrain geometry and textures
  • Reasonably accurate flight model of an F-16
  • Internal and external views
  • Synthesized, dynamic engine sound
  • Gamepad support (only tested on an USB gamepad and Chrome)
  • Works on iOS and Android (but no steering implemented so far)

Warning: The code is not beautiful.

Attributions

License

All code and data, except what is mentioned above, is licensed under Creative Commons Attribution-NonCommercial ShareAlike. See https://creativecommons.org/licenses/by-nc-sa/4.0/.

Running

The app can be tried out here.

Startup parameters:

  • Provide starting point coordinates (in UTM 33N or GPS coordinates) using url parameters e and n. Default start point is south of Molde.
  • Altitude (in metres) can be given using the parameter a. Default is 3000 metres.
  • Start direction (compass angle) can be provided by c. Default is 0 degrees, due north.

Example: https://kristoffer-dyrkorn.github.io/flightsimulator/?n=6981000&e=110000&a=1000&c=270

Controls

Use keyboard or gamepad.

Arrow keys control aileron and elevator. z and x: rudder. q and a: throttle. Space cycles camera views. When using the external static camera, move the camera left and right using j and l, and up and down using i and k. Use , and . to move the camera nearer/further away.

Right joystick controls both aileron and elevator. Lower left and right front buttons regulate throttle.

Rendering and keyboard control should work on all modern desktop browsers. Rendering should work on mobile browsers as well, but aircraft control has not yet been implemented.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.