New Features in Gamestudio / lite-C

With purchasing a Gamestudio Edition from the Gamestudio website, you aquire the right of lifetime free updates of your engine version. Updates are released every 4-6 weeks as long as the engine version is developed. They are available on the Gamestudio user forum, and on the download page.

Why you should update

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.

Installing an update

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.

Q. I'm getting errors with shaders. This didn't happen in the previous version.
A. Make sure that your DirectX version is of Aug-2009 or newer; if in doubt, install the latest DirectX 9 version from http://www.microsoft.com/downloads.

Installieren eines Updates

Gamestudio/A7 Updates sind für alle Besitzer einer Gamestudio/A7 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.

Q. Ich bekomme Fehler mit Shadern. Das ist in der vorigen Version nicht passiert.
A. Vergewissern Sie sich, dass Sie eine aktuelle DirectX-9.0c-Version (Aug-2009 oder neuer) installiert haben; im Zweifelsfall laden Sie sich die aktuelle Version von http://www.microsoft.com/downloads.

Version 7.86.0 compatibility notes

New features implemented in V7.86.0

A startup.h template was added. This customizable template starts the game with a splash screen, music, title, and sets some engine parameters like antialiasing and startup resolution.

CENTER_Y now also works with TrueType fonts.

The bmap_save function now clips the image to the size given in the BMAP definition.

The automatic adaption of the z buffer to the render target size can be prevented through the compatibility variable.

A model lightmap is now recognized by the engine and by shaders on any skin number (not only the second skin).

If an entity has a size above 100 units, its LOD distance is reduced by its radius. This gives better LOD results for large models.

The Game Design tutorial now contains the new MED and WED workshops by Quadraxas and David.

The view_check function can now determine if a box is fully or partially inside the view frustum.

All string functions now support Unicode.

Version 7.85.4 compatibility notes

New features implemented in V7.85.4

The following functions now also work with Unicode strings: str_width, str_cpy, str_cat, str_cmp, str_cmpi, str_cmpni, str_getchr, str_setchr, str_clip, str_trunc, str_chr.

The c_ignore function can be used to ignore certain entity groups on the following collision function call. It replaces the IGNORE_FLAG2 method.

The view_check function determines if a bounding box intersects a view frustum.

The WED/MED FBX importer was rewritten, using the 2010 FBX library. Many problems, especially with unsupported bones animation keys, are now gone. The new FBX importers are supposed to replace the old FBX 2005 / 2006 importers. Besides FBX files, they also import 3DS and some versions of Collada files.

A camera.c library was added to the snippets, allowing to set up an automatic player-following camera with 6 different modes. It replaces the old t_car_cameras.c library from the car templates.

The keys.c include file contains often used, simple functions related to keyboard and joystick input.

A function level_loadsplash was added to the level.c library.

Array initialization now also supports multidimensional arrays.

Version 7.84.0 compatibility notes

New features implemented in V7.84.0

The engine now supports Unicode text for displaying right-to-left writing like Hebrew or Arabic, as well as logographic or syllabic alphabets such as Chinese Han or Japanese Kana.

Under SED/Plugins you can now change the EXE icon. A simple icon editor (IED) was included.

bmap_create can now also create cutouts from images.

str_setchr and str_getchr can manipulate single characters in a string.

The dtimer function can measure time in a double variable, overcoming the var range limitation.

Individual colors of panel elements (digits etc) can now be set through pan_setcolor, and changed at runtime.

ent_blendframe replaces the ent_blend function.

d3d_automaterial can be used to automatically assign a standard material to all blocks with a certain texture.

str_parse, str_parse_tail, str_parse_head can be used to parse words out of a string.

sys_exit can now generate an exit code for the application, thus allowing it to control batch files.

The sys_marker function can be used to indicate memory areas that were overwritten due to a script bug. This can help fixing hard-to-locate bugs that result in random crashes.

Bone weights are now also supported by all bones manipulation functions such as ent_bonerotate.

The video_mode variable now only supports widescreen resolutions that are also supported by the video card in fullscreen mode. This way the engine won't start in a widescreen resolution that can't be switched to fullscreen mode. Switching to an unsupported fullscreen resolution now won't displace the engine window anymore.

 P  A set of ftp functions can be used to upload, download, or update files from a server.

 P  A set of http functions can be used for communicating with PHP scripts on a server, or for accessing an online database. The ftp and http functions were originally developed by Peter Soxberger for the MMOG Utopia.

For demonstrating how to use lite-C for simple calculations (without engine window), a program pi.c for calculating the first 1000 digits of Pi was added to the samples.

According to a recent study, the choice reaction time is a major indicator of a person's life span... for determining whether that is true or not, a small lite-C program reactiontest.c for measuring a person's choice reaction time was added to the samples.

This version contains the new template system, beginning with the car ai template. The new templates are not yet supported by the Project Manager, but can be manually included in a script.

Levels with lightmaps and a second UV coordinate set can now be imported in WED from FBX files. A lightmap can be applied to the selected block through Textures/Apply Lightmap. The 3D view can be switched between texture and lightmap mode through the View menu.

A new GED version with various small fixes was included.

Version 7.82.3 compatibility notes

New features implemented in V7.82.3

The MED Merge function now attempts to merge the bones also. This is not always possible, but should work in most cases.

The WED Block Properties panel now got an Apply button for easier numerical manipulation.

The WED Add Object dialogs were updated and are more clear now. The Load Entity function caused confusion for beginners and was removed. Entities can now only be placed from the folder path.

A C++ var class was added to the engine SDK. The examples were updated.

When video_screen is set to 0, printf() prints into the text area of the startup window. This can be used for text-only programs.

 P  socket_connect, socket_send, and socket_receive can be used to communicate with a TCP or UDP socket.

str_chr finds the position of a character in a string.

str_cut cuts out a string from another string.

A tutorial about walking, third person camera, and collision events was added to the workshops.

On very small and very large models, FAT and NARROW are now both automatically set.

The LIGHT flag now also works for TEXT objects.

The PROC_NOFREEZE parameter exempts functions from freeze_mode.

 LC  The ent_nextlight function now stores light info in the hit struct, and can also detect WED-placed lights.

A new map compiler was included, with improvements of the lighting algorithms.

Through d3d_flags the renderer can be switched between pixel and vertex fog.

iLights gives the number of lights in range of the current object.

str_for_id now returns NULL when the client was disconnected.

 LC  The particles.c library contains often used, small particle related functions, such as emulating a particle effect with sprites. Suggestions or contributions of further functions are welcome.

The engine_status function can be called from a DLL for determining when engine variables are available.

 LC  The snd_add function writes a sound sample into the buffer of a playing sound, and thus can be used to compose sounds in real time.

The snd_playing function now returns the current play position.

The snd_create function can now create sine wave sounds of any duration without a sound file.

 LC  The material.lod variable can speed up rendering by suppressing shaders above a certain distance.

 LC  The UNTOUCHABLE flag makes panels transparent to mouse clicks.

 LC  The ent_status function can now be used for determining the size of a D3DVERTEX. Because the vertex size can change between engine versions and even between entities, this method is preferable over using the sizeof macro.

A new GED version with several small fixes is included.

 LC  The str_printf function copies formatted text and variables into a target string.

 LC  The file_date function can be used to compare the modification dates of two files.

 LC  The ent_animatefrom function can animate an entity with a scene from another entity.

WED and MED underwent many small improvements and bugfixes.

The exec function can now be used for directly opening documents and Internet URLs.

WED and MED FBX importers were further revamped with many small improvements for texture import.

Reading engine object definitions by the lite-C compiler was improved; panel elements can now also access other predefined engine object parameters.

The new map compiler version improves shadow mapping, and avoids some problems with seams and imprecise texture coordinates of the previous versions. It also got two new options for setting the minimum smooth angle and switching tesselation off.

The ent_bonehandle function returns the handle or name of a bone with a given number or name.

The draw_obj function draws a text, panel, or view entity for one frame on the screen.

With the bmap_for_texture function, textures can be replaced on level geometry, or videos can be played on them.

send_skill can now also send entity strings between clients and server. This allows f.i. updating player names to the clients.

 P  dplay_encrypt now uses a harder-to-crack algorithm. When encryption is active, clients are now dropped when their script does not match the server script. This effectively prevents any tampering with a client.

 P  By setting preload_mode to 16 or above, files in a resource can't be replaced externally. This improves the security of online games.

Version 7.80.2 compatibility notes

New features implemented in V7.80.2

The Gamestudio installer now also works under Windows 7 without requiring XP compatibility mode.

The GED ingame and terrain editor was now included in Gamestudio.

 LC  A terrain / vegetation example (infinite_terrain.c) was added to the samples folder. This example uses 9 simultaneous views for a terrain level of virtually unlimited size, and can handle 60,000 entities per frame at a decent frame rate.

 LC  A starfield screensaver example (a7_screensaver.c) was added to the samples folder.

The level.c library contains often used, small level related functions, such as terrain tiling, placing entities on terrain, and generating an endless terrain level. Similar include files with simple, small, but useful functions will be added in the future for actors, weapons etc., and will be used by the templates. It is highly recommended that you use the functions from the include files for your own project when possible - they will be permanently maintained and improved.

The strio.c library contains often used, small functions related to strings and file input/output.

WED can now import from the 3DS and OBJ format, and select scale and origin at import.

WED can now compile a level trough command line as well as with the WED SDK.

The new Export/Import Lights feature allows compiling a level with several different sets of lights, or splitting a level into several wmb entities that share the same lights.

MED Model Properties can now also display the properties of terrain models.

 LC  The sys_message function can be used to 'remote control' external programs with lite-C.

 LC  The sys_active function can be used to wait until a program that was started with exec becomes active.

With the sys_winversion variable the OS version can be determined.

 LC  Error messages now indicate the erroneous function itself, rather than the function last called before the error. This makes it easy to find the problem by single stepping through the given function.

 LC  Individual render targets for a view can be set through the target1...target3 parameters.

 LC  engine_gettaskinfo can be used to list all currently running functions.

 LC  engine_getscriptinfo delivers the name of a script function.

 LC  The vmask parameter can be used to make parts of a model mesh invisible.

 LC  The hit struct now contains the number of the mesh subset, which can be used to determine which part of the model was hit.

ent_getdecal returns the decals attached to a certain entity or block.

The effect_lod variable can be used to disable all shaders above a certain distance.

LOD techniques now also work with level blocks. Previously they only worked with models.

Panel colors can now also be used for coloring bitmap fonts.

 LC  The client_id parameter can now be used to assign a sky entity to a certain view.

The engine window can now be maximized, minimized, or resized. An event is triggered f.i. for automatically adapting the video resolution.

Internal LOD meshes ( P ) are now rendered even when a decal is attached to the model.

The application icon (displayed in the taskbar) is now set from the acknex.exe icon, and can be changed to any custom icon with an icon editor.

 LC  The ent_buffers function can be used to retrieve and manipulate the shape of model, terrain, or level meshes.

For users who want to contribute to the new A7 templates, a Template Writing Guide was added (WIP).

file_str_readto and file_str_writeto can now also read from and write to buffers.

The preload_mode variable can now be set up to preload also the entities' environment light.

The exec function now accepts shortcuts for the program folder and engine folder.

 LC  The group parameter can be used to define individual collision groups for entities.

Trough a d3d_entsort setting, intransparent entities can now also be sorted more precisely than with the ABT tree.

The sys_malloc and sys_free functions can be used to create arrays of dynamic size at runtime; allocated memory is automatically released at exit.

 LC  sys_nxalloc allocates memory from the level cache.

The OVERLAY flag can now be used to enforce the solid rendering pass and z-buffer writing.

The SKY and NOSKY flags can be used to combine several views for generating an endless level effect.

 LC  The CLIP flags give entities individual clip ranges.

 LC  The wind animation shader was adapted to sprites, and moved from experimental to release state.

diag_mode can be used to print level statistics.

Shaders can be temporarily disabled by setting d3d_shaderversion to 0.

vec_mul calculates the matrix product of two vectors.

The ang_for_axis function rotates entities about an arbitrary axis.

The ang_diff function calculates the angle difference between two Euler angles.

 LC  The ang_to_matrix and ang_for_matrix functions can be used to rotate entities by rotation matrices calculated by external software packages, such as physics engines.

The NOSEND_Z flag reduces the network traffic caused by entity position updates from 9 bytes to 6 bytes per entity.

Version 7.77 compatibility notes

New features implemented in V7.77

WED and MED now support the Vista Aero theme when using the new GXL2BASDX9B.DLL.

 C  The map compiler can now also create lightmaps for terrains. Shadows on the terrain surface are cast by the level geometry and by the terrain itself.

 C  The LightMap shader variable allows accessing the lightmap of a terrain entity. The terraintex material now contains a _lm technique that supports terrain lightmaps.

The Smooth flag on block surfaces now also causes Gouraud shading when the block is exposed to dynamic lights. Without that flag, the block gets flat shading with hard edges.

dplay_localfunction can now be used to suppress all entity level actions.

The on_exit event is also triggered when the Cancel button was hit on an engine error message.

Light positions are now updated immediately before rendering, preventing a one.frame lag that could be visible on fast moving lights.

 LC  When proc_mode is set to PROC_GLOBAL, the current entity function is not terminated when its my entity is removed by ent_remove or by a level change. Removing an entity sets all my and you pointers to that entitiy in all functions to NULL.

For terrains, ent_create now runs the terrain action (if any) before the terrain is placed in the level. This allows the action to set the scale of chunked terrains, which can otherwise not be changed afterwards.

 LC  For using the engine in an external application, a parent window can be set through hWndParent.

For multitexture terrains, the number of texture tiles per terrain row can now be given through detail_size.

 LC  Shaders can now access all global variables in the script through adding "_var" or "_flt" to the variable name.

 LC  The view_to_matrix function returns the transformation and projection matrix of a certain view.

 P  The session_close function switches back to single player mode.

SED has now two different buttons and keys for starting either the current script, or the script set up in preferences.

 LC  Some useful macros were added to acknex.h: DEBUG_VAR() and DEBUG_BMAP() can be used for quick debugging variables and view render targets. Some often used colors (COLOR_BLACK etc. ) are predefined. The functions D3DXVec3Set and D3DXVec4Set were added to the d3d9.h file for easier converting DirectX source code to lite-C.

View borders can be set for rendering isometric offcenter views.

 LC  The lite-C compiler now converts numeric types also for overloaded functions, which makes using them a little more relaxed.

If a sky is defined in the script, it is now always rendered in the background of the level when the level does not contain a sky box. If the level contains a sky box, the sky is only rendered when the sky box is visible.

The mouse sensitivity can now be adjusted in WED Preferences.

A section about preventing light artifacts was added to the WED shader guide.

The view.lod parameter can be used to increase LOD steps in a certain view.

 LC  If a file name in the script starts with "_", but the file is not found, the engine now trys to open the same file name without the leading "_". This way files can be excluded from publishing without renaming them.

A description of the WMB format for A7.70 and above can be found on the formats page.

tex_cycles can be used to switch off the default animation, and determine its speed.

Version 7.73 compatibility notes

New features implemented in V7.73

A new particle system was implemented. Particles are now round instead of square.

 C  The BEAM effect is now a lot faster and consists of straight or curved lines instead of single particles.

 P  The Pro Edition now uses instancing that allows ten times more particles without frame rate penalties.

c_rotate now accepts the IGNORE_FLAG2 option and does not displace the entity origin anymore when GLIDE is not set.

joy_raw and joy_rot now return values with decimals for higher precision.

ent_for_file returns a pointer to the first level entity with the given file name.

Mirror clip planes can now be used in shaders through vecPortal.

The -eq command line option terminates the engine on encountering a syntax error, and prints the error message into a file.

ent_reload reloads a modified entity file from hard disk.

MED now contains the same slice tool as WED.

 LC  The snd_buffer function can be used for playing own sound samples through the engine's sound player.

Chunked Terrains can now be placed multiple times in the level, just like nonchunked terrain.

32 bit TGA textures can now also be used for level geometry, thus allowing specular maps and height maps on the alpha channels of the texture and normal map.

SED can now save its current state as a project without creating a new project before. The project data now also includes the main script name.

The SED code jumper now also lists global pointers to variables and engine objects. The code templates got some often-used code snippets for a file header, panel, action, main function, and particle function.

Two new samples - clock.c and particle_trail.c - were added to the samples folder.

 LC  pan_setneedle sets or modifies a needle element on a panel.

 LC  pan_setdigits sets or modifies a digits element on a panel.

 LC  pan_setwindow sets or modifies a window element on a panel.

 LC  pan_setslider sets or modifies a slider. Sliders can now alternatively be defined with a scale image.

 LC  pan_setbutton sets or modifies a button on a panel.

 LC  txt_addstring adds a new string to a TEXT object.

Panels, views and texts now got two general purpose variables skill_x, skill_y for storing pointers or whatever else.

 C   LC  Panel digits elements now also support the SHADOW and OUTLINE flags.

 C  The video_alpha variable sets the transparency of the engine window and can be used to fade the window in and out.

window_pos gives the current engine window position on the desktop.

 C  The bumpmapping shaders were improved and don't reflect lights from the back side anymore.

 C  The mtl_lightcount material can be temporarily assigned to an object for displaying the number of dynamic lights in range.

video_aspect can now be re-defined for starting with the selected screen aspect under C-Script.

 C  The AUTORELOAD, TRANSLUCENT, and PASS_SOLID material flags can now also be set by defining a bool variable within the .fx file.

str_for_id retrieves the player name of a certain player entity in a multiplayer game.

Version 7.70 compatibility notes

New features implemented in V7.70

MED and WED got tools for cutting objects with a wire or a plane.

The WED FBX importer was improved. Model textures can now be internal or external, and are not converted to 32 bit anymore.

path_scanpath scans only the path the entity is already attached to.

The standard shaders now use the ambient, diffuse, specular, and emissive settings from the material. The parallax and occlusion shaders were rewritten, and now support two lights and lightmaps, and render faster than their predecessors. The bumpmapping shaders now support 3 lights; the cartoon shader supports 8 lights and lightmaps.

New effects and shaders were added to the shader library: glass, glassBump, chrome, chromeBump, turbulence, nomips, and wireframe.

The shader viewer was improved and now supports model autorotation and material adjusting.

Shaders are now only compiled when they are visible. This reduces the engine startup time when the shader library is included, but causes a brief delay when the shader becomes visible on an entity the first time. For preventing this, shaders can be precompiled with ent_preload or preload_mode.

ent_setskin now also sets skins of sprites and chunked terrain.

BMAPs can now be defined from rectangular sections of images.

Compressed images (.dds) can now also be used for sprite frames and sky cubes.

The on_client event is now also triggered when the client was accepted for the session, and when it was disconnected.

dplay_port sets a port number for the session_connect function.

dplay_id contains the unique identification number of a client in a multiplayer game.

dplay_status can be used to determine the status of a client.

A 25th workshop Creating a Serious Online Game was added to the lite-C Tutorial.

The SPOTLIGHT flag was moved from flags2 to flags in order to be updated over the network (flags2 aren't updated).

dplay_localfunction can now also be used to automatically run actions of created entities on all connected machines.

The sizeof() macro is now C/C++ compatible.

A predefined primitive cube, sphere, and sprite entity can now be created with ent_create.

mouse_pos3d gives the level coordinates of the mouse pointer.

file_ commands now also accept "%SAVE_DIR%" and "%EXE_DIR%" path constants. If no path is given, the file is opened in the work folder. The old behavior (opening the file in the save_dir folder) can be achieved by setting the compatibility variable at 8 or below.

Version 7.66 compatibility notes

New features implemented in V7.66

Decal Shadows now replace the old z buffer shadows when shadow_stencil is set to 0. They are no 'real' shadows, but a diffuse darkness underneath the shadow throwing object, regardless of any light sources. They are faster than stencil shadows, and often look better.

 P  Setting shadow_stencil to 3 or 4 activates accelerated shadows that render about 10x faster than normal stencil shadows.

 LC  The shadow pointer can be used for individual shadow models and decal shadows.

The code\st_stencilblur.fx effect blurs stencil shadows with a Poisson filter.

Video_mode and video_switch now automatically switch to widescreen formats.

View.aspect is now relative to the real monitor format.

video_aspect gives the format of the primary monitor, and can be set to enforce widescreen or 4:3 formats.

 LC  Arbitrary initial window sizes can now be set up through the screen_size vector.

The WiiMote interface was improved and contains now a function for retrieving a pointer position from the infrared camera.

 LC  The ent_getvertex/ent_setvertex functions replace all vertex functions like vec_for_mesh, vec_to_mesh etc. They also support mesh deformation on chunked terrain.

 LC  Ent_nextvertex finds the closest vertex to a certain terrain position, and can be used to deform chunked terrain in real time.

Decals on terrain are now not cut off on chunks anymore. This allows unrestricted decal shadows on terrain.

WED got two new tools for slicing and cutting blocks.

MDL models can now share textures between mesh groups.

New error message: E1516 "Invalid pointer freed".

 LC  The d3d_lines variable can be used for making the effect of normalmapping shaders more visible, for testing purposes. Pressing [F11] twice when default.c is included will set this variable.

Mouse picking now also works in orthogonal views (ISOMETRIC).

 LC  The view_to_light function now copies the light color and other light data into the hit struct.

Users tend to confuse the VISIBLE and INVISIBLE flags, which causes render errors and can not be detected by the compiler. We've now renamed the VISIBLE flag to SHOW.

SED now also scans .h and .fx files with the Find in Files function. When the directory field is empty, the current directory is selected. The [F5] and [Ctrl-F5] keys were swapped because Test Run is used more often than Debug Run.

Send_skill_to and send_skill_id can send an entity parameter to another client.

The options in WED Preferences are now available in a new menu order.

The ent_setmesh function now updates the collision shape from the new mesh.

The ent_status function returns information about the entity mesh, and replaces the ent_vertices, ent_skins, and ent_frames functions.

Version 7.60 compatibility notes

New features implemented in V7.60

The num_sounds variable indicates the number of playing sound channels - also displayed in the Statistics Panel.

The smooth function lets a parameter - such as an angle - softly approach a target value, or smoothes jittery input values.

The WiiMote plugin by Firoball was now officially integrated in the engine. Up to 4 WiiMotes and other Bluetooth input devices are automatically detected at engine start.

D3DXVECTOR3 and D3DXVECTOR4 inline functions were added to include\d3d9.h.

In postprocessing shaders, the vecLightPos... arrays are now automatically set to the 8 closest lights that overlap the frustum of the postprocessing view. If the view has a genius, the vecLightPos... arrays are set to the lights in range of the genius entity instead.

Dynamic lights placed in WED now automatically get the CAST flag, i.e. they can throw shadows.

 LC  Shaders can now use an arbitrary number of textures by accessing BMAP objects.

The angle limit of decals can be set by the decal_clip variable.

The view volume size in ISOMETRIC mode can now be controlled by the view.arc parameter. ISOMETRIC mode can be used for orthogonal projection, or for clipping objects in a rectangular view volume f.i. for PSSM shaders.

The mouse_panel pointer can be used for determining which panel the mouse is over (if any).

The lightmapping algorithms of the map compiler were improved. Lighting 2.0 is now always activated (lighting 1.0 was removed). The Supersampling option resamples the lightmaps for removing 'staircase' artifacts.

Single faces of a block can now be individually selected in WED by clicking on them in the 2D or 3D views.

The ambient_color variable can be used to adjust the brightness of level entities that receive no light from the PRV. It is automatically loaded from lit levels. This prevents levels without ground plane from going fullbright.

"_repeat" effect passes can now use up to 4 repeated textures.

MED got new menu items for swapping and removing the second UV coordinate set. The coordinate sets are now also indicated under Model Properties.

The shader viewer now also displays shaders on map entities (if the shader supports lightmaps).

The mip_levels variable can be set for using more than 4 mipmaps per texture.

If mip_sprites is set above 0, mipmaps are now also created for all models that don't have own mipmaps.

A new material mtl_terraintex was added to the shader library, and can be used for rendering terrain with an arbitrary number of 32-bit masked textures.

 LC  The PASS_SOLID flag enforces entities to be rendered in the solid pass.

An effect pool is now allocated for all effects, supporting shared effect parameters.

If an effect pass name contains the character sequence "_repeat", the pass is repeated for every skin of the model. This special method can be used to render an arbitrary number of skins, for instance for multitexture terrain. The number of the current pass repetition can be evaluated through the iRepeat shader variable.

The run_mode variable can be used to distiguish between development and production mode, and determine the way the engine was started.

Later decals are now placed on top of earlier decals on the same object.

Models with both transparent and intransparent parts can now also be used for view entities.

The concave flag can now also be set for block groups in WED. This flag is required for all blocks that have lost their convexity due to vertex manipulations. Imported blocks have this flag set automatically.

A short guide about how to Apply Shaders to Level Blocks was added to the manual.

 LC  Als long as the PLUGINDIR was not changed, engine plugins are now automatically loaded from both the work folder and the acknex_plugins folder.

 LC  The inchar() function can be used to read a single character from the keyboard.

Truetype texts can be horizontally limited to the size_x area.

str_width returns the width of a string in pixels.

 LC  The WWRAP flag activates word wrap for a truetype text.

 LC  The ARIGHT flag aligns text right.

 P  dplay_encrypt activates encryption and compression of data packets sent over the network.

Version 7.50 compatibility notes

New features implemented in V7.50

 P  The -mon command line option can be used to select a monitor for fullscreen display in a multi monitor system.

MED can now directly import lightmapped models from FBX files. The lightmap is mapped to the second UV coordinate set.

WED FBX level import now creates models with mipmaps.

The texture limit of the map compiler was removed.

Panel events can now also be triggered by right mouse clicks.

Panels can now be horizontally and vertically flipped through negative scale factors.

 C   P  The original content of a panel/text target map is now preserved before rendering into it.

LC str_for_int and str_for_float generate strings with more digits or higher precision.

LC str_to_int and str_to_float allow to read numbers from strings with higher precision.

file_str_readto now accepts NULL for the string pointer for just skipping parts of the file.

Models with wrong texture sizes now issue warning 1309.

Bad entity file names (such as names that contain '/' or '\' characters) are now indicated by warning message W1305 .

Faulty bones animation in FBX files (scale inheritance) is now indicated with an error message during import.

PRAGMA_BIND and PRAGMA_LEVEL now support file names with spaces; still, it is absolutely not recommended to have file names with spaces or foreign characters in your game.

 C   P  The direction of sun or spot lights can now be determined in shaders through the vecLightDir array.

 C   P  The Lambert, Phong, and Blinn bumpmapping shaders now support multiple lights and can also be assigned to level blocks. A general bumpmapping vertex shader that can be combined with various pixel lighting effects was implemented in the default.fx library.

 C   P  The vecLightPos array is now sorted from close to far lights. This also avoids wrong lighting in cases when more than 8 dynamic lights are close to an entity or level block.

 C   P  Predefined shader actions (such as fx_bump) can now be directly assigned to entities; the shader parameters are taken from skill1...skill4 in that case. If the skills are zero, default values are used.

If the name of an EXE file is given in the command line, the engine automatically starts the EXE file if its exists, and compiles it from a C script with the same name otherwise. This can be used to speed up the startup process by skipping the script compiling when the script is not changed. Enter scriptname.exe in the WED or SED command line options window for starting faster. Debugging and crash handling only works in the code, not in an compiled executable.

The text_outline variable can be used to adjust text shadow and outline border transparency.

The on_message pointer can be used for calling the engine message loop from another application. This now allows completely replacing the engine window (hWnd) by another application window.

ent_nextlight finds the closest dynamic lightsources to an entity.

The draw_box3d function can be used for drawing bounding boxes.

The maximum number of physics contacts can now be set through the ph_max_contacts variable.

The diag_status function prints the current status of all running functions into the diag file. This function is triggered by hitting [Alt-F11] when default.c is incuded.

The amount of virtual memory allocated by the engine can be determined through the sys_memory variable.

Crashes in lite-C now always give the name of the crashed function.

Texture coordinates at the c_trace hit position can be retrieved through hit.u1,v1/u2,v2.

Several mode flags were added to limit the entities detected by c_scan.

The UNTOUCHABLE flag now also works for panels.

The exec_wait function waits for the termination of an externally called program.

Version 7.10 compatibility notes

New features implemented in V7.10

 C   P  New Decal Manager. The ent_decal function attaches a decal to any entity, floor or wall. A decal material can now be set through PARTICLE.material. If no material is set, the decal renders with the same material and shader as the object it's attached to.

FBX Level Importer. WED can now import whole levels that are created in MAX or MAYA, and convert them into a WMP level plus MDL entities. For this, use the Import Level from FBX  function. For any object in the Import dialog you can select whether to import it as a mesh, or import it to a MDL7 model in the work folder. Camera positions and lights are also imported from FBX levels. The level importer automatically detects model instances. Import rules can be defined in the .imfl file.

New Vector Functions:
vec_for_ent can be used to convert between world and entity coordinates.
vec_fill sets a vector to a constant.
vec_rotateback performs an inverse rotation.
vec_rotateaxis performs a quaternion rotation of a vector about a rotation axis.
vec_bounce calculates a reflection vector.
vec_cross calculates the cross product.

Second UV Set. MED now supports editing the second UV set on skins, for special purposes such as shadow mapping. The second UV set is also stored in the MDL7 file, imported in the engine and used for the D3DVERTEX u2,v2 coordinates. If a model has a second UV set, it is automatically treated as if its second skin were a lightmap (if it has no shader or FFP effect).

Engine improvements. Due to an internal optimization, A7.10 now consumes about 30% less nexus memory per level than prior versions.

Lite-C Compiler Improvements. The compiler kernel was modified. Scripts containing lots of predefined engine structs and numeric constants now compile up to 10x faster.

Light Mapper Improvements. The WED light mapper was completely rewritten and now generates much faster better looking lights and shadows. Radiosity is now supported.

The Template7 system with the T7 game engine is now included in this version. A brief tutorial can be found on the Wiki.

Through the hit struct, the contact points of c_trace and c_move can now be much more precisely determined and the texture content at the hit position can be evaluated.

 C   P  A7 now supports multiple render targets through bmap_rendertarget.

 C   P  Panels and Texts can now render into target bitmaps.

WED now moves directly into a group scope by selecting an object of the group in the level tree.

The scale restriction through [Ctrl] now also works with the WED Edit Box tool.

The number of currently connected clients can be evaluated through the num_clients variable and is displayed in the [F11] panel.

A rotating triangle sample (triangle.c) was added to the lite-C samples to show how to use DirectX functions for drawing at runtime.

 C   P  A brief description of the predefined shaders and using them was added to the manual.

The time consumed for 2D draw_ functions is now visible in the [F11] panel through the time_draw variable.

The number of mipmaps read from external DDS files is now limited to 4 for avoiding too-extreme mipmapping on DDS textures. The d3d_mipmapping variable can now be used to activate anisotropic mipmap filtering.

Despite all player movement examples in AUM, the c_move function still invites all sorts of beginner's mistakes when writing code for player walking. A simple walking example was thus added to the manual page.

The ent_type function determines the type of the level or entity.

The add_new function initializes the folder and resource path and removes all file buffers.

The random_seed function can be used to start the random sequence with always the same numbers.

The merging operator ## is now supported in macros.

The mouse_pointer variable now supports all available Windows mouse pointers. The mouse cursor is now visible on frame and menu bar of the engine window when a mouse bitmap is active inside the client area.

The impact range of dynamic lights on meshes can now be adjusted with the d3d_lightres variable, preventing cases when lights are not visible on coarse tesselated surfaces.

 C   P  The CHILD flag now prevents the view from culling and sorting entities again, and uses the culling and sorting process from the previous view. This increases the rendering speed on CHILD views.

The acknex.exe created by the Publish process now contains a manifest as required by the Microsoft Games for Windows standard.

The ent_pvs function retrieves all potentially visible entities from the ABT or BSP tree.

 C   P  The OVERRIDE material flag gives the material priority over view materials.

 C   P  The fx_floor_mirror action in mtlFX.c can be assigned to a floor entity in the level, and generates a horizontal mirror effect. The reflection factor can be adjusted through the entities' ambient value.

The 2-sided and 6-sided mapping dialogs in MED are now non-modal.

The proc_kill function can now terminate all instances of a given function pointer.

The on_frame event is executed every frame, and can be used to implement functionality similar to wait() in an external language.

The NOLOD flag allows a view to use the LOD states of a previous view, which is useful for shadow mapping views that render from a light source position.

 C   P  8 general purpose matrices can now be defined for shaders.

The Add Light panel now allows to select the light color through the Windows Color Dialog.

The new Transform Model Global dialog now rotates the model about all axes, instead of exchanging the coordinates. The modifications are visible in real time. This makes model import from editors with a different coordinate system much easier.

Resource files in the work folder are now automatically opened without needing a PRAGMA_RESOURCE statement.

The ANIMATE flag can be used for switching model auto animation on and off.

Through the level_ent pointer the size of the current level can be determined.

 C   P  The depth parameter of a view allows to preset the z buffer to a certain value.

 C   P  New shader variables: fLayer, fAlpha, fPower

Buffers allocated through file_load can be freed through file_load(NULL,buffer,NULL).

The draw_quad function can be used to draw images or colored areas without needing a panel.

 C   P  bmap_zbuffer can be used to render into bitmaps bigger than the screen, and to use render targets even when d3d_antialiasing was enabled.

Attempts to use the video or DirectX device in the first frame before it's initialized are now indicated with an error message "video not yet initialized ".

bmap_to_alpha can now also create a one-bit alpha channel for overlay transparency when the percentage value is set at 0.

PRAGMA_POINTER can be used to switch off the lite-C pointer autodetection, and treat code as in C/C++.

ent_boneparent returns the parent of a bone and can be used to walk the skeleton of an entity and determine its structure.

The bone functions can now also use bone handles instead of bone names. Finding a bone by its handle is faster than using its name, and overcomes problems when two bones have the same name.

fps_max now uses a CPU loop for small idle times, which reduces the 'stuttering motion' problem on levels with high frame rate.

The pVars pointer can be used for getting a handle to any lite-C struct that is not an engine object. This can be useful for identifying structs in a multiplayer enviroment.

 P  Through the ENGINE option in options.scr the name of the executable for WEDS can be given, e.g. ENGINE = "wrun.exe".

Pointers can now also be used as boolean expressions in lite-C.

The PRAGMA_PLUGIN definition replaces the abandoned dll_open function. Calling dll_open will now generate an error message.

The engine window can now display user defined icons in the task bar. If an icon named "32.ico" or "16.ico" is found in the work folder, it is automatically loaded and used for the task bar icon in stead of the default A7 icon.

The LPD3DXEFFECT interface was added to d3d9.h.

When an engine window is not opened (video_screen = 0), all diag() and printf() output is now printed into the text area of the startup window.

 C   P  Shaders can now use different techniques dependent on whether they are rendering model or block meshes. This way the same shader can be used for models and for level blocks.

Expressions containing '&&' or '||' now evaluate to 1 or 0, instead of nonzero or 0. This allows for better compatibility to ANSI C in boolean expressions.

Collisions with a bounding box or ellipsoid are now restricted to planes facing the movement direction. This prevents objects from getting stuck when sliding along complicated geometry, but could have side effects - please check carefully.

The pPaths array can be used by external development tools to read the engine paths.

The engine can be prevented from opening a video device by setting video_screen at 0 before the first wait() or level_load() call. This is useful for programs that don't need an engine window.

 C   P  Material and shaders can now be directly assigned to geometry blocks in WED (without using the d3d_automaterial feature) when the level is compiled in mesh mode.

Version 7.07 compatibility notes

New features implemented in V7.07

The shader viewer was greatly improved. It now supports about 40 different surface and postprocessing shaders that can be used in projects.

 LC  Lite-C now allows PRAGMA_PATH, PRAGMA_LEVEL, PRAGMA_BIND and PRAGMA_RESOURCE statements in a .c file, making an additional WDL file superflous (except for startup window definitions). Paths added by PRAGMA_PATH are also used by the WED Publish function.

WED and MED can now display DDS images in the texture view. An external library (exio.dll) is used for the image conversion.

The projects paths used by the WED publish process are now indicated in the Resource View under 'Path'.

More shader workshops about postprocessing, shadow mapping, and soft shadows, were added to the Shader Tutorial (http://server.conitec.net/down/shader_workshops.zip).

Shaders can now detemine the fog color through vecFogColor.

 LC  If no #include statement is found in the main script, default.c is automatically included.

 LC  Bitmap names or formats can now be directly given for the bmap element in a VIEW definition.

The ENABLE_VIEW event is now used for rendering view material events, instead of ENABLE_RENDER, for better distinction between view and entity materials.

 LC  The predefined light_view determines the view used to clip dynamic lights.

Color depth values 12 and 14 in a BMAP definition now create a floating point bitmap in F16 and F32 format.

proc_kill was improved and can now terminate all instances of the current function that were called by the current entity.

Views can now directly render into cubic environment maps by using a bitmap as a render target that was converted with bmap_to_cubemap before.

 LC  Functions that end with "_event" are now automatically assigned to the corresponding event.

Four more entity skills can be passed to shaders through vecSkill45.

A new WED/MED SDK for A7 was uploaded, with more examples and new features.

The index high byte of STRING objects (HBYTE_STRING in atypes.h) was changed from 10 to 2 for internal technical reasons.

Taco Cohen's Shader Workshop was revamped and adapted to A7.07 / lite-C. It can be downloaded at http://server.conitec.net/down/shader_workshops.zip.

ent_mtlset and ent_setskin can now create new entity skins and skin materials.

 LC  The realloc() function is now supported by lite-C.

The level_load function is now executed directly and undelayed, thus a wait() after level loading is not required anymore.

 LC  The CHILD flag lets a view inherit its parameters from the previous stage.

 LC  The entity viewer script in default.c was modified so that entities are now centered in the view and can be rotated with the cursor keys.

The new -nv command line option prevents the engine from rendering and opening the DirectX device.

The AUTORELOAD material flag can be used for editing shaders and observing the result immediately in the engine window.

The Light Manager now clips active dynamic lights against the view frustum when only one view is active. This can noticeably increase the frame rate on levels with lots of dynamic lights.

 LC  The SHADOW flag restricts a view to shadow throwing objects, for shadow mapping purposes.

 LC  The view_to_light function sets a view to a dynamic light position.

 LC  The ptr_remove function replaces all individual remove functions.

 LC  Lite-C now also supports the conversion between char and short variables by typecasting.

 LC  A new bmap_blitpart function was implemented for blitting from only a part of a source bitmap.

The ACTIVATE_SHOOT flag for c_move prevents collision events and lets c_move behave similar to c_trace.

 LC  The render behavior of a view stage can now be determined with the PROCESS_SCREEN and PROCESS_TARGET flags.

 LC  Views can now be assigned a material that replaces all entity materials and can be used for special effects or postprocessing.

 LC  The render_stencil bitmap pointer allows rendering the stencil buffer content into an offscreen bitmap for further processing, such as blurring stencil shadows.

 LC  Through the view stage parameter a rendering chain of views can be created for complex pre- and postprocessing effects, such as shadow mapping.

 LC  A texture transformation matrix is now used for shifting textures through u,v entity parameters.

Panels now also accept the CENTER_X / CENTER_Y flags for their digits elements.

Version 7.06 compatibility notes

New features implemented in V7.06

 LC  on_scanmessage can be used to set a user defined message handler.

 LC  engine_getvarinfo returns the type and name of a lite-C variable of the current script, and the name and offset if the variable is an element of a struct.

 LC  #include files given in double quotes "..." are now also searched in the code subfolder.

 LC  The engine vertex struct (D3DVERTEX) was moved from the d3d9.h file to atypes.h, for using it in external C++ projects that don't want to include d3d9.h.

 LC  PRAGMA_PATH can be used to define paths for include files.

The IGNORE_WORLD flag in c_move, c_trace, and c_rotate ignores all level blocks and terrains.

ent_clone and ent_cloneskin can be used for individually modifying meshes, skins, and skin materials of an entity.

 LC  The continue statement now also works in for loops.

 LC  PRAGMA_PRINT can be used to display compiler messages.

 LC  If a sound file with the name beep.wav is found in the path, it is used for the beep sound.

A7 now supports the 3Dconnexion SpaceNavigator family of 3D navigation devices. If such a device is detected, the engine gives the startup message "3D navigation device found" and binds it automatically in as a first or second joystick device.

The SED Code Jumper now detects all C standard variable types, functions and #defines. Local variables are not listed anymore in the Code Jumper.

MED can now automatically assign vertices to bones (moved from experimental to production state).

The Frame Manager in MED is now non-modal and allows inserting frames while editing them. Clicking on a field in the scene column selects all frames from the scene. The current frame is indicated in the frame column. Double clicking on a frame lets MED change to that frame.

WED can now edit terrains that are placed in the level. For this, select the terrain to edit, and click [Scope Down]. A terrain editor panel will open that gives access to a magnet tool for shaping hills and valleys (moved from experimental to production state).

The display of LOD levels in the WED 3D view can now be adjusted in Preferences.

Block surface flags can now be set for all faces together in Block Properties.

All manual pages now got a [latest version online] button that loads the latest version of the page from the online manual. Javascript must be enabled for this.

WED can now search standard paths for publishing by using the PATH statement in options.scr, e.g. PATH = "%EXE_DIR%\code".

The mouse pointer is now automatically moved when mouse_mode is set at 4.

 P  The terrain_lod variable controls caching and LOD for chunked terrain.

Two new samples were added to the work folder: pong.c is the classical Pong game and pong_multiplayer.c is its multiplayer version for playing Pong over a network ( P  or  C ).

A new code folder was added to the Gamestudio directory and is automatically searched by the #include directive. The code folder contains common C and shader code, such as mtlFX.c, and the standard .fx shaders.

The _chr function converts STRING* pointers and char arrays to char* pointers (useful for passing text strings to a DLL).

The sun_color vector can now be set to the sun color from the map properties of the level.

New flags IGNORE_FLAG2 and ACTIVATE_PUSH are added to the c_trace and c_move parameters for ignoring certain groups of entities on collision detection.

 LC  The digits element can now also be used for displaying strings.

 LC  engine_getvar is now documented and works also in lite-C.

 LC  A wrong number of parameters to a function now throws an error message.

effect_load(MATERIAL*,""); reloads the current effect and makes it convenient to edit effects at runtime.

The handedness of the binormal is now stored in the 4th tangent coordinate of every vertex. This avoids shader problems with mirrored coordinates.

The new WED option Mesh Size can be used to greatly increase the rendering speed in complex levels.

SED can now open files by clicking on them even if a SED instance already had files open from a different folder.

ent_remove now also removes view and sky entities.

The PATH statement now accepts the keyword %EXE_DIR% for the Gamestudio folder.

The WED Find function can now find objects by their name or file name.

When c_trace() hits a model entity in OBB mode, the tex_color vector is now set to the color of the texture pixel at the hit point. For this the texture must be a TGA image in 24 bit RGB or in 32 bit ARGB format.

 LC  When c_trace() hits a level block or a model entity in OBB mode, the predefined hit.skin1 pointer is set to the hit BMAP (the lightmap or the first entity skin), and hit.u,hit.v are set to the u,v coordinates of the hit point on the texture. This can be used to paint on the texture, add or remove shadows, or punch holes in targets with a gun.

 LC  When a client connects, the on_server event now receives the client number. All send functions also accept the client number to send data to a certain client.

 LC  send_data_to transmits arbitrary data between clients and server in a network environment.

 LC  send_var now also works in lite-C and can be used to update arbitrary variables and structs between client and server.

New features implemented in V7.04 Beta

MED FBX import now also supports bones animation with an arbitrary number of bones per vertex. The FBX format is not downwards compatible to itself, so two FBX importers were now implemented. The normal importer is for FBX files saved with the 2006 FBX version, the 2005 importer is for FBX files saved with the 2005 FBX version. Multiple bones animation can only be imported, but not edited in MED. The number of bones per vertex is visible under Model Properties. The engine can animate with up to 4 bones per vertex. The number of bones per vertex can be restricted by setting the max_bones variable.

MED can now automatically assign vertices to bones. For this, click Apply Vertices with a selected bone, but no selected vertices or groups. MED will automatically find the closest vertices that surround the selected bone and assign them.

Atlas Mapping is now implemented in MED. This is an automatic skin mapping method that eliminates the need to manually create a 2-sided or 6-sided mapping.

MED can now globally scale, mirror, and transform models with all their bones and animations, and allows to separate bones animation matrices into their rotation, translation, and scaling components.

WED now displays the next-higher group in the edit windows when Draw Top Group is activated in WED Preferences.

An Object Oriented Camera Mode was implemented in WED. It can be activated by setting CAMERAMODE2 = ON; in options.scr or by hitting [Shift-C]. In this mode the camera moves and rotates about the object clicked on with the mouse. This is a very comfortable way for quickly moving around in a room or watching an object from all sides.

MED / Edit / Change Terrain Vertices allows to set a new horizontal and vertical vertex number for the terrain, thus increasing or reducing the terrain resolution.

The Publish dialog can now be called through a WED command line option. SED / Publish now opens the Publish dialog and can thus now also create executables and resources.

MED's Apply Vertices Mode was improved so that vertices and mesh groups can now easier be attached to or removed from bones.

WED / MED now refreshes its 2D and 3D Windows by right click and selecting GXL / Refresh. Useful if the DirectX device got lost due to task switching or running another DirectX program in the foreground.

The Single Mesh option causes a WED block group to be rendered as a single mesh. This increases the frame rate in levels that consist of complex block geometry, like cities. Most 3D cards achieve the best performance when rendering meshes of about 1000 polygons.

File names - for instance in external model skins - may now also contain relative or absolute paths. If the file is not found in the given path, it's searched in the current folder or in the folders given by the PATH statement.

pan_setvar and pan_setevent can be used to change functions and variables of panel elements, or to set them in panels created in external languages like C++ or Delphi.

 LC  Crashes in lite-C functions don't lead to an engine crash anymore, but issue an error message (just as in C-Script). The function name is indicated in the message, making it easy to determine the crash reason.

The d3d_antialias variable can be used to activate full scene antialiasing before the video device is opened.

Panels, texts and view entities with a negative layer value are now drawn below VIEW objects, and can be used to draw into the background of a view when the sky is switched off.

The mtl pointer can be now be used for temporarily switching the material depending on the current view when changed in an ENABLE_RENDER material event. The new material overrides any materials or effects from the model. An effect is not necessary anymore for triggering the event.

 LC  The atan2 function is supported for higher precision in trigonometric calculations.

The session_open function can be used to open a session as a server at runtime.

 LC  Pointers can now also be compared with >, <, >=, and <=.

 LC  Functions can now also return short and char variables.

d3d_skydepth can be used to store sky images in compressed format.

The preload_mode variable can be used to prevent the little 'jerk' when an entity becomes visible the first time.

The mtl_remove function can be used to remove temporarily created materials.

 LC  The D3DX 9 functions were now added to the lite-C's function list in the API.DEF file. Thus, lite-C is now able to compile and run all DirectX 9 graphics samples (after some minor adaptions from the C++ syntax to C). As an example, Microsoft's D3D tutorial samples 1-6 were added to the lite-C folder. For easier adding external functions to lite-C, a PRAGMA_API definition can be used.

 LC  TEXT.string was renamed to TEXT.pstring for preventing hard-to-find migration bugs (in lite-C TEXT.pstring is a pointer to STRING* pointers, while in C-Script TEXT.string was a pointer to strings). Char* pointers are now also accepted for TEXT strings.

 LC  printf(...) now accepts char, short, long, int and double parameters, and outputs a message box in Pure Mode. float and var parameters don't work for printf.

 LC  The stdio.h header file was added to lite-C. It contains all file and directory functions from the C libraries io.h, stdio.h, and direct.h.

When using the engine as a model viewer, bones animated models now also play through their aimations.

Entities with OVERLAY flag are now rendered in the solid pass even if they have alpha channel textures.

d3d_alpharef can be used for removing 'black seams' of overlay textures.

ent_setmesh can be used to change the mesh of an entity, f.i. for adding lightmapping data.

 LC  <windows.h> is now not included anymore by default in lite-C Pure Mode, thus saving a couple seconds compile time. When using the Windows API in Pure Mode, include it manually.

 LC  Missing include files in lite-C now issue a warning.

The LOD flags can be used to determine with which LOD step the entity was displayed in the last frame.

In TEXT and DIGITS definitions, fonts can now be directly defined, rather than using predefined fonts.

The record_mode variable can be used to check the status or terminate a record / replay operation.

New features implemented in V7.01

on_level allows to display a progress bar or animation on a panel during level loading.

Panel needle elements can be used to display a watch or needle indicator.

path_spline calculates a spline curve and can be used for smoothly moving actors, vehicles, or cameras along a path. path_length calculates the total length of a path, and updates the individual edge lengths.

shadow_stencil now also supports z-fail shadows when set at 2.

draw_point3d draws a colored dot in the level. draw_line3d draws a colored 3D line in the level.

 LC  BMAP definitions can now be used for defining empty bitmaps of a given size and color depth.

bmap_to_format and bmap_createblack can now also create floating point textures in the following 4 formats: 12 = 16 bit floating point red, 14 = 32 bit floating point red, 12222 = 16 bit floating point ABGR, 14444 = 32 bit floating point ABGR. Floating point textures can be used as render targets for special purposes in shaders. For instance, the 14 format is normally used to render the scene depth into a bitmap in order to create soft-edged shadows. Please note that only newer 3D cards support floating point textures for render targets.

bmap_save stores a bmap in an image file.

font_create creates a bitmap or truetype font. New remove functions: txt_remove and font_remove.

 LC  Using the hWndTarget variable, the engine can render into an area on a different target window.

The MED LoD Manager allows to automatically create LoD stages for models, without the need to use separate LOD models.

If a technique is named "lod0" .. "lod3", it is rendered at the corresponding LOD range, regardless whether a LOD model exists or not. This way different effects can be rendered dependent on the distance of the model. Give the most time-consuming technique the name lod0 and use lod1, lod2, and lod3 for simpler and faster effects.

 LC  sys_trial runs an application in trial mode and detects the expiration of the trial period.

video_gamma can be used for dimming or brightening the screen.

X models can now be loaded by the engine, additionally to MDL models. The size of x models, which normally uses Meters as unit, is converted 1:40, i.e. 1 quant = 2.5 cm.

A6 to A7

Lite-c

The new lite-C programming language by Wang Tian Yi replaced Volker Kleipa's C-Script language. Of course, C-Script is still supported by all Gamestudio editions during the lifetime of the  A7  engine, 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.

Level geometry and lighting

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.

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.

Engine

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.

 

Version 6.60 compatibility notes

Below you'll find a list all differences that could lead to a different behavior of 6.60 compared to 6.40, or require small adaptions. When updating from an older version than 6.40, read the version 6.40 compatilibity notes!

Please note: due to a severe bug with the collision detection (see bugs), version 6.50 was replaced by version 6.60.

Version 6.40 compatibility notes

Version 6.40 is NOT 100% code compatible to its predecessor. Below you'll find a list of all differences that could require manual adaption of a project to 6.40.

A5 to A6 /A7

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.

Speed:

On normal T&L 3D cards, A6 renders models and terrain 30%..60% faster than the A5 engine; the rendering speed for maps, sprites and particles is about the same. On old 3D cards manufactured before 2000, A5 renders maps and sprites around 15% faster, and models and terrain 50% faster than A6, due to its more sophisticated transformation/lighting algorithms. A7 renders everything almost twice as fast as A5.

Z-Buffer:

A6 and A7 use the normal DirectX Z buffer, instead of the nonlinear W buffer algorithm used by A5. Therefore the Z buffer resolution is not as good and can cause sawtooth edge artifacts caused by 'Z beating'. The Z buffer resolution can now be increased by increasing clip_near or decreasing clip_far of the current view.

Lighting:

A7 supports and unlimited number of lights, A6 supports up to 8 point, spot or directional dynamic lights. The DirectX lighting used by A6 does not look as smooth as the A5 lighting, but offers more features and control possibilities. Dynamic lights now affect all polygons of a model separately, not just the model as a whole. The new A6 material parameters give more control over the light reflection properties than the old metal, ambient, or albedo parameters of A5.

Models / Terrain:

Under DirectX, many 3D cards do not allow more than 32768 triangles and more than 65536 vertices per model or terrain mesh. An error message is now issued if a model or terrain exceeds this limit. Model and terrain triangles are now clipped with a different algorithm, which allows the camera to move closer to them than with A5.

Entity parameters:

Red, Green, Blue are now at 128 by default (medium brightness). Ambient affects only level entities. Albedo is not used anymore. Dynamic shadows are not affected by fog. The TRANSLUCENT flag does not reverse the transparency of flares.

Fog:

Fog is now only controlled by view.fog_start (default 100) and view.fog_end (default 1000); the view.fog parameter is not used anymore. Vertex fog is used instead of pixel fog, thus allowing fog ranges also on Radeon cards that don't support pixel fog.

Clipping:

The world is now clipped off along a sharp edge at the clip_range.

Memory:

A6 is more "memory hungry" than A5, and requires around 20% more nexus memory and 25% more video memory. A7 requires the same video memory amount than A6, but less nexus memory.

Sky:

The old A4 sky system won't be supported anymore by A6. Use the A5 sky system.

Particles:

The old A4 particle system (emit instruction) won't be supported anymore by A6. Use the A5 particle system (effect instructions). Particle bitmaps must now be a power of 2 in horizontal and vertical size (you should use power of 2 sizes anyway for any texture).

 

► latest version online