17

Building a Flight Simulator with Javascript

 2 years ago
source link: https://www.jakobmaier.at/posts/flight-simulator-in-javascript/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Building a Flight Simulator with Javascript and THREE.js

Building a Flight Simulator with Javascript

Restarting my old C++ Project in Javascript with THREE.js

When I was working on my F-16 flightsim project back in the first lockdown I used raw OpenGL and C++ to build the game. After working on it for some time I realized that I was in a bit over my head. I was spending a lot of time just debugging OpenGL and fixing weird bugs in my arguably really bad C++ code. Never having worked with C++ before I was just figuring it out as I went along. The flight model was another thing, the physics and the flight control system proved to be orders of magnitude more complicated than I had imagined.

At first I focused on building a sim for the MQ-9 Reaper combat drone, but I am now again working on the F-16 Viper, which is just a much more interesting aircraft in my opinion. The goal is to have a player controlled Viper and some type of opponent aircraft controlled by AI as well as some Surface-to-Air Missiles that can threaten the player. You can play a preliminary build here, without installing anything, in your web browser. The repository can be found on github.

Three.js proved to be absolutly perfect for my use case. It made everything so much easier and even came with a few special effects that make everything look much more beautiful in my opinion.

You can control the aircraft with WASD, use numbers 1 - 5 to switch between views.

F-16C-1.pngF-16C-2.png

Your browser does not support the video tag.

Privacy Policy

We would like to use third party cookies (Google Analytics) to improve this site. Read more.

© 2022 Jakob Maier

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK