Gamestudio/A7 updates are free for anyone who purchased an A7 edition or upgrade from Conitec. They are available on the forum and on the download page. Updating is easy: you don't need to be an expert and normally don't need to edit any scripts. However you must be 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 Window 2000, XP, or Vista 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. You defined a standard Window struct in your code that is also defined in include\windows.h or include\d3d9.h of the new version. Your template scripts are not updated to the new version. You are using a variable that has
the same name as one of the new variables or functions. 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. Strange things happen
when I run my project.
A. See compatibility notes below.
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).
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.
A7 now supports multiple render targets through bmap_rendertarget.
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.
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.
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.
The OVERRIDE material flag gives the material priority over view materials.
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.
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.
The depth parameter of a view allows to preset the z buffer to a certain value.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Please note: due to a severe bug with the collision detection (see bugs), version 6.50 was replaced by version 6.60.
ent_setmesh can be used to change the mesh of an entity, f.i. for adding lightmapping data.
move_friction now also works for the OBB collision detection.
bmap_to_alpha creates an alpha channel for an intransparent bitmap.
The CD device is now opened at the first cd_play call rather than at engine startup, thus saving 1..2 seconds startup time when a CD is in the player.
For the watched entity now also the nearest collision obstacle is displayed (if any). If an entity is stuck, the reason can be determined this way.
Toggle and Radio buttons can now be put on a panel, and the button_state function can read or change the state of a button.
In Customize panels, horizonal sliders can now be defined with the // cntl: slider comment tag.
Setting a panel size that exceeds the panel bitmap size creates a repeating background pattern on the panel.
Entities with transparent and intransparent skins are now rendered in both passes (transparent and intransparent). This allows to have an entity with transparent parts without sorting errors on its intransparent parts..
The joy_buttons variable can be used to check the states of up to 32 joystick buttons.
The on_exit function is executed just before the engine exits due to a sys_exit call.
The mouse_dir3d vector can be used to trace a ray to or from the mouse position.
The d3d_caps variable contains information about the capabilities of the 3D hardware device.
The last_error variable indicates errors of the last level_load function.
Sounds can be paused and resumed by snd_pause and snd_start.
An unlimited number of resources and resource files is now supported. The engine error messages 1005 and 1006 are not issued anymore.
dll_open can be used to open a DLL from a different path than the acknex_plugins folder. The DLL is automatically closed.
A matTangent matrix in a shader is a hint for the engine to generate tangents on the third texture coordinate set (TEXCOORD2). This has the advantage that a bumpmap effect can be directly assigned to a model skin without the need to assign a special material with the TANGENT flag.
str_cursor can be used to determine the cursor position within an edited string.
num_lights gives the number of currently active dynamic lights, and is indicated in the 'count' column of the Statistics Panel.
file_str_readto can read an arbitrary number of characters from a file into a string.
file_find can be used to find certain strings in a file.
txt_sort sorts strings in a text.
txt_for_dir can produce a directory listing of certain files in a folder.
Model shaders now support several skins per mesh subset, f.i. for normal maps. The skin assignments are detected automatically by the engine. Any additional skins that belong to a subset must immediately follow the skin that is assigned to that subset. For instance, let's assume that an entity has 3 mesh subsets, and the following skin assignments:
Skin1 -> assigned to subset 1
Skin2 -> unassigned (normal map for subset 1)
Skin3 -> subset 2
Skin4 -> unassigned (normal map for subset 2)
Skin5 -> subset 3
Skin6 -> unassigned (normal map for subset 3)
Skin7 -> unassigned
Skin8 -> unassigned
The 3 subsets are rendered in 3 passes, where the assigned skin is always entSkin1 and the normal map is always entSkin2. In render pass 1, Skin1 is used for entSkin1, Skin2 for entSkin2, Skin7 for entSkin3, and Skin8 for entSkin4. In render pass 2, Skin3 is used for entSkin1, Skin4 for entSkin2, Skin7 for entSkin3, and Skin8 for entSkin4. In render pass 3, Skin5 is used for entSkin1, Skin6 for entSkin2, Skin7 for entSkin3, and Skin8 for entSkin4.
P The COMMAND statement can be used to define engine command line options in a starter window definition.
command_str can be used to control the script by command line options.
The C-Script Workshop was updated to version 6.40 and 6.50. Outdated methods and keywords were replaced.
SED Watches are now saved and restored when exiting and re-starting SED. SED should now be able to find the Gamestudio path automatically, so the path field was removed from SED Preferences.
SED Debug mode was improved. Entities and all other script objects can now be added to the Watch list. The SED cursor is now automatically placed at the current source line when single stepping in the engine. The F10 key is now the default key for single stepping both in the engine and in SED. SED does not crash anymore when something unexpected is encountered, f.i. when it is terminated while the engine window is still open.
When started without giving a file name, the engine now changes the current directory to it's own folder. This ensures that published engines will find their files even when run from within a different folder.
When using the engine as model viewer, the model is now set to the me pointer. This way entity properties can be changed, and entity functions can be called at runtime after pressing Tab.
A6.50 renders high-polygon models remarkably faster than its predecessors (worst case level: 6.50 - 82 fps; 6.31 / 6.40 - 38 fps). Of course, in normal levels and with low-polygon models the fps gain will be smaller.
WED can now display models, map and terrain entities with their textures, separately in the 3D and 2D views. For this, select View / Draw Entitites (2D) resp. Draw Entitites (3D) for selecting between textured, solid, and wireframe mode. Only supported by the GXL2DX9 Dlls.
Stencil buffer shadows previously used a clipping algorithm that predicted the shadow size. The shadow was drawn when its predicted 'footprint' on the floor entered the view frustum. This caused shadows to be cast even from far away objects, but led to early shadow disappearance of objects high above the floor or very close to the camera. The prediction algorithm did more harm than good, and was thus removed. Shadows are now drawn when the object is within or close to the view frustum. This avoids the "shadow disappearance" effect, but causes shadows to be not visible when the object is out of the view.
New template: MtlFX.wdl. This is the template for the future standard shader collection. It currently contains 4 shaders:
fx_terraintex3 assigns the well-known multitexture shader to a terrain. This template replaces the MtlTerrainMulti.wdl.
fx_water_mirror assigns a realtime mirror with bump map and water ripple effect to a water terrain.
fx_water_env performs environment mapping with ripple effect for water terrains (water.hmp). If the level map contains a sky cube, it is used for the reflection; otherwise a default sky cube is used. fx_water_env does not perform a realtime reflection; thus it's faster than fx_water_mirror, does not require the Pro Edition, and also works on old 3D cards that don't support clipping planes.
fx_uvspeed shifts a model texture in X and Y direction according to the speeds given in the entity Skill1 and Skill2 parameters.
By pressing F11 twice, the bounding boxes of non-passable entities are displayed with blue wireframes.
diag_frame can be used to log up to 10 variables every frame.
trace_hit is now also supported by c_trace in AABB mode.
New shader variables: vecColor, fAlpha, fAlbedo, fAmbient, fPower, vecSunPos.
The NOSHADER flag suppresses shaders in a view.
The VIEW object now supports a seventh clip plane additionally to the six frustum clip planes. This plane can be used for mirror and water effects. It is activated by setting the view.portalclip flag (moved from experimental to production state).
sys_record / sys_replay records the user input by keyboard, mouse or joystick into a file, for debugging purposes or for recording a demo (moved from experimental to production state).
WED Project Window was restructured a little to make the WED user interface more straightforward.
The Albedo value in WED Entity Properties is now copied into the entity albedo and alpha parameters for controlling a transparent entities' opacity without needing a script.
Material events are now also run by static entities. Previously, an entity required an attached action for running its material event.
bmap_for_entity can now also return the textures from a map entity.
bmap_fill can be used to fill a bmap to a certain color.
window_pos gives the current position of the engine window.
video_window can now hide the engine window.
The DirectX mesh animation bug could be worked around by applying a command sequence that flushed the mesh cache whenever a mesh was changed. This method worked on all of our test machines. Therefore, the u/v or patch workarounds should not be required anymore.
bmap_blit was moved from experimental to production state and modified so that the bitmap can now be scaled.
Shaders can now share common functions and variable declarations through #include statements.
The transformed view positions of lights are now available for shaders. Lights are sorted at the beginning of the light array for activating more lights in 1.1 vertex shader models. The sorting can be prevented by setting compatibility (default = 4) at 3 or below.
Panels can now be rotated by panel.angle about panel.center.
d3d_texdepth can now be used to render PCX and BMP sprites and bmaps in 24 bit color depth, rather than 16 bit.
proc_status can be used to check the status of a function.
The level_free function partially releases the nexus.
pan_setbmap can be used to change the bitmaps of panel elements.
A new SED is contained, with the following improvements:
- Test Run (Ctrl-F5, black triangle button). The Test Run just executes acknex.exe and passes command line parameters, just like the old SED prior to 1.3, without any debugging. Fatal engine crashes won't terminate SED, and the SED cursor won't override the engine cursor.
- Debugging of lite-C variables (pure mode only).
- Fixed issues with loading toolbars, spaces in path to WED/MED, and line numbers that appeared clipped.
- Only save modified files before running the engine.
- Small menu text changes: 'Configuration' is renamed to 'Preferences' and the 'Low Color' Parameter is removed.
- Stored breakpoints (when opening a SED project) are now sent to the engine.
- File->Publish runs WED to publish.
- Manually entered command line parameters are no longer erased.
- Collapsed lines do not get removed when using backspace.
New WED and MED versions with the following improvements:
- Better 'snap' for moving selections in WED.
- MED supports the MouseWheel for Zoom.
- MED allows to temporarily interrupt a mouse edit mode (e.g. Move) by pressing [Alt] for activating the camera move funktion; after releasing [Alt] the original edit mode is retored.
A new manual chapter "The Culling Process" was added, with a brief culling introduction for newbies.
The new GXL2DX9.DLL and GXL2DX9A.DLL render libraries implement DX9 for WED and MED and contain several small improvements over the DX8 libraries, for instance easier clicking on very small vertices. GXL2DX9.DLL uses several DX9 devices for the windoes, GXL2DX9A.DLL used only one device.
A new GXL2Bas32.DLL render library contains a non-DirectX renderer WED and MED. It is fully compatible to the GXL2DX9A.DLL, but does not support textured or solid polygons. The source code for the library is available.
Acknex.dll was updated to the DirectX 9 version of April 2006. The new DirectX functions are contained in a d3dx9_30.dll. This DLL is contained in the Gamestudio folder.
max_nexus gives the allocated size of the nexus in KB.
Updated templates add climbing, swimming, traps, and other features.
bmap_remove removes a created bmap.
layer_sort places a layered element - a panel, text, view, or a view or sky entity - on a different layer.
file_seek returns the position of the file read/write pointer when mode is 4.
c_rotate got an USE_AXISR mode for rotating the angle parameter about the entity axis.
str_remove removes a string created by str_create.
ent_mesh returns the entity mesh for using in higher languages.
path_name can be used to find the path of an entity, image, or sound file opened by a create function.
c_trace got a USE_POLYGON mode for deciding whether to use an oriented box or the mesh of the first frame for the target entities (see also collision).
c_move and c_trace are now able to detect water entities in OBB mode.
The previous exit function was renamed to sys_exit (not game_exit).
The LOD of dynamic shadows can be adjusted by shadow_lod.
Warning 1108 is now only issued when warn_level is at 2 or above.
MED can now save and load keyboard shortcuts (like WED).
The WMP / $$M file format is better documented, and an advanced section was added to the collision documentation.
Terrain is automatically nonchunked if its file name ends with "_n" or if the second-last letter is a '_'. This is useful for water surfaces that must be nonchunked in order to apply water physics.
Terrain resolution can now automatically be changed in MED.
ptr_first returns the first engine object of a certain type.
proc_kill can now be used to prematurely terminate all functions.
The ent_mtlset function can be used to manipulate skin materials and effects in real time.
The strings parameter of a text object is now calculated automatically when omitted.
A variable array can now be used as effect matrix through mat_effect and matEffect.
New functions: str_create, txt_create.
The user_name string can be used by engine extension developers to customize their product to a certain user.
The Local, Cast, and Polygon flags can now also be set in WED Entity Properties.
Entity-Entity Collisions now use an oriented bounding box (OBB) instead of an ellipsoid. This ensures better collision behavior when both entities are moving.
New function: client_drop
Undefined string pointers in texts are now automatically initialized to empty variable strings.
New function: bmap_createblack.
New view flag: NOFLAG1
New entity flag: clipped.
New command line option -nwnd.
bmap_to_format converts a render target bmap to a standard bmap in any color depth.
New render event: render_solid.
WED starter/publish/resource was replaced by a publish panel which allows to select the EXE. User-created EXE files can now use the engine library under an Open Source license to replace acknex.exe. Note that the angular brackets that determined which files are to be distributed are no more.
Objects can now be moved, rotated, and scaled in WED and MED by dragging arrows.
WED 'Add Script' was replaced by a Project Manager that comfortably allows to edit template projects.
New engine variable: patch.
New engine function: file_seek.
add_buffer now requires a size parameter.
Find Object can now also be used to find untextured blocks.
The CULL_CW view flag can be used for changing the global culling.
MED 6.65 can now interpolate bones and vertex animation between frames.
d3d_shadowdepth can be used to compress all shadow maps to 4 bit per pixel.
enable_polycollision can now be used to switch globally between the old (AABB) and new (ellipsoid) collision system. The USE_AABB collision mode is for individual selection the old or new system for collision functions. c_content must now always be called with a second parameter (c_content for the new collision system is not implemented yet). The old collision instructions ent_move, trace, and content are abandoned and will be removed from the documenation.
c_rotate can now rotate about arbitrary axes and can use the AABB collision system.
The FILTER flag was now implemented for texts also.
MED can now convert Bones animation to Vertex animation.
The DirectSound interface was switched back to DirectX 7. Reason: DirectX 8 mono sound buffers tend to crash when playing stereo sounds.
The enable_tree material event can be used to change entity parameters dependent on the current view.
Huge Terrain is now supported by automatically splitting terrain into a stream of separate chunks. The chunk size is controlled by the terrain_chunk variable (default: 32x32). Chunked terrain has to be saved with the new MED in HMP5 format, otherwise the normals will be wrong along the chunk seams.
Entities are now also hidden in the view if the view.genius is assigned to their parent pointer and the camera is inside the genius' bounds. This way, many attachments to the player can be automatically hidden.
c_scan was implemented to replace scan_entity.
The engine standard font can now be given by '*' in Digit elements.
The following A4 keywords are not recognized anymore by the engine: SYNONYM, SWITCH_VIDEO, CREATE, MORPH, ROTATE, REMOVE, PLAY_SOUND, PLAY_LOOP, STOP_SOUND, PLAY_ENTSOUND, TUNE_SOUND, SHOOT, TOUCH, SEND, NOP.
engine_open() / engine_close() can now be called multiple times by external applications.
add_buffer can now remove a named buffer by passing the NULL pointer.
The session_connect function now automatically waits until a connection is established. Therefore, it's now never necessary anymore to wait until connection is established, thus eliminating a frequent source of beginner's errors.
For temporarily playing large sound files when media_play can not be used (for instance because the sound files have to be stored in a resource file), a snd_remove function was implemented.
effect_cpy copies an effect from one material to another.
Models can now be previewed in MED's Engine Preview.
Model Skins can now get separate material colors and effects in order to define the reflection behavior, a shader, or a rendering technique for particular model parts. Skins can have only a color and no texture, thus saving video memory for monochrome models.
A6 Templates: WalkThru Project -
simple project that adds the PlBiped action and a first person camera view.
plBipedWeap00.wdl - added Armor Pickup. Works like Health Pickup,
but increases armor. Added "Pickup Sound" to Health, Armor, Weapon, & Ammo
pickups. You can change the sound and the volume in the Customization panel.
Fixed Health Pack Pickup when Player Health is Maxed. The player no longer
picks up the health or armor packs if they are already maxed out.
AIFPS01.wdl - Fixed Damage with armor. When an entity with armor takes
more damage then the armor has, the remaining damage goes directly to health
(armor no longer goes negative).
cutscene00.wdl - added checks for cutscenes 2-5.
bipedAnim01.wdl Added a new special case for once off animations. Once
off animations can now override all other animations (e.g. they must finish
a complete cycle before returning control to other animations). This is used
for "attack" animations (since the actual attack mode has a much shorter duration
then the animation). Only works for time-based animations.
AIFPS01_Fire - now fires at player not just along the AI's rotation.
This makes the AI more accurate but you need to make sure the AI is facing
the player before calling this function (otherwise it looks funny).
AIFPS01_Hover - a "hovering" AI that behaves similar to the normal
AI but it floats at the height it is created at. When it dies, it spins to
the ground and explodes.
WeapLaunch00_Anim_Explode - uses value in "temp" instead of "you._shell_radius__030" for
the blast radius. So now you can call this function if you want anything
to explode. Added Explosion Sound entry to WeaponFX00 Moved "Launch00_Anim_Explode" to "WeaponFX00_Anim_Explode" Added "Explode" flag
to AIFPS01_Guard and AIFPS01_Hover. If set, entity will explode
on death rather then show death animation.
Models now support multiple textures, which can be assigned to parts of the mesh through the Skin Manager. X models with multiple textures can be imported.
Multithreading was re-implemented in the Map Compiler.
Models and Terrains can now have skin textures in external files.
Mesh skin coordinates can now be directly changed by the vec_for_uv function.
A Drop Down Box was implemented in the Script Customize Panel.
WED Create Script: In addition to A6 Template Project and A5 Template Project you can select Shooter Project as one of your starting scripts. Shooter Project comes with all the scripts commonly used in a First Person Shooter (plBiped01, aiFPS01, camera1stPerson01, etc.). This will save you time since you no longer have to add all the scripts individually.
A6 Templates: Lift01.wdl -
a new skill "Key" has been added in the Activate section of the Lift01_Basic
entity. If a value is entered greater than zero, the trigger with the same
value must be set before this lift can be activated.
aiFPS01.wdl - added Armor "spark" effect. Like the "blood spray" effect
that happens when an AI takes health damage, now when the AI takes armor damage
sparks appear. Added "Gore" section for turning off sparks and blood effects.
A material and two text strings can be assigned to entities under WED Entity Properties.
A movie file name can be passed to the A6 engine at startup, letting the engine act as a movie player.
diag_var() writes a variable into the acklog.txt, controlled by a C-style format string.This instruction can be used for logging fast-changing variables.
panel.flags got a FILTER flag for blurring scaled panels. The background bitmap can now be colored. Panels can now be sized and drawn with a monochrome background rather than an image.
Some adaptions to the upcoming lite-C: Functions are now automatically started when their name ends with ..._startup, exit() was renamed to game_exit(), and flags in object definitions can now be separated by " + " or " | " characters.
master_vol can be used for setting the sound mixer volume
cycle(x,a,b) now also works for x > 2b.
entity.near and d3d_near are re-implemented in A6 for reducing the clipping distance of a model or sprite entity,
d3d_transform is now always activated, even with old 3D cards. The A5 renderer was abandoned.
MED Transform Vertices Tool and Background Image Tool are now documented.
WED now uses the same position and angle system as the engine: entity z positions now correspond to their origin and not to their lowest point, and pan angles are 0 in X direction and increase counterclockwise. Please note: When saving a WMP file in the new format the first time, positions and angles are automatically corrected. Make sure that the WMP sources for all WMB entities exist (the shapes of WMB entities must be visible). Otherwise their z positions are not automatically corrected and must be adjusted manually.
WED Add Texture : DDS images can now also be used for textures in WAD files and folders.
WED Entity Properties: Materials can now be directly assigned to entities:
exec() can now also execute batch files.
d3d_texdepth automatically compresses all 16 bit textures to 4 bit per pixel.
Dynamic light positions and colors can be passed to shaders.
WED Customize Script got flag boxes, text sections, and a spinner control.
panel.digits can now use format strings.
The screenshot function was improved.
MED Group
Mode: Body parts of a model can now be automatically arranged
in groups and individually manipulated:
For MED primitives, the number of faces, size, arrangement of multiple copies and other parameters can now be adjusted in the Primitives Toolbar.
MED Skin Painter now supports and displays true color skins.
MED Subdivide Triangle now uses a different, improved method.
MED Soft Selection / Dynamic Selection Mode: Vertex moving can now be done with a Soft Selection mode. Not only the selected vertex, but also surrounding vertices are moved, depending on their distance to the selected vertex. This way, meshes can be manipulated in a very 'organic' way.
MED Tool Properties Bar : When selecting a tool, the tool properties can be adjusted in the properties bar at the lower edge of the window. For the move tool, the following properties can be adjusted: Snap / Snap distance Soft Selection / Dynamic Selection / Selection Radius Move Distance Cursor Position
MED now also supports DDS skins.
MED Undo : Undo and Redo is now supported for all MED functions.
Bitmaps can now also use DDS, DIB, HDR, JPG, PFM, PNG, and PPM images
ent_createlayer - Remarks: This instruction must be executed before the first level is loaded and before a game score is saved.
Compatibility has now a default value of 3. When set at 2, the '#' character gets a special 'comment' meaning like in the A3 engine.
MED Magnet Tool: MinZ and MaxZ values can now be set in the Magnet Properties panel, thus allowing to create flat areas on the terrain.
MED Scale Tool: Can now be used for changing the size of a terrain.
The A6 engine now consists of 2 modules: acknex.exe and acknex.dll. Both are located in the Gamestudio folder. The bin folder does not exist anymore. The acknex.exe source code can be found in the sdk_engine folder of the beta version.
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.