SDK Directory & Files

[Audio] [config] [database] [EBooks] [fonts][packages] [ParaChat] [plugins] [Prerequisites] [Screen Shots] [script] [temp] [Texture] [worlds] changes.txt copyright.txt copyright_product.txt jabber-net.dll log.txt main.pkg MozHTMLRenderer.dll MyApp.vcproj NPLWebServiceClient.dll NPLWebServiceClientLib.dll ParaAllInOne.dll ParaEngine.sig ParaEngineManaged.dll ParaIDE.dll ParaWorld.exe perf.txt PhysXLoader.dll readme.txt script.sln script.vcproj
ParaEngine SDK can be installed on top of any ParaEngine powered product. ParaWorld is the recommended free product built by ParaEngine. Please follow steps below.

  • Download and install the latest version of ParaWorld from DownloadCenter. It provides all the latest binaries of the game engine.
    • e.g. the installation directory may be set as D:\ParaEngineSDK\, this is where you'll store all of the SDK files
  • Download and install the latest version of ParaEngineSDK. Please select the same installation folder as the previous one.
    • e.g. D:\ParaEngineSDK\ This directory should be automatically selected for you if you installed ParaWorld prior to installing ParaEngineSDK.
    • During installation, it will prompt you to install NPL language service. You can install it anywhere on your disk or just leave it with the default.

After installation, your SDK directory should look like the folder shown to the right. You will see the files ParaWorld.exe, ParaEngine.sig, script.sln

Compiling NPL source code

Visual studio 2008 is required in order to benefit from our development tools. Make sure it is installed prior to installing SDK.
  • Open script.sln. it contains two projects: script and myapp.
  • The script project provides all NPL source code files (or their placeholders according to the SDK license you have). Normally we shall not edit the script project, they are kept along with other projects for quick references.
  • The myapp project is where you should place your application specific files. You can modify the project name or add new projects to the solution.

NPL compiling rules

[sdkroot]/script/bin/ contains the npl/lua compiler. By default, it will automatically compile all files in the solution with .lua file extension. Please refer to the script project for how to set compile rules.

Running & debugging

One can configure the visual studio project property to set ParaWorld.exe as the command line executable. ParaWorld.exe can have the following argument. Usually we need to start it in windowed mode. For more application specific command, please see ParaWorldCommandLine.
single="true" whether only one instance of the game is allowed.
fullscreen="true" whether start as fullscreen or windowed mode
d3d="false" whether start without graphics
bootstrapper="config/bootstrapper.xml" which bootstrapper file to use at startup

  • script property for debugging:

Source code syntax highlighting and code sense

NPL/Lua Syntax highlighting is provided as a visual studio package (vspackage) called NPL language service. It provides syntax highlighting and code sense for all major NPL classes. It can coexist with visual assist.

Adding my own class and code sense

If you have developed your own npl classes, and you want them code sensed in visual studio. Do the following
  • make sure the windows registry : Current user:Software\ParaEngine\ParaEngineSDK the default key points to your sdk root directory.
  • open the script project and browse to script/VisualStudioNPL
    • You can also add your own code sense by adding or modifying XML files at [sdkroot]/script/VisualStudioNPL
  • restart visual studio for the changes to take effect
  • if there are errors in your xml files, the entire intellisense will be greyed out.
sample code sense xml file
<?xml version="1.0" encoding="utf-8" ?>
  <!-- raw NPL classes. Generated based on -->
    <table name="commonlib">
      <function name="echo">
        <summary>log anything to log.txt file</summary>
        <parameter name="object">anything</parameter>
    <table name="localserver">
      <function name="new">
        <summary>add a new global control</summary>
        <parameter name="sControlName">string control name</parameter>
        <parameter name="ctl">the control object to add</parameter>
    <variable name="commonlib" type="commonlib" />
    <variable name="localserver" type="localserver" ns="Map3DSystem.localserver"/>
Topic attachments
I Attachment History Action Size Date Who Comment
JPEGjpg script_property.jpg r1 manage 47.6 K 2008-10-23 - 05:37 LiXizhi script property for debugging
Topic revision: r3 - 2008-10-23 - LiXizhi
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback