Aller au contenu

Photo

NWNX4 NWScript Accelerator plugin - improves script performance by transparently running scripts as native code


  • Veuillez vous connecter pour répondre
11 réponses à ce sujet

#1
SkywingvL

SkywingvL
  • Members
  • 351 messages
Version Jun 30 2011 18:46:22 (initial release) released on July 2 2011.

See the main thread on the NWNX4 forums for details.

Modifié par SkywingvL, 02 juillet 2011 - 10:32 .


#2
Darth Kirin

Darth Kirin
  • Members
  • 48 messages
We've implemented this on our PW tonight, works great thus far.

Thank you for all your work on improving NWN2, skywing. The entire PW community owes you a huge debt!

#3
c i p h e r

c i p h e r
  • Members
  • 261 messages
Checking this out too. It sounds promising!

The readme lists Visual C++ 2010 as a requirement. XP Bug Fix still uses Visual C++ 2005. Would it be possible to standardize on the VC++ distribution package?

Modifié par ç i p h é r, 03 juillet 2011 - 07:47 .


#4
SkywingvL

SkywingvL
  • Members
  • 351 messages

ç i p h é r wrote...

Checking this out too. It sounds promising!

The readme lists Visual C++ 2010 as a requirement. XP Bug Fix still uses Visual C++ 2005. Would it be possible to standardize on the VC++ distribution package?


Unfortunately, this will probably involve finding and building a compatible wxWindows drop to move to a newer VC++ version for the existing plugins (I agree it's a bit of a mess - I would like to move the mainline NWNX4 code to a more modern build environment).  xp_bugfix is built out of the mainline NWNX4 tree; whereas the NWScript plugin has been designed to use a more modern build system (and doesn't depend on wxWindows).

#5
MachinSin

MachinSin
  • Members
  • 35 messages
Hi SkywingvL,

We will add this to our PW in the following days. As others say, your work is awesome, thank you very much,

MachinSin

#6
MustangSVT

MustangSVT
  • Members
  • 12 messages
We've been using this for some time now on Dalelands. Thank you for your excellent work Skywing.

#7
SkywingvL

SkywingvL
  • Members
  • 351 messages
I've posted a patch release here:

http://www.nynaeve.n...verNWScript.zip

Be sure to copy over all of the DLLs including NWNScriptJIT.dll.

- Fixes a code generation issue relating to scripts with a script function that both returns a return value of an engine structure type and calls an engine function with a parameter of type 'action'. For example, "location testfunc1() { AssignCommand(OBJECT_SELF, ActionWait(0.0f)); return GetStartingLocation(); }".

Modifié par SkywingvL, 06 juillet 2011 - 02:00 .


#8
SkywingvL

SkywingvL
  • Members
  • 351 messages
Posted version Jul 10 2011 21:06:18 (release 2) with an important bugfix and some additional improvements (including debug symbols loading for better tracing with UseReferenceVM=1 when debugging scripts).

#9
SkywingvL

SkywingvL
  • Members
  • 351 messages
New release posted. Details here:

http://www.nwnx.org/...opic.php?t=1803

This release enables the use of non-standard compiler extensions (e.g. #ifdef, #if, #define, etc.) supported by the Advanced Script Compiler, in GUI and StartingConditional scripts. The companion Advanced Script Compiler release is available here: http://nwvault.ign.c...ns.Detail&id=99

Several bugfixes are also included with this NWScript Accelerator release, see the NWNX4 forum thread for details.

#10
SkywingvL

SkywingvL
  • Members
  • 351 messages
Release 6 posted. Details here:

http://www.nwnx.org/...p?p=14969#14969

This release includes a substantial new feature - the capability to write scripts in CLR languages, like C# or C++/CLI, while maintaining the ability to seamlessly call NWScript engine functions (including DelayCommand, no clunky wrappering required, either!). These enhanced scripts can use native sockets and other platform native APIs that provide a much richer programming environment than standard NWScript, without sacrificing the ability to easily interact with the game world.

You can even call functions in NWScript compiled scripts from CLR-based scripts, letting you make use of your existing libraries of NWScript code without rewriting them in a CLR language.

This release also includes an important bugfix as well as several other minor enhancements.

#11
Old_Curmudgeon

Old_Curmudgeon
  • Members
  • 11 messages
ALFA has converted all our servers over to this. Thanks!!

#12
SkywingvL

SkywingvL
  • Members
  • 351 messages
Release 7 posted (performance improvements); details here: http://www.nwnx.org/...opic.php?t=1803


- Improved the performance of the following engine functions by natively implementing them directly in CLR code (controlled by the new OptimizeActionServiceHandlers=1 option):

* GetStringLength
* GetStringLeft
* GetStringRight
* IntToString
* GetSubString

By directly implementing these engine functions, the overhead of communicating with the game engine from script code is eliminated for these particular engine functions.

- Improved the performance of passing engine structure parameters to engine functions, like GetIsEffectValid or GetIsTalentValid. This yields a 10-20% gain in the number of calls to a function such as GetIsEffectValid that could be made per unit time. Some scripts, such as AI scripts, make heavy use of these functons and consequently see performance improvements when many creatures are running AI.

Modifié par SkywingvL, 21 février 2012 - 10:57 .