AGS 3.4.0 is the next version of Adventure Game Studio Editor and Engine, being in development since mid-2014. Currently it is in relatively stable stage (you actually can make games with it), but its main planned features are not yet fully implemented, therefore we call it Alpha version.

As previously, we try to keep backwards compatibility with previous versions, meaning that:1. You should be able to load your game project made with previous versions of AGS Editor, and continue to work on it, possibly with only minor changes to script (or enabling compatibility mode in General Settings).2. You should be able to run your previously compiled game with new 3.4.0 engine without recompilation.

This thread is meant to serve for preliminary acquaintance with the new version.

The notable features of AGS 3.4.0 are:

* Custom resolutions. Since AGS 3.4.0 you will be able to create games with any size, and run it in any display resolution using existing scaling filters.* Extended build system with support to build game for multiple platforms. AGS 3.4.0 supports extensions that let it compile games for additional platforms (e.g. Linux). They are optional, and require installing extra files to AGS folder, as well as enable them in project's General Settings.* Custom properties are now mutable. Custom properties may now be changed at runtime.* Extended AGS Script. A number of new commands and constructions were added to AGS script language, such as user-defined managed structs, "for" and "switch" blocks. Few existing features were improved, for example now it is possible to define static extender functions and have dynamic arrays in structs.* Extended Dialog Options customization. You may now easily create custom rendered dialog options that animate and react to key presses.

AGS 3.4.0 lets you choose literally any resolution (width and height) for your game. It does not mean, that every variant will work well, but reasonable ones should.There is no restriction to width/height relation, you could even make "portrait orientation" games with height greater than width.

Inside your project, resolution is now set not with drop-down list, but with a slightly more advanced dialog:

Select "Resolution" option and click on "..." button

In the dialog either choose one of the presets, or type in your own width & height, then press OK.

Free display resolutions

To accompany custom game resolutions, AGS engine is now capable to run the game in any display mode supported by your monitor and graphics card.

The WinSetup utility was modified with different graphics options added. At the moment we are in the process of testing this design out. It may be simplified in future updates to make it easier for players to quickly set it up the way they want.

Currently you may choose the fullscreen display mode by setting following parameters:* Mode: this determines the screen size your monitor will set to run the game;* Filter: this determines which algorithm will be used to scale things up or down;* Scaling (multiplier): this determines how much the game will be scaled up or down inside the screen;

For better results I recommend using following combinations:1. If you feel selecting exact resolution more suitable for you, then choose wanted Mode and set scaling multiplier to "Max fit". This will scale the game by the maximal integer multiplier that fits in the Mode.2. If it is rather convenient for you to select scaling (e.g. if you wish exactly x2 or x3 size of the game), then choose wanted scaling multiplier, and set "Bind to game scaling (force desktop ratio)" in the Modes list."Force desktop ratio" means that the game will refer to your desktop aspect ratio to choose gfx mode that looks better on your monitor.

With some of the display modes your game won't take all screen space if scaled up by an integer multiplier. In such case the black borders will appear around the game to fill the extra space. If you do not like to have these borders, you may enable couple of extra options on "Advanced" panel:

* "Stretch to fit screen" will make your game stretch more until it fills whole screen.* "Keep aspect ratio" will ensure that the game's aspect ratio will be kept when stretching, so that image will still look proportional.Latter option may cause some of the black borders to remain.

On thing to remember when using "stretch" options: the random stretching of the low-resolution game may cause image look slightly skewed (the higher resolution is, the less noticeable this effect will be).

On letterboxed games

AGS supports making your game letterboxed (I call it "letterbox-by-design"), implicitly increasing its height and automatically adding black borders to all rooms at runtime. This mode is enabled by setting "(Setup) -> Enable letterbox mode" property in General Settings.This property had always had a limited functionality and worked only for 320x200 and 640x400 games. It was kind of a hack really, therefore we do not extend it on custom resolutions. Currently it remains only for backwards compatibility (and still works only with two mentioned resolutions).

In the future we may add better support for automatic letterboxing (if there would be demand for it); for now I recommend making explicit black borders in your game rooms and modify GUI appropriately instead, if you wish to achieve this effect for other resolutions.

On High and Low resolution type

In older versions of AGS there was a distinction between "High" and "Low" resolutions. 320x200 and 320x240 were considered "low", 640x400, 640x480, 800x600 and 1024x768 were considered "high" ones.Such project items as Sprites, Fonts and Room backgrounds depended on this algorithm to know whether they should be automatically scaled.

For example, Sprites have "Resolution" property which let you set whether they were created for "High" or "Low" one. If the Sprite's resolution type does not match the game's, the sprite will be scaled up or down, respectively.Similarly, there is a global "Text output -> Fonts designed for 640x480" setting in game project. Normally, for the High-res game the fonts will be scaled up. Enabling this option will stop them being stretched.

To support backwards-compatibility, following rule is applied for aforementioned properties:* The resolution which has width equal or lower than 320 AND height equal or lower than 240 is considered to be "low-res".* The resolution which has any of the sides higher; e.g width higher than 320 OR height higher than 240 - is considered to be "hi-res".

As you may realize, this distinction is pretty forced. I should underline, that it exists only to support old behavior for standard resolutions. It is possible that in future we will change how these properties work in the new game projects.

AGS 3.4.0 can build your game for more than one operating system. This is configured with this new option in General Settings (Compiler -> Build target platforms):

Select the systems you like to build the game for by pressing on "drop down" button to the right and checking or unchecking items in the list:

The contents of this list depends on what Editor components are installed. Editor has Windows build component by default, but you may also install Linux component to create Linux versions of your game."DataFile" option cannot be unchecked. It builds main game data file, which is used when making game for other systems.Other available build targets may be selected in any combination.

This selection only affects doing full build (Build -> Build EXE, or Build -> Rebuild all files). When running in test mode only Windows version is built always.

The "Compiled" folder has changed. Now each build target has its own subdirectory: "Windows", "Linux", etc. To distribute your game - pack/copy contents of corresponding folder(s).

Example of "Compiled" folder contents:

Example of "Compiled/Windows" folder contents

Any extra files put into Compiled folder will be copied to every build subfolder, when the game is compiled. This way you may distribute any additional files your game needs.

You may also use the contents of "Compiled" folder itself (without subdirectories) to distribute game data files alone, without game executable. Then you may use stand-alone AGS engine on any system to run this game data.

This is important to mention, that when you run setup program from the Editor (Build -> Run game setup...), you will be modifying Windows config only. Same config will be used when you are test-running your game from the Editor (Build -> Run).For other build configs (Linux, etc) you will have to modify acsetup.cfg file yourself right now (use plain text editor for that).

NOTE: for now you may still use old building system if you go to Editor's Preferences (File -> Preferences) and check "Use legacy compiler" option. As soon as we make sure that the new building system works well, this check will be removed forever though.

Custom properties were convenient way to bind additional descriptions to game objects, such as Characters, Room Objects and Inventory Items, which may then be used in script. Unfortunately, they had two limitations: there could only be 30 of them for the whole project, and they could not be changed at runtime.

AGS 3.4.0 removes both of these restrictions. This lets you to extend named object types with any number of extra attributes.

Changed system limits

Item

Old limit

New limit

Custom properties

30

unlimited

Custom property name lengths

20

unlimited

Custom property value lengths (for strings)

500

unlimited

You may now change property value at runtime from script. The related script functions are added to all classes that already supported GetProperty() and GetTextProperty(), that is - Room, InventoryItem, Hotspot, RoomObject and Character:

Custom Dialog Options rendering system was extended to give game developers more freedom in setting it up. In the original variant the callback behavior was strictly tied to mouse movement and clicks. It now supports wider range of callbacks, covering all kinds of events that may occur when Dialog Option GUI is on screen.

The "dialog_options_get_active" callback is now NOT called, at all. It is supported only for backwards compatibility when running old games.You will need to slightly change the logic of your script. In most cases it will be enough to simply rename "dialog_options_get_active" to "dialog_options_repexec".

2. Custom dialog options are no longer have automated reaction on mouse click and movement. Instead, following functions are added to the DialogOptionsRenderingInfo struct:

Added support for "switch" statement, which may serve as a replacement for multiple "if/else if" coming in sequence.Strings and other variable types are allowed to be checked in switch condition. Standard case statement features like fallthrough and break are also supported.

This works in the same way as the normal extender method syntax (e.g. this Character *) but for static methods. The above code will define a new method in the static Maths called AbsInt. You can then import it in a header:

Code: Adventure Game Studio

importint AbsInt(staticMaths, int value);

And then use it elsewhere in your code just like it were a built-in Maths function:

Code: Adventure Game Studio

int x = Maths.AbsInt(-3);

More assignment operators

The following C-style assignment operators are now supported in addition to += and -=:

Code: Adventure Game Studio

*= // Multiply by and assign

/= // Divide by and assign

&= // Bitwise AND and assign

|= // Bitwise OR and assign

^= // Bitwise XOR and assign

<<= // Bitshift left and assign

>>= // Bitshift right and assign

Improvements to macros

#define command can now refer to other #define'd constants. Like in VC++, #define symbol expansion only needs to make sense at the time of reference. Also like VC++, the order of previously defined constants isn't important.

Important: To prevent circular references, a #define cannot refer to itself or anything previously used to expand the #define symbol.

Code Regions

You can now define an arbitrary region for code folding in your script. Then the AGS editor will allow you to fold and unfold this region as though it were a code block. Regions are purely cosmetic feature and have no effect on compiled code.