jackmermod wrote:I am certainly interested in learning nasal. I know a bit of nasal, enough where I've made a livery select menu and a weapons reload nasal. What I'm really interested in, is nasal controlled ai objects, something that seems to be increasing in popularity. I'd like to use nasal to construct working Aim-54 Phoenix's and Aim-7 Sparrow Air-to-Air missiles, and maybe one day, AI anti aircraft...this would consist of nasal controlled SAM or FLAK batteries that would fire at aircraft within a certain range and field of view. A better understanding of nasal could definitely help my development and efficiency.
Hooray wrote:Well, we already talked about this in the "AI guided missiles" thread a couple of weks ago: Basically, xiii has illustrated that this is perfectly possible, and there are plans in place to generalize the existing code to turn it into a reusable Nasal module for the $FG_ROOT/Nasal directory eventually, so that all users can easily create new AI objects that can be controlled from Nasal, just by subclassing an existing Nasal class: viewtopic.php?f=23&t=7791&start=45#p84834
This will all depend on solid background knowledge of Nasal, and the AI system (its properties) however - so the best thing you can do right now, is reading more about Nasal to see how it works. Even if the approach had already been fully documented, and if the module would be available right now - you would still need to know Nasal.
Hooray wrote:Well, your plans do sound ambitious to say the least.
But while I don't really know how familiar you really are with Nasal programming yourself, I would personally really not read too much into xiii's comments: xiii has made countless rather sizable contributions to FlightGear, including some fairly advanced Nasal scripts doing basically unprecedented things with existing FlightGear technology (like for instance those Nasal driven AI missiles!) - statements like "All of this is in the usual un-readable-un-maintainable xiii's nasal code TM." is probably what most of us would refer to as exaggeration, which should be considered "tongue in cheek" in my opinion.
If you know Nasal, and once you actually understand a script written by someone else, you can see for yourself.
Really, xiii's code is not only pretty well structured and even uses OOP to separate code and data into distinct modules, but is also well commented.
In my opinion, xiii's script would be an excellent place to start generalizing the whole concept of Nasal controlled AI objects, starting to rewrite anything from scratch without looking at xiii's code would be a big mistake from my point of view.
While the "tanker.nas" script used to be the de facto example for illustrating how to script AI objects, xiii's code has in my opinion become the standard for showing how to combine scripted AI objects with custom, scripted FDMs to create autonomous objects.
Basically, if you need help understanding xiii's current code, it is pretty unlikely that you'll be able to come up with a generic module, like the one you described.
jackmermod wrote:I understand and can script fluently in the following scripting languages:
- html
- xml
- htaccess(learned a few months ago, but have used it a bit and am quite familiar with it)
- php (I've used this for requiring passwords to pages, along with htaccess and know it decently)
Users browsing this forum: No registered users and 3 guests