Personal projects, programming experiments, hobbies, and random discoveries

DXStudio Legacy

Quote: “DX Studio is a 3D editing + engine suite for Windows XP/Vista/7/8/10. It was most popular between 2005 and 2010, but can still be a useful tool for creating interactive 2D+3D on Windows.”

This is a collection of applications/addons etc. I made with DXStudio – back then. It is of very limited use nowadays, I keep it for nostalgic reasons mainly 😋.


DXStudio Applications Collection

Tokenbuilder Redux (2009)

After having built something similar with 3DGS, now here’s my take on it with DXStudio by Worldweaver. Again, this is a test application to learn the use of this game engine. The ‘game’ simulates playing with wooden tokens of different shapes. A few types and colors can be selected and positioned on a grid.
Fixed resolution for Tokenbuilder Redux is 1024×768. It will run in windowed mode only. MS Windows only (tested on XP).

Features
  • Gui with moveable windows and button tooltips
  • Automatic check for new client versions
  • Save and load your builds to/from disk
  • Upload/download to/from the tokenbuilder-server and share with others

Installation
Download the file below (it comes with the dxstudio player installation files, too). Start the game by unpacking and double-clicking the downloaded exe file.

Downloads
TokenBuilder Redux V1.0. With dxstudio player setup files
tokenbuilder_redux_10.exe.zip (2/13/2009, 11.6 MB)

A short and ugly video of the program in action
tb_redux.wvx (2/13/2009, 615 KB)

Multiplayer Online Game Test (2009)

This is another test application, done with DXStudio. This time, focusing on using the network and physics capabilities.
The program did connect to this server and place you in a rather large (yet boring) game world. You can see other players walking around (if any online) and send messages via the basic chat message. The landscape is dynamically created and updated, depending on the player’s position. All objects have physics and dynamic shadowing switched to on. Tip: When feeling lonely, just start two clients and talk to yourself. 😁
Fixed resolution for myMMOG is 1024×768. It will run in windowed mode only. MS Windows only (tested on XP).

Features
  • 51×51=2601 terrain tiles, being managed dynamically by player’s position
  • a roughly calculated “world size” of 4km x 4km, based on avatar size
  • over 36k of test objects, dynamically managed and linked to the terrain tiles
  • very basic “walking animation”

Downloads
Only presenting a video here, as the server is not active anymore.
A short and ugly video of the program in action
myMMOG.wvx (2/26/2009, 560 KB)

DXStudio embedded and Enet (2009)

This time, I’m testing how DXStudio is doing when embedded as an ActiveX control. The hosting application is a VS C++ .net MFC dialog. To make things even worse, I skipped the DXStudio built-in network functions and used Enet, a light-weight network layer for both, linux and windows. This gives us the possibility to create a native server application on a linux machine.
Both programs, server and client, basically show how communication for an online game (server: Linux; client: Windows) could be set up, using DXStudio in embedded mode. The code is far from being complete, it rather shows a ‘design study’. So, making a ‘WoW-Killer’ would still take you some work, even when giving it a head-start using the files below. 😋
The Enet source code (to compile a lib on Windows or Linux) is not included in the files below. It can be downloaded
here on github (their website http://enet.bespin.org seems to be down, though). My compiled *.lib and *.a is included.

Features
  • The client app got a plane and one object. On start, it registers with it’s unique ID at the server. On receiving positions for the object, it will place it accordingly
  • The server app will check for clients and periodically send new object positions. It does handle connect/disconnect events aswell.

Please note that you might need to update the file location of the DXStudio player and the server IP/port in the client’s code.

Downloads
Including VC C++ .net project, dxstudio document, server c-code, makefile, compiled enet libs.
dxs_MMOG.zip (3/5/2009, 10.5 MB)

Turnipmaster Online (2009)

This multiplayer test game is about growing turnips of different colors. Upon login, you can select one out of 6 colors for your avatar (the “faction color”) and type in a name. There is no persistent login accounting, so choose whatever you want. Then, your task is to farm turnips for your faction. This would not work without the help of other factions, so you’d better help them, too!
The game plane consists of several fields, where one can grow turnips. Each such field is surrounded by a fence, and only turnips of one color can grow there. In the middle of each turnip field, you can see the “field post”. By clicking on the post, new turnips can be seeded. They need to grow before harvesting, though!
To grow your turnips, some turnip juice of another color than your own is needed. As you can only handle turnips (and juice) of your very own color, you rely on the help of other factions (colored players, that is). They need to click on the “feeder” on your field, and spend some of their juice. As you should do at their growing fields!
Click on a fully grown turnip (one that has your color) to harvest. Then walk over to the “Juice-o-mat” in the center of the game plane and process it to juice. You can see the current game’s stock at the lower right-hand screen. Don’t forget to seed new turnips by clicking on the “field post”. Only turnips that have been seeded before will grow when juice is spent!

Technical
The game has been written with DXStudio (both, client and server application). Microsoft Windows only. The server application was running on a Windows 2003 vServer, rented at United Hoster. Actually, it was the smallest one available there (1000 CPU units, 320MB RAM), so things might get choppy when many users should be online.
Please note that the game server is not online anymore.

PacWars (DXStudio Summer’09 Competition)

This is my submission to the DXStudio Summer 2009 Demo Contest, running 18 June 2009 to 17 Sept 2009. It actually won a prize back then.
It is a multiplayer 3D spaceflight simulation demo, featuring good old pac-man as enemy AI. And is is kind of a tribute to the MMO space game Jumpgate by Netdevil, which I used to play for quite a long time. Multiplayer ability is being realized without a dedicated server application, just using a message dispatcher on a remote server for data transfer between the clients.

Features
  • MS Windows only, windowed in fixed size 1024×768
  • Client-only multiplayer with connection to a central server, used as data dispatcher
  • 3D space flight with a “newtonian-like” acceleration and drag behaviour
  • Selection of different ship types with different attributes
  • Three AI enemy types (“MadPacs”) with basic “distributed spawning” (clients can trigger AI spawn on other clients)
  • Player versus Player fights with client sync’ing
  • Basic asteroid mining and ship hull repair feature
  • Switching of views (1st person main view)
  • ChatWindow (one channel only)
  • Dynamic creation/removal of objects in space (e.g. asteroids), based on a position-bitmap
  • Object-to-object interaction done by ray-casting and face collision tests, not using physics engine
  • Persistant player data saved to local xml file (encrypted data)
  • Usage of dynamic shadowing, basic animations and bumpmapping
  • Distant-related sounds on several channels
  • In-application webbrowser (used for help/credits screens)
  • In-application video play (used for a “TV” in space)

Known Issues
  • BY DESIGN: As network message processing is linked to the clients’ framerate, weak clients (having very low fps) could bog down communication.
  • BY DESIGN: On program startup, the 3D scene(s) are already running in background (to ensure quick availability when launching). So, even when showing the main menu only, fps need some time to recover after startup. This is notable especially when running the program and immediately switching to the “Intro” topic.
  • BUG: Shooting at the main station’s landing lights causes a ‘function not found’ error

Introduction Video
For those who want to have a headstart with a video (rather than reading through the ingame manual). There is an ingame video with comments, recorded with the free version of AVS Video Editor 4 (showing a watermark in the beginning). See Downloads below.

Installation
Download and unzip the file below. Preferably, store it to a separate folder, as some temporary files are created at runtime. Start by double-clicking the extracted *.exe. If not already present on your machine, the DXStudio player will be installed automatically then, too. To run, PacWars needs an internet connection, as the program contacts the “multiplayer data dispatcher” (aka DXStudioServer.exe) on demo.dxstudio.com. There is no “pure offline” operation mode.

Screenshots
Downloads
Only presenting a video here, as the server is not active anymore.
An introduction video of the program in action.
Recorded with the free version of AVS Video Editor 4 (showing a watermark in the beginning)
pacwars_video.wvx (9/13/2009, 17.8 MB)

DXS TwitterListener (2009)

DXSTwitterListener is a C#/CLR application that polls the rss feed of DXStudio on Twitter, and shows a popup whenever a new ‘tweet’ has come in.
I made it to follow this particular channel on my PC without the need to log in or receive something on my cell phone etc. It is not of use anymore.

Features
The rss feed to poll is hard coded. It will be retrieved every two minutes. If it has changed, a popup showing the latest ‘tweet’ is shown in the upper left screen area. The popup can be closed again by clicking on it. When minimized, the app hides in the system tray. Double-click there (or right-click for a menu) to restore it again.
The app comes with an installer, all created with VS 2008 C# Express.

DXS ForumCount (2010)

A pure fun program, not really of use anymore. It does periodically poll the DXStudio website for the number of registered forum users. Then shows that number in a ‘faked’ gadget-like desktop window (calling it ‘faked’, because it is a normal app that hides in the taskbar and has a window, looking like a gadget. Therefore, it should run on XP aswell). This is a managed C++ app with the DXStudio player embedded.

DXStudio Chess (2010)

A 3D game of chess.

License
DXStudio Chess uses one of my DXStudio Plugins. This plugin is under the GPL, while the DXStudio application provided below is freeware – with no source publicly available, though.

Features

  • White vs. PC, Black vs. PC and PC vs. PC mode
  • Two different 3D token sets to select from
  • Two different 3D environments to select from
  • Export moves history
  • Save/Load game
  • Switch shadows on/off for performance adjustment
  • Switch sounds on/off

Screenshots
Downloads
DXStudio Chess v0.9.0.
Locked source. Comes with the DXStudio player packaged
DXStudioChess_090.exe.zip (12/04/10, 32 MB)

DXStudio AddOns Collection

DXSPather Dll

DXSPather is a C++ A* pathfinding DLL that can be used with DXStudio documents (and hopefully gives some speed advantages over doing all the calculation in JS script). It comes with a javascript include file that you would add to your project. This script then provides “proxy functions” that in turn interact with the dll and handle path setup and calculation.

The DLL utilizes a ready-made C-class for A* handling, done by Lee Thomason (www.grinninglizard.com). It is named “micropather”, and fast and rather easy to use. If you’d ever need some C-code for pathfinding, that thing is the way to go, imho.
Features
This implementation of the DLL executes the calculation of a certain path request within one call. For rather large maps (waypoint numbers), this may cause a single “hickup” condition in the DXStudio doc.
The waypoint attribute buffer (not the waypoints themselves) is dynamic, so you can make single waypoints “valid” or “inaccessible” by calling functions, and these conditions will be considered at the very next waypoint calculation request.
Allowed movement directions are adjustable, too. So, you could e.g. choose to have a path calculated only by moving “diagonal” (X+/-1 AND Y+/-1) and “left-right” (X+/-1 ONLY), but not “up-down” (Y+/-1 ONLY), which could be useful for hexagon maps.
Exposed Wrapper Functions
DXStudio users would not call DLL functions directly, but use “wrappers” provided in DXSPather.js. Note that waypoints (that you need to submit to the DLL once) need to be in regular grid order (e.g., in a regular [X,Y] indices format). Not necessarily do the waypoints’ distances need to be evenly spaced.
Functions and variables provided in the js include file are:

function DXSP_SetDllLocation(string sPathToDll)
(added with v1.3) Set the path to the dll inside the wrapper script. Usually, this would be something like system.folders.document. No return value.

function DXSP_SetDiagonalMovements(bool bMoveDiagonal)
(name changed with v1.2) Tells the path calculator if it should consider diagonal movements (X and Y index both change). Switching is possible by this function (changes will be valid on the very next path calculation). Returns always true.

function DXSP_SetUpDownMovements(bool bMoveUpDown)
(added with v1.2) Tells the path calculator if it should consider vertical movements (Y index changes only). This could be useful when processing paths on hexagon grid maps. Switching is possible by using this function (changes will be valid on the very next path calculation). Returns always true.

function DXSP_SetLeftRightMovements(bool bMoveLeftRight)

(added with v1.2) Tells the path calculator if it should consider horizontal movements (X index changes only). This could be useful when processing paths on hexagon grid maps. Switching is possible by using this function (changes will be valid on the very next path calculation). Returns always true.

function DXSP_SetMapSize(int iX, iY)
This call resets the DLL data and prepares a (yet empty) X*Y waypoint grid to be filled later on. Returns false on error, true on success.

function DXSP_SetMapNodeData(int iIndexX, iIndexY, float fPosX, fPosY, fPosZ)
Sets the basic data of one waypoint “node”. Submit its indices in the (regular grid’s) waypoint array (iIndexX, iIndexY), as well as its positions in 3D space (fPosX, fPosY, fPosZ). This data has to be submitted once before any path calculation requests, and remains stored inside the DLL. Returns false on error, true on success.

function DXSP_SetMapNodeCostModifier(int iIndexX, iIndexY, float fCostModifier)
(added with v1.3, EXPERIMENTAL) Sets an optional factor for a waypoint that will be considered when calculating paths. Use this to make certain waypoints more or less “desireable” for a path. E.g., a fCostModifier of 2.0 would make a waypoint more “uneasy”, while a modifier of “0.5” would make this waypoint being prefered. By default, the cost modifier for each waypoint is “1.0f” (which is a neutral factor). Experimental feature. Setting values here might cause weird paths to be created.

function DXSP_SetMapNodeWalkable(int iIndexX, iIndexY, bool bWalkable)
Makes a certain waypoint “walkable” (being considered in path calculations) – or disables it. Data can be dynamically changed (read: whenever you need), and will be consided at the very next path calculation. Returns false on error, true on success.

function DXSP_SolvePath(int iIndexXFrom, iIndexYFrom, iIndexXTo, iIndexYTo)
This routine initiates a path calculation, taking the “from” and “to” waypoint indices as arguments. As soon as this call returns, the calculated path is available in (global) variables inside the include js script (see below).

Array DXSP_WaypointsX
Array DXSP_WaypointsY

As soon as a call to DXSP_SolvePath succeeded, these two array variables contain the (X,Y) indices of the waypoints to travel (including start/end waypoint). Access would be possible by e.g. system.script.DXSP_WaypointsX[0] or system.script.DXSP_WaypointsX.length

Downloads
The download comes with a DXStudio demo doc, where you can select a path of an object. The available waypoints are shown as boxes.

DXPather Package 1.3
The DXPather_DLL.dll, DXSPather.js and DXSPatherDemo_1.3.dxstudio
DXPather_1.3.zip (10/10/2009, 255 KB)

DXSCheckMem Dll

DXSCheckMem is a DLL I once wrote to track dynamic memory usage changes of DXStudio documents. It can be called on a per-frame basis from JS script, and adds only little overhead to the fps (if at all).

Calling the DLL from DXStudio script
The DLL exposes one function only. Preferably, place it in the doc’s directory and add code like this to e.g. a 2D text object’s onUpdate function:
var mem = 0;

function onUpdate()
{
mem = system.callDLL(system.folders.document+"dxs_chkmem.dll", "dxsChkMem", "");
mem = mem/1000;
object.text = "Memory usage reported by dll: " + mem.toFixed(2) + " KBytes";
}
Downloads

DXSCheckMem 1.0
The dxs_chkmem.dll and mem_dll_test.dxstudio
DXSCeckMem_1.0.zip (10/9/2009, 1.5 MB)

DXStudio Cannon Module

This is my first try to create a re-usable module for Worldweavers DXStudio. It is a laser cannon with targetting functions, some visual effects and sound. As for it’s quality, it might not completely fit your needs or standards out-of-the-box (especially for the texturing), but could maybe work as your base for own modules (I hope).

Features
Given a target 3D coordinate, the cannon will automatically align to this target, playing some mechanical sound. Speed of rotations can be adjusted. If requested, a laser beam will be initiated after alignment has completed. Automatically, there is a check if some scene object is hit. If so, an explosion animation will be started, accompanied by a corresponding sound. In case a scene object has been hit, a notify message is sent to the parent scene.
Restrictions
The module (‘object’) must not be rotated upon placing. It does only work when positioned on the XZ-plane. Different heights (Y) do work, though. It can be scaled in the scene editor. The cannon will not target positions that are too near (e.g., touching its own bounding box) or can not be aligned by the cannon tube (e.g., too low in y dimension). If a shot is being executed, alignment to new target positions will take place after having finished the shot.

Usage
Exposed module functions:

function cannonInitialize(id)
This must be called before using the module. Pass the module’s id (e.g. ‘objects.CannonModule_1.id’) as parameter.

function cannonSetRange(fBeamMaxRange, fBeamDuration)
Set the maximum range the laser beam can shoot (that is the range a hit detection will be done – and the length of the beam if nothing is hit) and the duration of a shot (in seconds).

function cannonSetSpeed(fTurnSpeed, fFocusSpeed)
With this, set the turn speed and the speed of the cannon tube’s up/down movement (deg/sec). Used for alignment.

function cannonSetNewTargetPosition(vTargetPosition)
Set a new 3D coordinate target position. The cannon will align to that, but not shoot. No movement will happen if the target position can not be aligned to.

function cannonSetNewTargetPositionAndShoot(vTargetPosition)
Same as before, but the cannon will initialize a laser shot after having focused the target coordinates.

function cannonStopMovement()
Stop a currently running alignment movement (if any).

function cannonMovementRunning()
Returns true if the cannon is in the process of alignment to a given target coordinate. False, if not.

function cannonShoot()
Initiate a laser shot. Will stop any alignment movement immediately, if present.

Whenever a hit is detected, scene.moduleNotify(msg) of the parent scene will be called. Passing TYPE of the event (=CM aka CannonModule), ID of the module and the beam hit position TARGET. Possible target objects must have their selectionMask set to 2 (bit1 = 1). Use ‘eval()’ in moduleNotify function.
Please see the .dxstudio demo program for a detailed usage demo.

Downloads

A demo exe, incorporationg the cannon module
Cannonmodule_Demo.exe.zip (12/31/2008, 10 MB)

The source of the demo exe as a dxstudio scene file
Test_Cannonmodule.dxstudio.zip (12/31/2008, 741 KB)

The cannon module
CannonModule.dxmodule.zip (12/31/2008, 463 KB)

The cannon module as a dxstudio scene file. Just for convenience
Scene_Cannonmodule.dxstudio.zip (12/31/2008, 463 KB)

The model’s textures and parts, in case you want to fiddle yourself.
Includes textures (bmp) and skinned models (fbx and .x)
Cannon_Models_and_Textures.zip (12/31/2008, 490 KB)

DXStudio PlugIns Collection

DXStudio Plugins ‘Hands On’ Document

This is a little pamphlet I wrote about the basics of plugin creation for DXStudio.

DXStudio Plugins ‘Hands On’ Document. v1.0.1
DXStudio Plugins_HandsOn_1.0.1.pdf (9/27/2010, 960 KB)

Chess Plugin

The chess plugin consists of a (threaded) chess engine that lets you calculate moves, so that people could play against the computer (or the computer playing by itself). There are some features to support saving and loading of games and adjust the strength and so on. The plugin by itself does not implement any graphical representation of the chess board. That is what we have DXStudio for, eh?

License
As the plugin uses code from Marcel van Kervinck’s MSCP chess engine (which is under the GPL), the plugin itself is released under the GPL. Download the license and source code below.
Plugin Properties (v1.0.2)

sID_String
Returns the plugin’s identification string (read only).

iStrength
The chess engine’s search depth (= strength). An integer value ranging from 1(weak) to 8(strong). Default value: 4 (read/write). Higher strength will cause longer thinking times.

iCalcRunning
A flag, indicating that a (threaded) calculation is running in the chess engine. 0=nothing active, 1=thread running. (read only)
Plugin Methods (v1.0.2)

NewGame
Resets the chess board and prepares for a new game. Returns ‘true’ on success, ‘false’ on error.

GetCurrPlayer
Gets the current player who should do his/her move. Returns 0 for WHITE and 1 for BLACK.

MakeMove
Submits a new move to make. sMove should be in formats like ‘e2e4’ (regular move), ‘e7e8=Q’ (promotion). Castling is done by submitting the king move. Returns ‘true’ on success, ‘false’ on error.

RequestMove
Calculates *and executes* the next move on the board. Returns the result as a string parameter to a callback routine, given in string ‘sCallback’. The data passed to the callback routine is in formats like ‘e2e4’ (regular move), ‘e7e8=Q’ (promotion). Castling is expressed by giving the king move. ‘1-0’ (white wins), ‘0-1’ (black wins), ‘1/2-1/2 Draw by repetition’, ‘1/2-1/2 Maximum moves reached’, ‘1/2-1/2 Stale mate’). Returns ‘true’ on success, ‘false’ on error.

GetValidMoves
Calculates possible moves of the token on the ‘sFrom’ field (sFrom, like, ‘e2’) and gives back a string (format like ‘e2e3,e2e4’; castling is expressed by showing the possible king move). Returns an empty string on error (or when no movements allowed).

SetPositionsFEN
Sets the current token positions on the board by submitting a string in ‘Forsyth–Edwards Notation (FEN)’ format. Returns ‘true’ on success, ‘false’ on error.

GetPositionsFEN
Gets the current token positions on the board by returning a string in ‘Forsyth–Edwards Notation (FEN)’ format. Returns an empty string on error.

AbortThinking
Aborts the (threaded) calculation of a move (e.g., when search depth was set too high). It is recommended to abort the game and reset, as this could leave the chess engine in an undefined state. Returns ‘true’ on success, ‘false’ on error.

IsValidMove
Checks if the given move string is a valid move. Must not be called when a calculation is running. Returns ‘true’ or ‘false’.

IsKingAttacked
Checks if the king of the current active player is under attack. Must not be called when a calculation is running. Returns ‘true’ or ‘false’.

GetMovesCount
Returns the number of moves that the current player can do (all tokens). Returns an integer (-1 on error).

ProposeMove
Calculates *but does not execute* the next move on the board. Returns the result as a string parameter to a callback routine, given in string ‘sCallback’. The data passed to the callback routine is in formats like ‘e2e4’ (regular move), ‘e7e8=Q’ (promotion), ‘o-o’ (short castling), ‘o-o-o’ (long castling), ‘1-0’ (white wins), ‘0-1’ (black wins), ‘1/2-1/2 Draw by repetition’, ‘1/2-1/2 Maximum moves reached’, ‘1/2-1/2 Stale mate’). Returns ‘true’ on success, ‘false’ on error.
Usage Demo App

This very basic application shows the usage of the plugin. Upon start, the computer begins playing by itself – until an end condition is reached. Then, the app idles.

Downloads

License of the plugin/dxeffect
GPL_License.txt (09/19/2010, 18 KB)

Chess Plugin v1.0.2 (zipped dxeffect)
miko_chess_1.0.2.dxeffect.zip (22/11/2010, 81 KB)

Chess Plugin 1.0.2 (Source), VS2008 C++ project
DXStudio_Chess_Plugin_1.0.2.zip (22/11/2010, 198 KB)

Chess Plugin 1.0.2 Demo App (Unlocked DXStudio document)
Chess_Demo_1.0.2.dxstudio.zip (22/11/2010, 1.5 MB)

GetKeyState Plugin

The GetKeyState Plugin is a helper plugin for DXStudio. It can be added to 2D and 3D scenes, and exposes a few functions to detect the state of ‘lock’ keys (like num lock, scroll lock, etc).

Plugin Functions
Please see the example doc for information on how to use these functions.

GetCapsLockOn()
Returns TRUE if CAPS LOCK is on. Returns FALSE otherwise.

GetScrollLockOn()
Returns TRUE if SCROLL LOCK is on. Returns FALSE otherwise.

GetNumLockOn()
Returns TRUE if NUM LOCK is on. Returns FALSE otherwise.

GetInsertLockOn()
Returns TRUE if INSERT LOCK is on. Returns FALSE otherwise.

GetPauseLockOn()
Returns TRUE if PAUSE LOCK is on. Returns FALSE otherwise.

Downloads

GetKeyState Plugin v1.0.0.1
getkeystate.dxeffect.zip (8/24/2010, 48 KB)

A demo doc, showing the usage of the different functions
getkeystate_sampledoc.dxstudio.zip (8/24/2010, 50 KB)

Cryptor Plugin

The Cryptor Plugin is a helper plugin for DXStudio. It can be added to 2D and 3D scenes, offering string and data en-/decryption (using the 3DES algorithm of the Windows CryptoAPI).

Plugin Functions
Please see the example doc for information on how to use these functions.

EncryptString()
Submit a password and string and get it back encrypted and base64 encoded (thus again being a string).

DecryptString()
Submit a password and encrypted and encoded string; get it back decoded and decrypted.

EncryptByteData()
Submit a password and a Javascript Array of byte values. Get another Array of byte values back, encrypted.

DecryptByteData ()
Submit a password and a encrypted Javascript Array of byte values. Get another Array of byte values back, decrypted.

EncryptStringCallback()
Useful for lots of data to encrypt. Submit a password, data string and a string pointing to a function that shall be called back once encryption is ready. Use ‘GetCryptJobStringData’ in the callback routine then, to retrieve the data.

DecryptStringCallback()
Useful for lots of data to decrypt. Submit a password, data string and a string pointing to a function that shall be called back once encryption is ready. Use ‘GetCryptJobStringData’ in the callback routine then, to retrieve the data.

GetCryptJobStringData()
Used with ‘DecryptStringCallback’ and ‘EncryptStringCallback’ (see above).

Downloads

Cryptor Plugin v1.0.0.1
cryptor.dxeffect.zip (7/26/2010, 63 KB)

A demo doc, showing the usage of the different functions
CryptorSampleDoc.dxstudio.zip (7/26/2010, 73 KB)

2D Particle Plugin

The Particles2D Plugin is a helper plugin for DXStudio. It can be added to 2D effectpoints in 2D scenes of DXStudio documents, providing some basic emitter functionality.

Plugin Functions
Please see the example doc for information on how to use these functions. By design, the plugin is configurable by JS script only. Setting attributes via the DXStudio editor interface is not implemented.

getPosWorld(…)
setPosWorld(…)
addColorBlip(…)
addBitmap(…)
setAngularRange(…)
setSpeedRange(…)
setLifetimeRange(…)
start(…)/stop(…)
setFrequency(…)
getParticleCount(…)
setExplosion(…)
setGravity(…)
setFading(…)
setRotRange(…)


Downloads

Particles2D Plugin v1.0.0
particles2D.dxeffect.zip (6/4/2010, 68 KB)

A demo doc, showing the usage of the different functions
Particles2D_sampledoc.dxstudio.zip (6/4/2010, 266 KB)

Cardek’s 2DWaterfall Demo.
A demo doc (pwd locked), made by Cardek, posted at the DXStudio forums
2DWaterfall.dxstudio.zip (6/13/2010, 930 KB)

Utility Plugin

The MiKo Utility Plugin is a small helper plugin for DXStudio. It can be added to DXStudio documents and exposes some functions that might be useful (and are not yet in the core engine).

Plugin Functions

getHDDSerial()
Returns the system’s HDD C:\ serial number (or 0 if not found), retrieved from kernel32.dll’s ‘GetVolumeInformation()’. This will return a unique serial that is assigned by windows upon FORMATTING of the respective partition. Read: The number will change on HDD reformat.

getShaderVer()
Returns the gfx card’s shader version, as reported by DirectX’s ‘GetDeviceCaps()’. A string of format ‘major_ver.minor_ver’ is returned. On error, it is ‘0.0’.

getProcInfo()
Returns the computer’s processor info, retrieved from Window’s registry. A string of format ‘VendorIdentifier * ProcessorIdentifier * ProcessorNameString’. On error, it is ‘n/a * n/a * n/a’.

getVideoMem()
Returns an estimate of the amount of available texture memory in MB, retrieved from DirectX’s ‘GetAvailableTextureMem()’. The value is rounded to the nearest MB integer value. Returns 0 on error.

getTotalMem()
Returns the size of the computer’s total physical memory in (and rounded to) Kilobytes (KB). Will return 0 on error.

getFreeMem()
Returns the size of the computer’s free physical memory in (and rounded to) Kilobytes (KB). Will return 0 on error.

saveScrnShot(sFilePathName,sFiletype)
Saves a screenshot of the current front buffer to disk. Pass in complete path and filename (e.g., ‘C:\screenshot.png’) as sFilePathName. sFiletype is the format to be saved (string) with possible values ‘bmp’, ‘png’, ‘hdr’ (lower case). Will return FALSE on error (Note that the call might return TRUE and fail afterwards, as it is executed async to the JS call.

getWindowsVer()
Returns a string, identifying the Windows version running. Possible values are: ‘Windows7/Server2008R2′,’WindowsVista/Server2008′,’WindowsServer2003′,’WindowsXP’,’Windows2000′. On error, it is ‘n/a’.

getEthMAC()
Returns a string, identifying the MAC address of the first ethernet adapter being found by Windows. Format like ‘123:12:23:34…’ (numbers given as decimals). On error, it is ‘n/a’.

getGfxName()
Returns a string, describing the primary graphics device (graphics card) registered to the system. On error, it is ‘n/a’.

Downloads

Utility Plugin v1.0.3
UtilPlugin.dxeffect.zip (5/22/2010, 58 KB)

A demo doc, showing the usage of the different functions
UtilPluginDemo.dxstudio.zip (5/22/2010, 331 KB)

DXStudio Exporters Collection

DXMesh Exporter for pnpTC

PnPTCDXStudioFileHMapExportPlugIn: A pnpTC export plugin for *.dxmesh

Recently, I played with PnP TerrainCreator (www.pnp-terraincreator.com). It worked very well, and the documentation and plug-in reference is very detailed. So, I created a plugin for exporting to DXStudio’s mesh format ‘*dxmesh’. It uses Worldweaver’s DXMeshAPI 1.0.1 and is mainly based on the plugin reference code by the TerrainCreator people.

Features
This exporter is adapting the programming layout of the pnpTC plugin demos (and re-using quite a lot of their code). Creating quads from heightmap bits, exporting textures, lightmaps and reducing polygons is in. Plus some additional features that might be helpful for using the meshes with DXStudio. There is a chance the plugin will be added to the official pnpTC distribution some time in future. Until this might happen, please download from this site.

Installation
Place the file PnPTCDXStudioFileHMapExportPlugIn.dll into pnpTC’s plugin folder, e.g. C:\Programme\PnP TerrainCreator\PlugIns and DXMeshAPI.dll into the main application folder, e.g. C:\Programme\PnP TerrainCreator.
On Startup, pnpTC should detect the new plugin. Do *not* place the DXMeshAPI.dll into the plugin folder of pnpTC. This would cause an error message on startup.

Downloads

pnpTC plugin ‘PnPTCDXStudioFile-HMapExportPlugIn’
The compiled plugin v1.4 and DXStudio helper dll ‘DXMeshAPI.dll’.
PnPTCDXStudioFile-HMapExportPlugIn_14.zip (6/19/2009, 506 KB)

The complete source code project of v1.4 (VS C++ 2003)
Source_PnPTC_plugin_1.4.zip (6/19/2009, 8 MB)

A DXStudio document (zipped *.dxstudio), using a 4×4 tiled terrain (dxmesh, exported with the plugin).
For DXStudio 3.0.29 and up.
pnpTC_terrain_test.zip (5/9/2009, 2.3 MB)

A DXStudio document including the DXStudio installer, using a 4×4 tiled terrain (dxmesh, exported with the plugin).
pnpTC_terrain_test.exe.zip (5/9/2009, 15.8 MB)

A exported test terrain. 4×4=16 tiles, lightmap. This is the one used in the demos above.
pnpTC_terrain_Tiles_4x4.zip (5/9/2009, 2.0 MB)

DXMesh Exporter for L3DT

mk_L3DTio_DXStudio: A L3DT exporter for *.dxmesh

L3DT by Bundysoft is a nice application for the generation of large 3D terrains (L3DT = Large 3D Terrains). This is a L3DT plugin to export to DXStudio’s mesh format ‘*dxmesh’. It uses Worldweaver’s DXMeshAPI 1.0.1 and Bundysoft’s Zeolite API 11.08.

Version Information
The current plugin version works with L3DT version 11.08 and up.

Features
  • One single mesh export or tiled terrain (“mosaic”)
  • Automatic export of vertex normals for the mesh (using L3DT-internal calculation routines)
  • Export mesh with texture maps (if present in L3DT)
  • Export with “tangent space” normal maps (if present in L3DT; this is a L3DT Pro feature)
  • Export with or without face count reduction (using L3DT-internal calculation routines)
  • Automatic creation of a supporting *.xml file with tile positions and informations
  • Automatic export of a DXStudio demo doc to load and display the new terrain instantly

Downloads

L3DT plugin v3 mk_L3DTio_DXStudio v1.0.0.2.
Minor bugfixes. The compiled ‘plugin mk_L3DTio_DXStudio.zeo’, DXStudio helper dll ‘DXMeshAPI.dll’ and documentation pdf.
mk_L3DTio_DXStudio_1.0.0.2.zip (8/20/2011, 1.5 MB)

L3DT plugin v3 mk_L3DTio_DXStudio v1.0.0.1
The compiled ‘plugin mk_L3DTio_DXStudio.zeo’, DXStudio helper dll ‘DXMeshAPI.dll’ and documentation pdf.
mk_L3DTio_DXStudio_1.0.0.1.zip (6/11/2011, 3.4 MB)

L3DT plugin v3 mk_L3DTio_DXStudio v1.0.0.1 Source.
The VS2008 source project. Needs DXMesh API and path adaptions (so, doesn’t compile out-of-the-box)
mk_L3DTio_DXStudio_1.0.0.1_Source.zip (7/9/2011, 2.1 MB)