With purchasing a Gamestudio Edition from the Gamestudio website, you aquire the right of lifetime free updates of your engine version. Updates are released in regular intervals as long as the engine version is developed. They are available on the Gamestudio user forum, and on the download page.
We recommend that you visit the download page from time to time, and install updates when they become available. It's safe - all versions appearing on the download page went through a thorough private and public beta test before.
Updating is easy, but requires that you are able to understand and follow the instructions below.
Q. I keep getting the old version
number even after installing an update.
A. You need to have administrative rights in a Windows 2000, XP, Vista, or Windows 7 system for installing or updating a program. During the installation process no part of Gamestudio - like WED or SED - must be running or opened. Write protection of your whole Gamestudio folder or any files inside must be set to 'Not Write Protected'. Make sure this way that all files are closed and accessible, and update again. As a last resort, de-install your previous Gamestudio version before installing the new one - this however is normally not required.
Q. I'm getting script error messages when starting my project. It compiled without errors in the previous version.
A. There are several possible reasons. New versions often have a better parser and find more syntax errors. Maybe you've defined a standard Windows struct or API function in your code that is now also defined in include\windows.h or include\d3d9.h of the new version. Or you are using a variable or function that has the same name as one of the new engine variables or functions. Or you've earlier copied script or .fx files from one of the program folders in your project folder, leaving your project now with a mix of old and new files. The error line is displayed, so fixing the script errors is normally easy.
Q. The keyboard shortcuts don't work anymore.
A. Open WED / File / Preferences and set Key / Default / Apply.
Q. A certain function in my script behaves different than with the previous version.
A. Check the function with the debugger. Correct functions are supposed to behave the same way with any engine versions, but mistakes - such as a wrong pointer or uninitialized variable - can lead to a different or random behavior.
Q. Strange things happen
when I run my project.
A. If you've copied script or .fx files from a program folder into your project folder, and/or modified them, make sure that they are updated as well. Apart from that, see compatibility notes below.
Gamestudio/A8 Updates sind für alle Besitzer einer Gamestudio/A8 Version kostenlos. Sie sind auf dem User-Forum oder der Download-Seite erhältlich. Updaten ist einfach, setzt jedoch voraus, dass Sie die folgenden Anweisungen verstehen und befolgen können.
Q. Ich bekomme immer noch die alte Versionsnummer.
A. Sie brauchen Administrator-Rechte, um unter Windows 2000, XP, Vista, oder Windows 7 ein Programm zu installieren oder upzudaten. Während der Installation darf kein Teil von Gamestudio - z.B. WED oder SED - geöffnet sein. Schreibschutz Ihres Gamestudio-Ordners und aller darin enthaltenen Dateien muss abgeschaltet sein. Als letzter Weg deinstallieren Sie Ihre alte Programm-Version und löschen Sie den Installationsordner komplett - dies ist allerdings normalerweise nicht erforderlich.
Q. Ich bekomme Fehlermeldungen in meinen Skript. Es lief ohne Fehlermeldungen in der vorigen Version.
A. Dafür kann es verschiedene Gründe geben. Neue Versionen haben oft einen verbesserten Parser, der mehr Syntaxfehler findet. Vielleicht aber haben Sie ein Standard-Windows-Struct oder eine Windows-API-Funktion in Ihrem Skript definiert, die nun ebenfalls in include\windows.h oder include\d3d9.h der neuen Version enthalten ist. Oder Sie benutzen eine Variable oder Funktion mit dem gleichen Namen wie eine der neuen Engine-Variablen oder Funktionen. Oder Sie haben früher eine Skript- oder .fx-Datei von einem Programmordner in Ihren Projektordner kopiert, so dass Ihr Projekt jetzt aus einem Mix von alten und neuen Skripts besteht. Die fehlerhafte Zeile wird angezeigt, so dass eine Korrektur normalerweise einfach ist.
Q. Die Tastenkürzel funktionieren nicht mehr.
A. Öffnen Sie WED / File / Preferences und setzen Sie Key / Default / Apply.
Q. Eine bestimme Funktion in meinem Skript verhält sich anders als vorher.
A. Prüfen Sie die Funktion mit dem Debugger. Korrekte Funktionen sollten sich mit allen Engine-Versionen gleich verhalten, doch Fehler - z.B. ein falscher Pointer oder eine uninitialisierte Variable - können unterschiedliches oder zufallsabhängiges Verhalten bewirken.
Q. Seltsame Dinge passieren, wenn ich mein Projekt starte.
A. Wenn Sie Skript- oder .fx-Dateien von einem Programmordner in Ihren Projektordner kopiert oder verändert haben, stellen Sie sicher, dass diese auf dem neuen Stand sind. Lesen Sie ausserdem die Compatibility Notes unten.
V 8.30 now uses PhysX version 2.8.4, which allows the deployment of physics applications without the need to install the PhysX System Software on the target system.
OpenAL sound objects can now be created with the snd_createoal and snd_createstream functions.
Environmental sound effects can be created through eax_create, eax_attach, and eax_set. Many predefined environment effects are available.
Directional sounds can be played with the snd_cone function.
The inkey_active function can be used to terminate inchar(). This worked already in previous versions, but was undocumented.
The intern_collision flag now also works for 6D joints.
The pX_stats function returns the number of physics entities.
Some information about the BSP format was added to the format description.
The matProjInv matrix is now available for shaders.
Some video drivers don't recover properly when the video hardware is switched off in fullscreen mode, f.i. by going to standby or closing the lid of a laptop. When encountering DirectX errors in such a situation, A8 now automatically resets all DirectX states, switches to window mode, and reloads textures and meshes. This solves standby/switch off problems in most cases.
The key_pressed function can now be used to reset keys. This can be useful when the release of keys is not detected by the operating system, for instance when going to standby.
The d3d_near_decal factor determines the distance of the decal compared to its surface, and overcomes z-beating artifacts that can otherwise happen with a too large clip_near/clip_far range.
All postprocessing shaders now got useful default parameters in skill11..14. pp_set now automatically adapts the resolution to the first view in the chain. The new pp_add function can combine any number of postprocessing stages; this also works for multistage shaders such as the HDR shader.
The automatically generated render target of a view stage has now always the size of the engine window. This enforces rendering in the engine window resolution even when the view size was not set. For rendering in a different resolution, assign an individual render target.
The client_find function can be used for enumerating clients.
ent_setvertex now automatically updates duplicated vertices of a mesh.
The size of decal shadows is now determined by the entity's bounding box.
The sound_test.c sample demonstrates sound cones and reverb effects.
pan_getpos returns the xy position of a panel element.
Gamestudio now supports NETPORT I/O modules over the network. This way, a game can control external motors, lamps, servos, or solenoids.
Actor paths can be created by script with the path_create function. The path_set function can be used to retrieve the path name.
The first version of the shooter templates by George Pirvu is now included in Gamestudio.
The A5 lighting engine, which was so far kept for compatibility reasons, was now removed from A8. The light manager is now always enabled. Switching off the light manager through the patch variable for lighting in old A5/A6 levels won't work anymore. Levels created with A5 or A6 should be recompiled for A8.
A new view material mtl_hdr for emulating a HDR effect was added to the mtlView.c library and to the water.c sample.
The new material parameter technique allows several shaders in the same .fx script.
New functions pXent_move and pXent_rotate for directly moving and rotating physics objects, kinematic objects, and character controllers.
Joints are now motorized. Motor velocities or target positions can be set up with pXcon_setmotor. An example for a rotating 6D joint was included.
A new constraint PH_ROPE for ropes or rubber bands was implemented.
New library: car_props.c
New function: str_trim
New function: region_get
The bones.fx shader now also transforms the normals. Note that this only works for rigid bones matrices (rotations and translations). Arbitrary bones matrices would require inverse transpose transformation for normals, with a bad effect on the shader frame rate.
Network packet compression and encryption is now also supported in unprotected sessions.
The PhysX collision event now sets the you entity to the obstacle.
New functions: usb_setdata64, usb_error.
New functions sys_setstr, sys_getstr, sys_setvar, sys_getvar for storing game settings in the registry.
The maxbones variable can be used to determine if a material contains a GPU bones shader.
New function: bmap_createpart.
New function: floor.
New functions: pXent_getparams1, pXent_setposition.
A rear mirror was added to the knights_on_wheels demo.
bmap_process now also works with view materials that require a viewport setup (such as mtl_emboss).
c_intersect can now detect the intersection of a ray and a box.
The ent_seed function got an additional parameter for adjusting seeded entities to slopes on terrain.
Overloaded functions are now selected more precisely by their number of parameters.
USB I/O modules - such as relais - can now be controlled with usb functions.
The NOCAST, NOWORLD, and NOENT flags can be used for suppressing view content.
session_open can now be used to start unprotected multiplayer sessions. Unprotected sessions can be joined by any client, even with a different script.
For day-night transitions the ambient_color vector can now be changed at runtime.
The strength of stencil blurring can now be adjusted with the stencil_blur() parameter.
A script spot.c with a simple spotlight was added to the samples folder.
For bones animated models, c_updatehull now updates the collision hull to the current skeleton position when the bones position was changed.
ent_cloneskin now also works for sprites, which allows to create individual sprites from bitmaps.
The Map Compiler got a new allocation algorithm. This improves the compiling speed remarkably.
The var class (vars.h) now uses inline functions only; thus the vars.cpp file is not required anymore.
WED now also renames flags in the Entity Properties panel through comment tags.
d3d_entsort can now also sort transparent entities by their Y coordinate, which is sometimes useful for isometric games.
ent_create can now directly load model files in single-texture obj format.
The ent_setmesh function now also adapts the number of mesh drawing passes to the number of skin subsets in the new mesh.
The collision_mode variable can be used to speed up entity creation.
The ent_seed function can be used to seed entities on terrain, depending on colors on a mask image.
Terrain entities can now be directly created with the ent_createterrain function.
The c_intersect function can be used to detect collisions between moving panels, boxes, points, or rays.
The render_layer event is called before rendering panels, texts, and view entities.
A new library shadows.c was added. It renders robust PSSM shadows in outdoor levels.
New functions for reading and setting a pixel color on a certain terrain position were added to the level.c library.
A pointer to the vertex declaration of model meshes was added.
The bg parameter allows to clear a VIEW to a certain value.
The MATERIAL struct now contains a pointer to the compiled LPD3DXEFFECT, which can be used for setting effect variables through DirectX functions.
On shader compiler errors, the error message now does only show the actual error, without preceding warnings.
A snow function was included in the particle library.
A new sample weather.c was added for demonstrating how to do a weather effect.
A WED Redo function is now implemented.
Extracting .pak files from resources is now more secure due to a new encryption algorithm.
The NOFOG flag now also works for VIEW objects.
With the clipfactor parameter, the clipping behavior of entities outside the view frustum can be affected.
The ENABLE_TREE material event now also works with view materials.
Redefining a variable with a different type will now give a warning message.
The Blinn shading algorithm was improved, giving a visually better effect for all standard shaders that use Blinn shading.
A new library entmove.c was added. This script libary contains basic entity position and angle manipulation functions, such as rotating, turning towards a target, moving to a certain position, or following a path.
The proc_status2 function can be used to check if a certain entity function was finished.
A aphysx.h header was added to the engine SDK, allowing users to use PhysX functions in C++ applications. A PhysX part was added to the C++ tutorial.
A water.c sample was added for demonstrating how to assign shaders from the library and adjust their parameters.
P The shader compiler now checks if a precompiled effect (*.fxo) exists and is newer than the effect file (*.fx) from the material definition. In that case, the precompiled effect will be loaded, rather than the effect file. This will speed up material loading. It also makes it unnecessary to include the shader compiler (d3dcompiler_42.dll) in the published version when precompiled effects are included instead.
New samples were added: digital.c for the video_border function (Vista and above only); knightsonwheels.c, Ventilator's contest entry modified for the car library; crowd.c for GUI based bones calculation (Commercial and above only); earthball8.c, the PhysX version of the earthball sample; and physXtest.c for testing the speed of the PhysX implementation.
The Project Manager now supports the new lite-C template set, beginning with George's car and camera templates.
The content creation workflow was heavily improved. The FBX importers now use the 2010 FBX library. Many problems of earlier versions, for instance with unassigned bones animation keys, are now gone. The 2010 FBX version also imports the main .3DS, .OBJ, and .DAE (Collada) file formats. WED and MED got a new, revamped user interface. WED now renders objects in two layers, which increases the WED framerate and makes object editing smoother and easier.
All WED/MED file open dialogs now use a standard Windows dialog with file history.
WED got a tool for defining portal regions. Select the objects you want to be contained in the region, then click Add Region. A region frame is drawn around the selected objects. The region can be assigned a name under Properties. Portal regions can be used for clipping branches of the ABT resp. BSP tree (Pro only), or for other purposes such as triggers.
The bmap_create function now also supports the 2x16 and 2x32 bit floating point formats.
The view_check function can now determine if a box is fully or partially inside the view frustum.
Shaders can now be precompiled with the -fxo command line option for faster level loading and material creation.
The effect_layer function can be used to create 2D particles that are rendered in panels or follow the mouse pointer.
The region_set function disables or enables the branches of the ABT resp. BSP tree in a certain region.
The region_create function creates a portal region in the level.
region_check checks if an object lies within a certain region.
region_find finds a region at a certain position.
The car template was adapted to PhysX, and underwent a major cleanup on that occasion. A new car.c library with often-used vehicle function was added, and replaces the old tcar.c library from the templates.
The functions session_open, session_connect, client_drop, and session_close are now also available in the A8 Commercial Edition.
If a matrix array with the name matBones appears in a shader, the engine calculates the bones animation on the GPU, rather than on the CPU. This has of course several disadvantages - vertex manipulation, mouse picking, decals, and polygonal collision detection won't work with those entities. But they are rendered up to 3 times faster especially when they have many bones or use bones weights. With only a few bones and no weights, the difference is less noticable. An example level crowd.c is included for comparing the rendering speed (A8 Pro without bones shader: 14 fps; with bones shader: 40 fps).
The d3d_instancing variable activates instancing for sprites. The terrain demo is rendered about 30% faster with A8 Pro this way, although it has twice the vegetation density.
For vegetation, new sprite types with 4 or 6 sides are supported.
DDS sprites can now also be multi-sided and multi-framed.
Accelerated stencil shadows are now always used, even in the Free and Extra editions.
pX.. commands replaced the ph_ physics commands. The syntax is mostly maintained, so it's easy to move old physics applications to A8. In almost all cases this will result in a better frame rate and greater stability of the physics simulation. With an nVIDIA graphics card, the PhysX subsystem can now handle thousands of simultaneously touching physics objects (see samples\physXtest.c)
ent_create can create several entities at once by loading a WMB entity that contains sub-entities.
A published A8 acknex.dll now works with all executables generated with the same development system. This way, a single DLL can be used for many EXEs (A7 and before required a separate DLL for any EXE). This also overcomes the problems with some commercial wrapper systems.
Through the video_border function, an overlay channel in the window outside of the DirectX area is now supported. This way, arbitrary shaped windows are possible.
The bmap_process function can be used for procedural texture generation and general parallel processing.
Except for physics commands, A8 is 100% compatible to A7, so all A7 projects will nomally still run under A8 without any change. The differences of version A8.00 to A7 are listed below.
The new lite-C programming language by Wang Tian Yi replaced
Volker Kleipa's C-Script language. C-Script is still supported
by all Gamestudio editions from Extra and above,
so any project started with A6 can be finished with A7. Scripts
with a .wdl extension (such as the A6 Game Templates) will use C-Script
syntax, while scripts with a .c extension
will use the new C syntax. You can even include a .c script in a .wdl script,
and call lite-C functions from C-Script. For converting a C-Script project
to lite-C, see migration.
Due to the removal of some restrictions inherent to C-Script, lite-C is a lot easier to use than its predecessor language. It has taken over all the C-Script advantages, like the general purpose var variable, automatic pointer handling, and foolproof memory allocation and error handling. On the other hand it offers C syntax and can be used to write normal windows programs. If you don't use the special C-Script features in the code, you can write programs that can also be compiled with any normal C++ development system like VC++ NET. On the language comparison page you'll find the differences listed between C-Script, lite-C, and C++.
Lite-C supports all basic C/C++ variable types, structs, pointers, and arrays, as well as #define macros and the usual C expressions and statements. Functions can have arbitrary types and numbers of parameters. Variables are automatically converted. So you can assign float variables to var parameters without having to care about type conversion. Arrays and pointers are supported for all variables and structs, and can be global or local without restriction. Nonstandard variable conversion is handled by cast operators. Classes are supported for external COM Dlls, like DirectX.
Because the new compiler is more C compatible than C-Script, it requires some small script syntax changes, similar to the step from A4 WDL to A5 C-Script. Names are now case sensitive, preprocessor directives are now preceded by '#', like '#define' or '#include'; flags have to be set and reset by |= or &= operators; and scripts have a .c or .h extension instead of .wdl (see migration for details).
Debugging with SED works the same way as in C-Script. For debugging without SED, set a breakpoint in the code by placing the comment tag '//!' at the end of a line. Breakpoints can only be set in Pure Mode lite-C programs (with a main function, not with WinMain). They only work after the first frame (when the engine window is opened), so when placing them in the main function, add a wait(1) before. Start the engine in window mode with the -debug command line option. When the breakpoint is hit, the engine stops and the current source line is displayed in the title bar. [Esc] aborts debugging, [F10] steps to the next instruction, [Shift-F10] steps over function calls and [Ctrl-F10] runs to the next breakpoint. Global variables can be observed in a panel or in a SED watch. Local variables can be observed by temporarily replacing them with global variables.
WED now supports concave blocks
and static meshes that can be exported and imported to and from the FBX, ASE and
the MDL format. If the map contains concave blocks or static meshes,
the Map Compiler must be run in Mesh Mode (Create Meshes checked).
Concave blocks and static meshes can be rendered with ABT scene manager as
well as with the new BSP scene manager of the Pro Edition. However the OBB
collision detection should be used. The AABB collision detection only reacts
on the bounding box of a concave block or static mesh.
A7 supports an unlimited number of dynamic lights (A6 supported only 8 lights). A static light placed in WED can now also radiate dynamic light when its Dynamic flag is checked (mesh-based levels only). Note that static and dynamic light has a different effect on entities. The static PRV equally affects the whole entity mesh depending on lighting and shadows along the floor plane. Dynamic light only affects the entity parts in its range, regardless of shadows and floor planes. Static light has no influence on the rendering time, while having many dynamic lights forces the light manager to permanently switch the lights on and off during rendering and can reduce the frame rate.
If you want an entity to be affected by dynamic light sources only, set its UNLIT flag, but do not assign the mat_unlit material. If you want an entity to be affected by the PRV only, assign the mat_unlit material but do not set the UNLIT flag.
The new map compiler and lightmap generator for concave meshes is developed by Alexander Stolipin. The Map Compiler contains a switch Create Meshes. This switch can be used to build a level from meshes rather than polygons. In the future, many features will require that levels are compiled in this mode. Using the Single Mesh WED feature for combining groups to meshes, mesh-based levels can run much faster than polygon-based levels.
The Adaptive Binary Tree (ABT) renderer renders especially outdoor levels with many entities a lot faster than A6. A worst case entity level submitted by a user runs almost four times faster (A7.04 - 140 fps; A6.60 - 82 fps; A6.31 / A6.40 - 38 fps). In normal levels the fps gain will be smaller. tree_range can be used to adjust the granularity of the ABT.
The A7 rendering kernel is also used for mouse picking. This leads to a considerable frame rate increase in all projects that use the mouse for selecting 3D objects.
The memory management core of the engine was rewritten. The error message "nexus too small" is no more. If the nexus size is exceeded, additional memory is allocated from the PC's virtual memory pool. Note however that you still should observe and set the nexus! Allocating memory at game play is a) slow and b) dangerous. When the virtual memory is consumed, the game will terminate without giving the end user a chance to save his score. The level_mark and level_free functions only work when the nexus is not exceeded.
An arbitrary number of dynamic
lights is supported by A7. The maximum number of lights can be set through
the max_lights variable
(default: 100 for the beta version, 8 for the release version). The light
manager uses the ABT for calculating which objects lie in the ranges of which
lights, and generates lists of close lights for every object. This calculation,
although very fast, is an additional rendering process that can affect the
frame rate, depending on the number and ranges of active lights. For overcoming
the 8 lights hardware limit, light sources are dynamically switched on and
off during rendering while taking care that no more than 8 lights are active
at any time.
Naturally, a single entity, block, or terrain chunk can still not receive light from more than 8 sources simultaneously. If an object lies within the ranges of more than 8 lights, it is affected by the 8 most recently created lights only. This ensures that creating a new light has an immediate effect on the environment even if many dynamic lights are already around. For using the new light system, levels and map entities must be compiled in mesh mode (Create Mesh activated). Terrain should be chunked; the smaller the chunks, the less visible are light swapping effects when more than 8 lights move in or out of the range of a chunk.
The main difference between A5 and A6 is the handling of polygon coordinates and lighting. A5 used its own algorithms for lighting and for converting polygon coordinates into screen space. A6 and A7 uses DirectX for this, thus omitting the software world->screen conversion and lighting step. For this reason the A6 and A7 renderers are a lot simpler than the A5 renderer, but offer more features and can use T&L hardware. Very old 3D cards without multitexturing are not supported anymore by A6 and A7.