Nasal for C++ programmers: Difference between revisions

Jump to navigation Jump to search
m
Line 9: Line 9:
* replacing static variables with variables stored in the property tree
* replacing static variables with variables stored in the property tree
* using listeners and callbacks to get update notifications for important variables  
* using listeners and callbacks to get update notifications for important variables  
* fully exposing a "control" interface by making it accessible in the property tree (see e.g. the AI system)
* adding new fgcommands
* adding new fgcommands
* providing new scripting hooks
* fully exposing a "control" interface by making it accessible in the property tree (see e.g. the AI/autopilot or canvas systems)
* providing new scripting hooks using extension functions (see [[Howto:Extend Nasal]])
* providing a full OOP interface (using simgear/nasal/cppbind) (see $FG_SRC/Scripting/NasalPositioned.?xx)


Even if you should know C or C++ already, Nasal probably remains the most accessible and the most powerful method for customizing the simulator in the beginning, simply because it is extremely easy and fast to get started, you don't need an "integrated development environment", you don't need to install compilers and you don't need to satisfy any 3rd party dependencies; bottom line being: if you can run FlightGear, you can also run Nasal and directly create new code.
Even if you should know C or C++ already, Nasal probably remains the most accessible and the most powerful method for customizing the simulator in the beginning, simply because it is extremely easy and fast to get started, you don't need an "integrated development environment", you don't need to install compilers and you don't need to satisfy any 3rd party dependencies; bottom line being: if you can run FlightGear, you can also run Nasal and directly create new code.

Navigation menu