This game was the result of collaboration with my friend, Dev Gorur over a couple weekends. The lessons learned from this game were invaluable in our next collaboration: Operation Clean Marine.
While still unfinished as a game, the current code is a good proof of concept for rich, interactive, educational games in the browser.
The player must first understand where the lift force originates from, and how stalls can result in a loss of lift. The wing section on the cutaway aircraft zooms into the center of the screen, and the rest of the aircraft fades away. This is to reinforce the connection between a 2D airfoil, and an aircraft wing.
In the airfoil view, smoke-like flow begins streaming from the left of the screen. The player can grab and rotate the airfoil, and observe separation, and turbulence behind the airfoil. The game then guides the player into different angles-of-attack which show separation.
In the next mode, the flow disappears, and the airfoil is replaced with the cutaway view of the aircraft with Orville. The player now rotates the aircraft elevator using the arrow keys and can fly or stall the aircraft.
In the final mode, the user will help Orville land. The vertical velocity of the aircraft at touchdown will determine the success of the landing. At this time, this mode is unfinished.
The flow solving portion of the game introduced it's own challenges. The solver results were displayed on a small canvas element, expanded with CSS to fill the view. Each pixel of the canvas element was used as a cell in the solver. The fineness of the solver grid was then controlled by changing the size of the canvas element. An SVG airfoil was overlayed on top for angle control and appearance. Some time was spent finding a decent boundary condition for the airfoil surface. The goal was to show attachment and separation, despite to the limitations of the solver, and the very coarse mesh needed for decent results. The result tends to separate too quickly.
HTML5's WebWorker was used for computationally intense portion of the game. This allowed the interface to remain responsive and worked quite well on Chrome and Firefox.