AGS Support > AGS Engine & Editor Releases

AGS 3.6.0 WIP (Alpha 21) - SDL2-based engine + Unicode support

(1/42) > >>

Crimson Wizard:
AGS 3.6.0 - Alpha - for Public Test

ACHTUNG!
This is a ALPHA version of AGS 3.6.0.
It's not considered stable yet and must go through extensive testing.
Use at your own risk. Please back up any games before opening them in this version of AGS.
New settings in this version may make your project files unusable in previous versions after saving with this version.

Last update: 14th March 2022


Preword

This release presents a SDL2-based engine. For about 2 decades AGS engine was based on Allegro 4 graphic library, which was discontinued somewhere in the early 2010-ies (only received few patches since). There was an intent to move either to Allegro 5 or SDL (1 or 2) since, but for various reasons this task was continiously postponed. Finally we have a good progress there enough to make a build for public test.
(NOTE: Allegro 5 is very different in everything, therefore it was not trivial to just go from Allegro 4 to 5. In fact it appeared to be easier to change from Allegro 4 to SDL2).

NOTE: contains all the changes from AGS 3.5.1 (Patch 9).


Credits

- SDL2 port mostly done by Nick Sonneveld;
- Improved Android port, and Web/Emscripten port made by eri0o;
- me basically gathered Nick Sonneveld's works together, tidied and fixed where necessary.
+ added more stuff (see below) and some new script commands
+ some stuff added by Alan v. Drake.
+ fernewelten (fixes)
+ panreyes (fixes)


Downloads and instructions

* Full AGS 3.6.0 as installer
* Full AGS 3.6.0 as a .zip archive
* Android game player, aka launcher (APK signed with Debug key), suitable for running any compatible AGS game.


Notable changes related to new backend and ports

Full list of changes now available here (will be posted for the final release on forums too):
https://github.com/adventuregamestudio/ags/blob/v.3.6.0.20/Changes.txt

* Freely resizable window (in desktop windowed mode, obviously).
* Software renderer uses SDL2 as a final output, meaning the actual drawing on screen may be done by anything that your system supports from DirectX to OpenGL. This presumably ensures that it works on any version of Windows.
* Fully rewritten audio playback, now uses OpenAL interface and modern SDL-based sound library.
* On Android supports both "software" and "hardware" types of renderers (they are both OpenGL but use different approaches drawing sprites and effects).
* Removed AVI/MPEG video support (may be temporary...). The main reason is that in the old engine they were implemented using Windows-only DirectX interface and Allegro 4 was already providing access to these. SDL2 does not, and it may be an extra hassle to recreate them. So this is under question now.
* For similar reasons removed support for DirectX-related functions in plugin API. I'm afraid this will break some older plugins that require DirectDraw and similar things. Direct3D plugin maybe will continue working as it wants Direct3D renderer, and that is still present.


Other Notable engine/editor changes

Editor now requires .NET Framework 4.6 (was 4.5). NOTE: the compiled games DO NOT require .NET to run.

Full Unicode support. Editor and engine can work in Unicode mode, allowing practically any human language. ASCII/ANSI mode is still supported for backward compatibility. See "Text format" option in General Settings. Additionally, translations (TRS) have individual setting. More information on translations is here: https://www.adventuregamestudio.co.uk/forums/index.php?topic=59240.0

Improved key input handling, with the purpose for easing unicode input support. This is controlled by the "Use old keyboard handling" option in General Settings: setting it to "false" will use new handling mode with extended features. See "Script API" section below for more information.

New rewritten Android game player (aka "launcher"). Suitable for building for Google Play and similar stores, can read game assets from the android-specific packages (apk, aab).

Introducing Web/Emscripten port capable of running games in browsers.

Build Android and Web/Emscripten games from the Editor.

Editor supports multiple compressions for sprites, which may be selected in General Settings. Currently available: RLE (old default) and LZW.
Also, there's an option to optimize sprite storage format to reduce disk space whenever possible. This option is separate from compression but may be used alongside for the further effect. It's enabled by default in this version.

Editor supports packing multiple speech voxes, using files in the "Speech" subfolders (e.g. "Speech\french" subfolder will produce "sp_french.vox").
Engine can switch to a different speech vox by a script command (see below).

Editor supports packing custom files into the game (General Settings -> Compiler -> Package custom data folder(s)). These may be read in script using File.Open with "$DATA$" path token.

Engine supports "borderless full-screen window" mode in addition to the real (exclusive) fullscreen.

Engine supports scripts using functions and variables (imported) from any other scripts, regardless of the script module order in the project. These still have to be declared as "import" above their use though.

There's "GUI controls clip their contents" option in the General Settings (enabled by default). This clips texts to the control's rectangle.

Configuration for TTF fonts that let display both common TTFs and ones made specifically for AGS in the past as they were meant to be.
Fixed display of certain TTF fonts which previously had their heights calculated wrongly. This could lead to texts being cut of at the bottom due to the graphical surface being not large enough.

Custom font outline thickness and style, works for automatic outlines only. In the font properties you may set how thick outline is in pixels, and choose between "Square" and "Round" style.

Removed a limit of Overlays created at the same time (was 30).

Now has 16 max Audio Channels (was 8).

Select script editor's font in the editor's Preferences.

Zoom controls on almost all panels (sprite manager, cursor, inventory item, and so on).

Debug displays, such as showing room mask and character walk paths, are now implemented as non-blocking translucent overlays, allowing you to keep playing the game while they are on. (See "Debug" script command).


New Script API

 - Expanded on_key_press callback, now supports two parameters: key code and key modifier flags: on_key_press(eKeyCode key, int mod); where "mod" argument contains key modifiers (ctrl, alt, shift, etc).
 - In the new key handling mode on_key_press is called for each actual key press; e.g. combinations like Ctrl+Z will result in two on_key_press calls, one with eKeyCtrlLeft and second with eKeyZ.
 - Implemented new on_text_input(int ch) callback which is called when the engine receives a printable character. This callback is essential for handling unicode chars in script.
 - Similarily, expanded dialog_options_key_press with the third mod argument, and implemented dialog_options_text_input callback for receiving unicode chars during the custom dialog options state.
 - Added eKey constants for Shift, Control and Alt keys.
 - Added eKeyMod enum for key modifiers constants.
 - String.AppendChar, ReplaceChar and Chars[] property are now working with the unicode characters.
 - String.Format("%c") specifier will now be able to print unicode characters.
 - Added Game.ChangeSpeechVox() and Game.SpeechVoxFilename, which work in a similar fashion to Game.ChangeTranslation and Game.TranslationFilename respectively.
 - DrawingSurface.DrawImage() and DrawSurface() now accept optional source rect coordinates, so you can draw a chosen part of the sprite directly;

--- Code: Adventure Game Studio ---DrawingSurface.DrawImage(int x, int y, int spriteSlot, optional int transparency, optional int width, optional int height,                optional int cut_x, optional int cut_y, optional int cut_width, optional int cut_height); - Functions for getting drawing surfaces for room areas and regions, letting you paint them at runtime:
   static Hotspot.GetDrawingSurface(), static Region.GetDrawingSurface(), GetDrawingSurfaceForWalkableArea(), GetDrawingSurfaceForWalkbehind();
 - Room.Exists(): tests if the room of certain number is available;
 - Every function accepting file path now supports "$DATA$" location token, which lets you read game resources. This was added mainly for reading custom packed files, but will work with any game resource fwiw. Opening files like this will only work in read mode, writing will fail. Examples:

--- Code: Adventure Game Studio ---File *f = File.Open("$DATA$/MyDir/myfile.txt", eFileRead);
--- Code: Adventure Game Studio ---ListBox.FillDirList("$DATA$/MyDir/*.*"); - WaitMouse(): complements other Wait* functions.
 - SkipWait(): skips current Wait (will normally only work from repeatedly_execute_always callback).
 - All the Wait* functions now accept "0" as "no timeout", in which case waiting may only be interrupted using either corresponding input or SkipWait.
 - All the Wait* functions now return a code telling how they were interrupted:

--- Quote ---* positive value means a key code;
* negative value means a -(mouse code);
* 0 means timeout or interrupt with a script command.
--- End quote ---
- AudioChannel.Pause(), Resume() functions and AudioChannel.IsPaused read-only property.
 - AudioClip.PlayOnChannel() lets you play a clip explicitly on a certain channel, disregarding any audio type rules. Works with channels 1-15 now (channel 0 is kept reserved for a speech voice-over).
 - Characters now may be scaled freely, not limited to 5 - 200% (new range is 1 - 32767 for technical reasons).
 - Added Character.IdleAnimationDelay to let control idle view's animation speed.
 - Hotspot.Name and Object.Name may now be set in script.
 - Object.SetView() now resets loop and frame to 0 by default. Previously default was -1 which made object retain loop & frame, which was often unexpected, and could cause game errors.
 - Object.ManualScaling and Scaling properties, now letting to scale an object by command similar to Character (previously objects were only scaled by the walkable area).
 - Added new delay parameter to Mouse.ChangeModeView() to let control cursor's animation speed.
 - Game.BlockingWaitSkipped: returns the last reason of the last blocking action interruption: this is same as Wait* function return value, but also works for skipped blocking speech, and so on.
 - readonly Overlay.Width and Overlay.Height: let you know the overlay's size;
 - Overlay.Transparency lets you change overlay's translucency without recreating its image.
 - Overlay.ZOrder lets you to define overlay's drawing order on screen. Overlays are now sorted among GUIs.
 - Speech.TextOverlay and Speech.PortraitOverlay: give access to the text and portrait overlays of a current blocking speech. In practice these are only available in repeatedly_execute_always callback. Among other things, these properties allow to detect appearance, removal, and change of the blocking speech; also calling Speech.TextOverlay.Remove() will work as a speech interrupt.
 - System.Log(): prints into the engine log.
 - Debug(2, 0) command that displayed walkable areas is superceded by Debug(2, n), where "n" is a mask type: 0 - none, 1 - hotspots, 2 - walkbehinds, 3 - walkable areas, 4 - regions. This command also works as a toggle switch, calling it with the same mask index will turn it off.
 - Debug(5, n) command that displayed character's walk paths now also works as a toggle switch.


Known problems

...?


Other potential issue

* On Windows we currently build engine dynamically linking to SDL2.dll. This means one have to be put along with the game exe. Because this may be a hassle, I suppose we may later change this to static linking just like Allegro 4 was linked to the engine before.
* On Linux, if you are using our prebuilt binaries you should be fine, if not then you have to install SDL2 runtime libs on your linux system.
* Noticed there may be problems playing MIDI, again need to test more and fix.
* Anything we don't know yet about ....





In regards to building Web version of the game. This only works when you have "Web build component" installed along with the Editor. The new "Web" Build target should become available. If you check it, and rebuild the project, the Editor will deploy necessary files into Compiled/Web folder in your project.

Note that you cannot run index.html directly, it likely won't work. You need to create a web server with these files on it. There is a multitude of ways you can do that. For example I've been testing this using a simple Google Chrome app called Web Server for Chrome. You may find your own way.

For any questions regarding the Web port please refer to and post in dedicated forum thread:
https://www.adventuregamestudio.co.uk/forums/index.php?topic=59164.0

Joseph DiPerla:
Nice. I will give this ago within the next couple of days. Thank you all!

Crimson Wizard:
Updated to Alpha 2, this is just to include latest fixes and changes from AGS 3.5.1, to keep them in sync.

New download links in the first post.

nightmarer:
Hello.

I have received this error while running a room.
https://imgur.com/byuwNv7
x1 x2 x4 x8

Crimson Wizard:

--- Quote from: nightmarer on 11 Apr 2021, 20:49 ---I have received this error while running a room.
https://imgur.com/byuwNv7
x1 x2 x4 x8

--- End quote ---

Does this room open well in the editor? If so, can other engine (like 3.5.1) run same game?

Navigation

[0] Message Index

[#] Next page

Go to full version