I must confess that the pace was A bit slower last week, but I made some extremely important internal modifications providing tremendous new possibilities, if you ‘re in a TL;DR mood, I urge you to check out the videos!
All updates are found in the changelog.
OOP
The previous log mentioned the Object oriented approach. Basically I continued this approach and tried to respecify more aspects of the code. The aircraft has some pretty heavy OO code under the hood, where almost every system is split up into components. The landing gear, structures, engine etc. are all decomposed and having them as seperate objects adds some very unique benefits. For example, different engines fit an aircraft and with the new code , each engine can be implemented. The turboshaft would for example fit a helicopter, so the model would need helicopter dynamics. The new code structure allows for definition of different aircraft, such as an airplane, helicopter, balloon etc. The dynamics of these aircraft is missing right now though.
Camera target, HUD Switch
The HUD is partially decomposed and some parts of the code (especially drawing bars and text) is still procedural. The HUD can now track different aircraft by switching data sources. Adding camera targeting provides A fully functional view switch:
This is not limited to aircraft, so ground objects, missiles and other objects can also be tracked, but they don’t exist yet.
Trimtabs
It is now completely possible to add a wing surface of any size, shape (theoretical shape that is) at any location. This provides the possibility to add canards, elevators, flaps, and trim devices such as trim tabs:
Note that I did not use any autopilot at all, the aircraft is level purely by trimming. This features kind of gives you a hint at what I’m up to next , since large airplanes need trim devices to reduce the amount of input required by the pilot using the elevator. It would also make a perfect test of the above. Everything is according to plans:
Scramble JS uses Phaser 2 as game engine. Fore more info, visit Phaser.io.