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

Started by Crimson Wizard, 25 Mar 2021, 02:28

« previous - next »

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: 6th 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.19/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

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).

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

- 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: ags
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: ags
File *f = File.Open("$DATA$/MyDir/myfile.txt", eFileRead);

Code: ags
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.
- 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.
* Can't yet configure what exactly software renderer uses for final output - it will be decided automatically by SDL2.
* Not really much ways to configure audio output yet (on Windows you likely won't need that though).
* Anything we don't know yet about ....







In regards to building Web version of the game. We do not provide necessary files in installation yet, so you'd have to download them yourself for now. They may be found attached to any release on github starting with v3.6.0.16, the archive is called "emscripten.zip". For instance, the current one is: https://github.com/adventuregamestudio/ags/releases/download/v.3.6.0.17/emscripten.zip

Go to your Editor's program folder, create a new subfolder inside called "Web". Unpack emscripten.zip there (unpack fully, there are several archives inside for technical reasons, we will fix this later).
You should now have 4 files there:
- ags.js
- ags.wasm
- index.html
- my_game_files.js

Now when you have this, run the Editor and open your project. 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!
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

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


Crimson Wizard

Quote from: nightmarer on 11 Apr 2021, 20:49
I have received this error while running a room.
https://imgur.com/byuwNv7
[imgzoom]https://imgur.com/byuwNv7[/imgzoom]

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

nightmarer

Hello, I'm not having this error in the 3.5.1 version.
This error happens while being in that room during a half minute. It is truth that this room has a lot of things going on, animations and other events, but it works fine in the 3.5.1.

Crimson Wizard

Updated to Alpha 3, this is just to include latest fixes and changes from AGS 3.5.1. New download links in the first post.


Quote from: nightmarer on 11 Apr 2021, 22:16
Hello, I'm not having this error in the 3.5.1 version.
This error happens while being in that room during a half minute. It is truth that this room has a lot of things going on, animations and other events, but it works fine in the 3.5.1.

Sorry, I did not have a chance to reply. I don't think I will be able to do much without game itself. Can I get a copy to test?

nightmarer

Hello.

The thing is that it happens randomly. Yesterday I got the same error in another part of the game.
But I tried to replicate and it doesn't happen.
https://imgur.com/a/oyD4syF

Crimson Wizard

Quote from: nightmarer on 20 Apr 2021, 08:40
The thing is that it happens randomly. Yesterday I got the same error in another part of the game.
But I tried to replicate and it doesn't happen.
https://imgur.com/a/oyD4syF

I won't be able to solve anything having only this error message, because there may be various reasons why program runs out of memory.
I would like to test and compare the game in 3.5.1 and 3.6.0 to observe how much memory they use, and and maybe find out what causes this difference.

Potajito

Hi!
So far, so good, but the game crashes when I alt-tab when running in Full Screen mode. (Compiled exe). No problems so far Windowed.
This is the error:
https://imgur.com/zOZodXH
Let me know if you think this is worth investigating/need any more info.
Thanks for everything!

Crimson Wizard

#10
Heads up regarding the memory issue: there's definitely a memory leak in this version, and it seems to be related to audio (found out by disabling certain functions in the engine code).

EDIT: well, apparently the loaded audio never gets deleted from memory in the new code.

The easiest way to observe this is:
Code: ags

function room_RepExec()
{
atest.Play();
}


game crashes in several seconds.

or more manual:
Code: ags

function on_key_press(eKeyCode key)
{
atest.Play();
}

Crimson Wizard

Updated to Alpha 4
(use download links in the first post)

Updated to include all changes from v.3.5.1.5.

Fixed major memory leak in the audio subsystem.

eri0o

@Potajito, do you still have the crash when alt+tabbing?

Potajito

Quote from: eri0o on 12 May 2021, 15:48
@Potajito, do you still have the crash when alt+tabbing?
Yes as of 3.6.0.3! That is, using Direct9. Open GL is all fine (was also with previous alpha). Are we not supposed to used Directx?
Thanks!

Crimson Wizard

#14
Potajito, we found out that this is because AGS 3.6.0 does not properly support suspending the game when it's alt+tabbed, so it always keeps running and redrawing in background. And Direct3D seem to not like that in fullscreen: similar error happens if you run any previous version in fullscreen and have "SetMultitaskingMode(1)" in script.

So, the fix is then first to restore proper handling of disabled multitasking (which is the default) and then figure out conditions under which game should not be redrawn even if multitasking is on.

Potajito

Quote from: Crimson Wizard on 23 May 2021, 04:20
Potajito, we found out that this is because AGS 3.6.0 does not properly support suspending the game when it's alt+tabbed, so it always keeps running and redrawing in background. And Direct3D seem to not like that in fullscreen: similar error happens if you run any previous version in fullscreen and have "SetMultitaskingMode(1)" in script.

So, the fix is then first to restore proper handling of disabled multitasking (which is the default) and then figure out conditions under which game should not be redrawn even if multitasking is on.
Nice! Thanks for looking into it. I'm more than happy using just OpenGl, but you never know what people would prefer.

Another one on the latest Alpha 4:


When creating a new project, either new or from a template.

Crimson Wizard

Where do you create your game, is the location writeable and you have permissions there? Were you able to create a game in the same place with the previous versions (3.5.0, 3.5.1)?

Potajito

Quote from: Crimson Wizard on 24 May 2021, 10:39
Where do you create your game, is the location writeable and you have permissions there? Were you able to create a game in the same place with the previous versions (3.5.0, 3.5.1)?
Yep, it is writable! in fact what I did was create a project in 3.5 (same folder, same name) and then just open it with 3.6.

Crimson Wizard

#18
Yes, there's something wrong with it, I'll investigate.


EDIT:
Sorry for this, there was a stupid mistake made in template extraction.

The fixed version will be available here, under "Artifacts", as soon as build server finishes working:
https://cirrus-ci.com/task/6038530150367232

Crimson Wizard

Seeing as some people already use this engine when building their games, I'd like to ask for an opinion of Windows users about SDL2.dll.

All the previous versions depended on "Allegro 4" library, but that library was merged with the engine exe, so you only had that game.exe or acwin.exe to handle and copy around.

This new version currently links SDL2 library dynamically, so you have to additionally have SDL2.dll.

Is this a big deal for people? I think we may reconfigure the engine to use "static linking" with SDL2. This is bit less flexible (e.g. one won't be able to swap it by hand if it needs an update), but I don't remember if there are other disadvantages.

Gilbert

I'm not familiar with these kind of stuff, but my question is, does it matter which version of the dll the user have?
That is, is the AGS engine guaranteed to work with whatever version (or, at least the newest version one can retrieve from the net) of sdl2.dll one has on their hands?
So, if sdl2.dll is not of the same version used when the AGS engine is compiled the games still work?
If the engine works only with specific version of the dll I think it's better to link it statically to the executable. (Or, at least advise people to include the file when they distribute their games).

I have been using some very old programming package and the resultant executables rely on openal32.dll to run. However, they only work with the dll precompiled included with the engine, not every other version you can find on the net.

Crimson Wizard

#21
Quote from: Gilbert on 04 Jul 2021, 03:56
I'm not familiar with these kind of stuff, but my question is, does it matter which version of the dll the user have?

Yes of course. The DLL's interface should be matching: function prototypes, but also function adresses in memory I think. So it mostly depends on how the library developers keep backwards compatibility (if they do). It may stay compatible in a small range of updates, or larger range, but I don't know about this particular lib.


Maybe I should not have mentioned this point at all, as being able to swap the DLL is not important. Having DLL may simply mean less maintenance for engine devs.

Quote from: Gilbert on 04 Jul 2021, 03:56Or, at least advise people to include the file when they distribute their games

If we have it as DLL we will definitely include it with Editor's distribution, there's no question about that.

Crimson Wizard

Updated to Alpha 5
(use download links in the first post)

Updated to include all changes from v.3.5.1.8.

Updates sound library, this fixes few sound formats not playing in the new engine.



SUPER EXPERIMENTAL, but AGS now supports Unicode translations, if your TRS files are saved as UTF-8 and certain hint is added to the files, engine should correctly interpret the text as unicode, and display unicode texts with appropriate fonts.

Unfortunately texts in the game properties and script cannot contain unicode yet. Hence we call it "partial unicode support".

More explanation on how to use Unicode translations in your game may be found here: https://www.adventuregamestudio.co.uk/forums/index.php?topic=59240.0

In short, you should have following line among the other options in TRS file:
Code: ags

// Text encoding hint
//#Encoding=UTF-8


The translation compiler will add it to TRA data, to let engine know to interpret these translations as unicode.
If there's no such line, or value it empty, - it will be interpreted as ASCII.

And TRS should of course be saved as UTF-8 (plain UTF-8, without BOM!).

Joseph DiPerla

Neat. I am sure there are quite a few who need this feature.
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

Gilbert

Quote from: Crimson Wizard on 04 Jul 2021, 04:16
If we have it as DLL we will definitely include it with Editor's distribution, there's no question about that.
Should be okay, but it's still safer to put a note somewhere to remind people to distribute their games with the dll file. Say, if for some stupid reasons (such as errr... saving space?) someone doesn't ZIP the entire Compiled folder of their game for distribution, but decides to remove a few files from it they may receive confusing reports from players, that some could run the game (as long as a compatible dll file is in the path) and some couldn't (can be either missing the file from the path or they have a version sdl2.dll file in the path that is not compatible with that particular AGS engine; an even nastier problem is a player might be able to run the game at one point, but after some updates of their system that somehow updated also the sdl2.dll in the path would suddenly make the game unstartable).

Another problem is when someone wants to run a game in a different version (e.g. drops the engine of say V3.8 onto the folder of a game created with V3.6) and if these two engine versions somehow use different version of the dll this may not work, until they also drops a suitable version of the dll file onto the folder. Swapping engine is considered a more advanced action though, so I think it's less of a problem here.

We're glad that currently the AGS engine only relies on one single external library to work, so either way it's not a very big problem ATM.

eri0o

We could have a directory inside the Editor install directory named platforms (or runtime) and then inside this directory have one for each OS: Windows, Linux, ... And then inside these, one for each Architecture.

Then when picking up the engine, the Editor would just grab everything in the directory specified. So in this way, if the engine was built with static library (which I prefer and think is the best approach) or dynamic library, it will work with both. Of course we still need to figure out default, but at least it could pickup both from it's specific engine directory.

Andrea1992

Hey guys. I opened my game with AGS 3.6.0 alpha 4 and everything has played amazingly. We made the game with AGS 3.5.0.24. I also tried the android launcher.

Quote from: Crimson Wizard on 04 Jul 2021, 02:51
This new version currently links SDL2 library dynamically, so you have to additionally have SDL2.dll.

Is this a big deal for people?

I do not think it's a big deal, it's great. The improvements ARE  a big deal. Many many thanks for the hard work.

The performance, animations, interactions, the whole game feels smoother and quicker than previous versions. I love that I can change the audio output device and the game reacts to that!

I'm not getting Potajito nor nightmarer issues. It's all good.

Some small things I noticed and questions:

*maybe i'm doing something wrong or missed something, but I cannot reproduce any video.
  I was using .ogv without problems in the 3.5 version. Now it says "Unable to load theora video 'videoname.ogv' ".
  I tried mp4 but it's not supported as you stated.
  Any recommendation? Thanks

*In full screen, it behaves similar to windows mode, I can move the cursor outside of the game (I have two monitors) and if I click outside, the game minimizes. This happens even if I "auto lock to window" in the mouse options in winsetup.
Something similar happens in AGS 3.5 with openGL only. When the cursor clicks very near the edge, it bounces down to the bottom of the screen and minimizes the game. Is it possible to fix this in AGS 3.5?

*Not important, just to mention, but in debug mode ctrl+X for changing rooms, I cannot write the room number as I used to in previous versions. I use a lot this function because it's faster to write the number than clicking the arrow (i have more than 100 rooms)

*And finally, I don't have much to compare to the android version  since it's the first time I use the launcher. Here I just have two questions.
The process to create a standalone apk is the same as previous versions? I have read about it but never tried. If the process is indeed the same, what libraries should I use?
And second, how can I get the keyboard to appear in the screen using the 3.6 launcher? anyway, sorry if this is answered in some other forums but couldn't find any.
In general, I love it! the game plays nicely on the phone. There are some rooms with big backgrounds, alpha channel or parallax that do not plays well, but It's an easy fix I guess.

We're releasing our game in STEAM in the couple of weeks, therefore we're using the AGS 3.5 version, we don't have the time to do a thorough test. But looking forward to do it and update it in the future.

Thanks again for doing this.
Have a great day.


Manu

I compiled 3.6.0.4 on my Mac from source code (followed the guide I posted some days ago in the Mac thread). My game works perfectly. The only problem that I found is that in windowed mode, there's no way to open the game with the window enlarged. The game always opens in a small window 320x200 in the center of the screen. I can drag the window corner and resize works perfectly, respecting the ratio, but the game always starts small. This is the config.

Code: ags

[graphics]
driver=software
windowed=1
screen_def=max
game_scale_fs=proportional
game_scale_win=max_round
filter=stdscale
vsync=0
render_at_screenres=1
match_device_ratio=1


I tried also with "game_scale_win=3", it doesn't change.


Another thing: how to distribute the game for mac? My game works probably because I have SDL2 installed on my MacBook, but if I want to send the game to someone else how can I embed the library?

eri0o

QuoteI compiled 3.6.0.4 on my Mac from source

How do you do it? CMake is wired to do full static library compilation. It doesn't depend on anything, you can check with ldd on command line.

Manu

Quote from: eri0o on 06 Jul 2021, 11:15
How do you do it? CMake is wired to do full static library compilation. It doesn't depend on anything, you can check with ldd on command line.

I don't understand your question. I just downloaded ags-v.3.6.0.4.zip, extracted it, copied the resources of the game, compiled it with "Cmake" and "make" (like I did with 3.5.1.8). Everything worked smoothly. It wasn't supposed to work?

eri0o

QuoteMy game works probably because I have SDL2 installed on my MacBook

Perhaps I am not understanding what you said. What do you mean by the above?

To clarify, all cmake builds are self contained in any OS, it's scripted to download all dependencies, build them on your machine, and static link to all of them. The result is a self contained binary that should work pretty much anywhere that's the same OS and architecture.

So if you are referring to a binary you built on MacOS, SDL2 is already inside the binary. It should work as long the standard C libraries are compatible across machines.

About distribution, you need to notarize and sign your application, here's a guide:
http://www.edenwaith.com/blog/index.php?p=112

Manu

Quote from: eri0o on 06 Jul 2021, 13:21
So if you are referring to a binary you built on MacOS, SDL2 is already inside the binary. It should work as long the standard C libraries are compatible across machines.

Ah ok, I get it now. I thought the SDL2 was not in the binary, because I read for the windows version the DLL should be zipped together with the exe. Or am I wrong?

eri0o

QuoteAh ok, I get it now. I thought the SDL2 was not in the binary, because I read for the windows version the DLL should be zipped together with the exe. Or am I wrong?

Windows version provided by the Editor is built with a different build system (using VS Solutions). And there hasn't been a decision yet to build it statically or to keep it dynamically yet, this is why it's not shipped together yet.

If you use CMake on Windows, a static-linked version of ags executable will be built.

For Windows and Linux, for distributable binaries, I recommend using the Docker Images generated by the CI or building the same images from the Dockerfiles as a standardized build environment - it's not needed, on Windows it should be fine, but on Linux you may have glibc incompatibilities when running your binary elsewhere.

Crimson Wizard

Quote from: Manu on 06 Jul 2021, 09:40
I compiled 3.6.0.4 on my Mac from source code (followed the guide I posted some days ago in the Mac thread). My game works perfectly. The only problem that I found is that in windowed mode, there's no way to open the game with the window enlarged. The game always opens in a small window 320x200 in the center of the screen.

I finally realized why that may be, will link a test build soon.

EDIT: https://cirrus-ci.com/build/5531686894043136

Crimson Wizard

Updated to Alpha 6
(use download links in the first post)

Backported a number of simplier Script API entries from the experimental ags4 branch; because many of them are ready for a while, and they are simple enough to not require big changes to the engine:

- DrawingSurface.DrawImage() and DrawSurface() now accept optional source rect coordinates, so you can draw a chosen part of the sprite directly;
Code: ags
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);

- Room.Exists(): tests if the room of certain number is available;
- 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.
- 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).
- 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.
- 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.


Oh, and Characters now may be scaled freely, not limited to 5 - 200% (new range is 1 - 32767 for technical reasons).

Manu

Great job! Thanks for adding System.Log(), super useful addition.

Laura Hunt

Quote from: Crimson Wizard on 15 Jul 2021, 01:02
- 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 SkipWait.

Is -1 still a valid parameter for Wait* functions?

Crimson Wizard

Quote from: Laura Hunt on 15 Jul 2021, 10:13
Is -1 still a valid parameter for Wait* functions?

What is -1  :-\? I tried in AGS 3.5.1 and passing anything negative results in error.

Laura Hunt

Quote from: Crimson Wizard on 15 Jul 2021, 10:24
Quote from: Laura Hunt on 15 Jul 2021, 10:13
Is -1 still a valid parameter for Wait* functions?

What is -1  :-\? I tried in AGS 3.5.1 and passing anything negative results in error.

I seem to recall it was mentioned on Discord? I'll try to find the conversation, maybe I'm getting things mixed up...

Laura Hunt

Found the conversation and you're right; somebody mentioned that WaitMouseKey(-1) was an alternative in 3.5.1 to while(WaitMouseKey(1) == 0) {}, but indeed, it didn't compile. For some reason, the idea that -1 was valid had gotten stuck in my head.

Crimson Wizard

I'm sorry, but I'll have to fix and reupload the latest version, because the speech is broken completely, I forgot to test it.

Crimson Wizard

Ok, I fixed the broken speech bug, and reuploaded Alpha 6 version, please download again.

Crimson Wizard

In regards to the recent additions, Speech.TextOverlay and Speech.PortraitOverlay are exposing internal overlays created by the engine for the standard blocking speech.
They may come useful if you don't want to bother writing full custom speech, but at the same time would like to do some adjustments to built-in one.

Couple of examples of what you may do with them in script:


Detecting when the blocking speech has begun, changed to the next line or is over:
Code: ags

Overlay* lastSpeech;

function late_repeatedly_execute_always() {
    Overlay* curSpeech = Speech.TextOverlay;
    if (lastSpeech == null && curSpeech != null) {
         // speech has started
    } else if (lastSpeech != null && curSpeech == null) {
         // speech is over
    } else if (lastSpeech != null && curSpeech != lastSpeech) {
         // speech changed to the next line
    }
    lastSpeech = curSpeech;
}



Waving a speech portrait up and down
Code: ags

#define PORTRAIT_YMIN 5
#define PORTRAIT_YMAX 30
int plast = -1;
int pmove = 1;
function repeatedly_execute_always() {
if (Speech.PortraitOverlay != null) {
if (plast >= 0) Speech.PortraitOverlay.Y = plast;
Speech.PortraitOverlay.Y += pmove;
if (Speech.PortraitOverlay.Y < PORTRAIT_YMIN) pmove = 1;
if (Speech.PortraitOverlay.Y > PORTRAIT_YMAX) pmove = -1;
plast = Speech.PortraitOverlay.Y;
}
}


Manu

I receive this exception when I try to save the game with 3.6.0.5 editor.

https://ibb.co/CtCM3yb

Let me know if I can do something to solve it.


Crimson Wizard

Quote from: Manu on 16 Jul 2021, 17:20
I receive this exception when I try to save the game with 3.6.0.5 editor.

https://ibb.co/CtCM3yb


Apparently this error has been there since previous alpha, but was not noticed for some reason.
There will be a fixed build here after a short while: https://cirrus-ci.com/task/6002945838809088

Crimson Wizard

Updated to Alpha 7
(use download links in the first post)

Had to do another update soon, because number of serious bugs were found and fixed recently.

* Editor not saving sprite file correctly after new sprites were added;
* Some OGV videos not loading;
* AudioChannel.PositionMs only returning values with second-precision;
* Papagayo lip sync not working well (related to the above);
* few less important ones.


Also we now distribute SDL2.dll within the Editor's installer/zip file, for convenience (at least until we change to static SDL2 linking).


arj0n

Quote from: Mehrdad on 19 Jul 2021, 06:07
Sorry, The links doesn't work for me.
There's a "v." in the folder name which shouldn't be there.
Go here and scroll down a bit for the DL's: https://github.com/adventuregamestudio/ags/releases/tag/3.6.0.6

Crimson Wizard

Fixed links.

I created downloads with the wrong folder, but since it's an alpha version I'd leave it as it is perhaps.

Crimson Wizard

I have a small idea, but I'd like to hear some opinions, in case someone can see problems with this.

There has been an ongoing struggle with audio system in AGS, when people try to make channels work like they want but AGS has its own mind and results are often unexpected.

Not planning any system rewrite in this version, but I thought that it may be possible to ease this situation by giving a more "low-level" function for those who might want to write their own channel logic in scripts. The idea is to introduce a new function e.g. AudioClip.PlayOnChannel(int chan, optional AudioPriority, optional RepeatStyle). This function would put the clip on the exactly given channel, ignoring any rules, such as audio type reservation, priority, and so on. In other words, so long as the sound is successfully loaded, it will be put on exactly that channel no matter what.

Dualnames

Does AGS struggle with audio being cut now, with SDL being implemented?
No more military army stuff. I'm alive and back.

Crimson Wizard

Quote from: Dualnames on 02 Aug 2021, 08:06
Does AGS struggle with audio being cut now, with SDL being implemented?

Do you have a sound clip or a game for a test?

Potajito

Quote from: Dualnames on 02 Aug 2021, 08:06
Does AGS struggle with audio being cut now, with SDL being implemented?
I used to get that a lot in previous AGS versions, but with SDL so far I haven't had that issue.

Crimson Wizard

Updated to Alpha 8
(use download links in the first post)


More fixes
* SDL2 Software renderer now draws 8-bit games correctly again;
* Fixed AudioClip.Play() wrongly returning success even when the audio system failed to load the sound.


Sprite manager update
* There's now a Zoom slider, and zoom may be changed with a Ctrl+mousewheel.
* Can drag & drop image files from the file explorer to import them into the game.


Support packing custom files in game, and reading game resources in script

Editor now can pack custom files into the game. The option is General Settings -> Compiler -> Package custom data folder(s). This setting accepts a comma-separated list of folders. These folders must be located inside the game project. All of their contents will be packed into the game, including ones in subfolders and their subfolders recursively.

These files may be opened for reading in script using File.Open with "$DATA$" path token.

All the script functions that accept filepaths now support "$DATA$" token. This makes them work with the game resources. Game resources may be only opened for reading.
For example:
Code: ags

// open custom packed file
File *f = File.Open("$DATA$/MyDir/myfile.txt", eFileRead);
// create a dynamic sprite out of a custom packed image file
DynamicSprite *spr = DynamicSprite.CreateFromFile("$DATA$/MyDir/mypic.bmp");
// List all existing resources
ListBox.FillDirList("$DATA$/MyDir/*.*");


You may even use this with regular game files, even though that may be not commonly meaningful (if only for some hacks):
Code: ags

// List all existing rooms
ListBox.FillDirList("$DATA$/*.crm");



Room masks may be retrieved as 8-bit DrawingSurfaces and modified in script

Code: ags

static DrawingSurface* Hotspot.GetDrawingSurface();
static DrawingSurface* Region.GetDrawingSurface();
DrawingSurface* GetDrawingSurfaceForWalkableArea();
DrawingSurface* GetDrawingSurfaceForWalkbehind();


Because these are 8-bit images, and each area index corresponds to one of the colors from 0-255 range, painting certain area is as trivial as
Code: ags

ds.DrawingColor = 4; // will draw area number 4.


You may do almost everything with them, but "DrawImage" will only work correctly if you draw a 8-bit image, otherwise colours will get all messed up (also I think this may cause crashes).


AudioClip.PlayOnChannel()

This is a workaround for AGS audio system limitations.

This function lets you play a clip explicitly on a certain channel, disregarding any audio type rules. So you may script your own channel logic.
Works with channels 1-7 now (channel 0 is kept reserved for a speech voice-over).


Misc stuff

Added readonly Overlay.Width and Height properties to let know the size of the overlay.

Crimson Wizard

Updated to Alpha 9
(use download links in the first post)

Has all fixes from AGS 3.5.1 - Patch 3.

Also...

Fonts

Fixed display of certain TTF fonts which previously had their heights calculated wrongly. This could lead to incorrect vertical alignment, as well as texts being cut of at the bottom due to the graphical surface being not large enough.

Added support for custom automatic outline thickness and style, originally created by fernwelten. You may now choose outline thickness in font properties, and choose between Square or Round automatic outlines.

Overlays

There's no more limit to how many overlays you may create and have simultaneously.

Overlays now have ZOrder property and are sorted among the GUI. By default, for backward compatibility, speech overlays have very high ZOrder, which places them on top, and custom overlays have a very low negative zorder, which places them below GUI. But you may change that using that property.

Added Overlay.Transparency, which lets you change overlay's translucency without recreating its image.

Android

eri0o had adjusted a game project template for building for Google Play and similar stores. Engine now supports reading game assets from the Android-specific packages (apk, aab).
For more information please visit this post: https://www.adventuregamestudio.co.uk/forums/index.php?topic=55681.msg636638927#msg636638927
We'll be writing a better documentation after a while.


I think we may be done adding new features to this version; there's already more than anticipated. Now it's time to test, fix and polish what we have.

Crimson Wizard

A small update, I found an annoying bug in the latest alpha release, and reuploaded a fixed version.

The problem was related to Editor failing on some paths with non-latin characters; please keep an eye on such situations.

ThreeOhFour

I just wanted to stop by and sing my praise for the way AGS handles regions/characters/hotspots in rooms now. I was quite content with how it used to do it, but the new way is better and more flexible. Thank you for the ongoing hard work!

Crimson Wizard

I've been up to fixing number of things in this Alpha, but got distracted lately, so meanwhile here's a small update with just some additions, some to "fill" couple logical "gaps" in scripting, others to enhance existing functionality.

Updated to Alpha 10
(use download links in the first post)

Audio related

* Rised number of audio channels to 16 (was 8).
* added AudioChannel.Pause() and Resume() functions, and AudioChannel.IsPaused read-only property.

Editor

* Alan v.Drake added line numbers in the Dialog script editor; and also line and cursor position in script are now printed on the status bar.

Character's idle views

* exposed IdleDelay property for Characters in the editor (was only possible to set through script function SetIdleView).
* fixed idle view timing, now it is now correctly based on the game speed rather than the hardcoded 40 fps.

Engine's options

* --localuserconf parameter is superceded with --user-conf-dir, and similarily there's "user_conf_dir" config option that directly tells the location of user config file.
* path related config options, such as "shared_data_dir", "user_data_dir" and "user_conf_dir" now support $GAMENAME$ token in path which is resolved to the game's title. The potential use case is to let user set up an absolute path leading to a location they want to store saves and other files in. In such case they might also need to have subdirs per each game there.
E.g. you may put "user_data_dir=C:/All My AGS Saves/$GAMENAME$" to every game config (or into the global AGS config).

Laura Hunt

Quote from: Crimson Wizard on 13 Sep 2021, 19:07
Audio related

* Rised number of audio channels to 16 (was 8).
* added AudioChannel.Pause() and Resume() functions, and AudioChannel.IsPaused read-only property.



Grundislav

An audio bug: when the game initially loads, the music volume is loud, but when a game is restored, the music volume drops by about 10%.

https://cdn.discordapp.com/attachments/221048075207180288/896953768694910987/volumechange.mp4

Laura Hunt

I'm not sure this is the best place to leave a suggestion, but right now, the only way to change the delay of a view frame is manually in the View editor, and it can get quite cumbersome if for whatever reason you need to change the values for a lot of frames. How feasible would it be to expose the view frame delay property to the script?

Crimson Wizard

Quote from: Laura Hunt on 14 Oct 2021, 18:54
I'm not sure this is the best place to leave a suggestion, but right now, the only way to change the delay of a view frame is manually in the View editor, and it can get quite cumbersome if for whatever reason you need to change the values for a lot of frames. How feasible would it be to expose the view frame delay property to the script?

Delay is already exposed to script, but as a readonly property called "Speed". Making it writeable is mostly a matter of adding this field to savegames, otherwise saving/restoring game will make frame data inconsistent.

But I guess this is also why the view editor needs multiple selection and being able to edit properties from multiple frames at once.

Laura Hunt

Quote from: Crimson Wizard on 14 Oct 2021, 21:37
But I guess this is also why the view editor needs multiple selection and being able to edit properties from multiple frames at once.

Agree, that would also be a very welcome addition. But I guess it would take more work?

Crimson Wizard

Quote from: Laura Hunt on 14 Oct 2021, 21:55
Quote from: Crimson Wizard on 14 Oct 2021, 21:37
But I guess this is also why the view editor needs multiple selection and being able to edit properties from multiple frames at once.

Agree, that would also be a very welcome addition. But I guess it would take more work?

Editor currently does not have any mechanism for this, there might be a default handling available for the PropertyGrid control, but I know nothing about that.
Someone has to research how this works first.

Crimson Wizard

Unfortunately I got very distracted from AGS recently, so this took more time since the last update... but here's the new one.

Updated to Alpha 11
(use download links in the first post)

Editor:

* Added "Use graphical font height in game logic" property to the General Settings, that makes your game use real font's pixel height when arranging text and text-based UI elements, as opposed to the nominal font's size. This is important for TTF fonts, because importing them with N point size does not guarantee N pixel height. Unfortunately AGS used to "lie" about their height all those years, which could lead to some fonts not fitting into gui controls right or even have their bottom parts "cut off" when displayed as a speech. Now you may prevent that using this setting.
* Fixed "Use old-style custom dialog options API" was not set when importing pre-3.4.0 projects.
* Fixed comboboxes' drop-down arrows were not painted with the right color from a color theme.

Script compiler:

* Removed 500-characters line limit.

Script API:

* 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.

Engine:

* Support "borderless full-screen window" mode in addition to the real (exclusive) fullscreen.
* Support 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.
* Engine now supports using real pixel height of the TTF fonts when arranging text and UI elements on screen; using nominal import size of the font is used as a compatible mode for the old games.
Note that you may always configure the vertical line spacing using font's LineSpacing property in the editor.
* Engine now ensures that in threaded audio mode the script's AudioChannel's state only changes once the game is updated, and not while the game script is running. This prevents situations when the clip could begin playing before all properties are set in script, or when AudioChannel's properties' values (such as Position) could change while running a game script.
* Character.SetWalkSpeed() is no longer restricted by an arbitrary limit of 50.
* File.ReadRawLineBack() now always reads full line, and not limited to 200 characters anymore.
* 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.
* Engine config now has graphic modes defined as a simplier string options: "[graphics] fullscreen" for the fullscreen mode setup, and "[graphics] window" for the windowed. Fullscreen option can explicitly define a "borderless full-screen window" mode. (See below for the new config explanation; it will be also added to documentation later).
* Fixed engine could crash due to incorrect disposal of resources if its startup was interrupted for any reason.
* Fixed some TTF fonts were not centered correctly and/or cut from below when text is displayed.
* Fixed crash in case there were too many reserved audio channels.
* Fixed new sound panning implementation.
* Fixed character may have incorrect Frame values while turning.

Android:

* Fixed reading of separate game files (not merged with the main AGS game file) from inside the APK.

WinSetup:

* Added "Fullscreen as borderless window" checkbox.




New graphics mode configuration:

Instead of having several detached options that combined would result in a window size definition, there's now only 1 option (per mode) that contains all possible variants in a single string:
* WxH - explicit window size (e.g. 1280x720);
* xS - integer game scaling factor (e.g. x4);
* desktop - use current system's desktop resolution;
** in windowed mode will try to create largest possible resizing window, while keeping game scaling style (max stretch, proportional stretch or max integer multiplier);
* native - use game's native resolution;
* full_window - special option for the fullscreen mode, this means a borderless window covering whole desktop;
* default - currently we default to (this is also a fallback option in case config parsing went wrong):
** in fullscreen mode to full_window;
** in windowed mode to desktop;

In [graphics] section fullscreen mode is defined by the option "fullscreen" while the windowed mode is defined by the option "window".

Config examples:

Code: ags

[graphics]
fullscreen=1280x720
window=x2
game_scale_fs=proportional
game_scale_win=round


Code: ags

[graphics]
fullscreen=full_window
window=native
game_scale_fs=stretch
game_scale_win=round

Dave Gilbert

Hooray! Thanks CW.

I am not sure if this is a bug or not, or if it's specifically related to version 3.6, but I noticed a weird issue when switching between monitors.

I have a two monitor setup. One laptop and a second monitor. I typically have the monitors in "Extend" mode (where the desktop area is spread out between the two) and test my game on my second monitor. If the game is running and I switch from "Extend" mode to "second screen only" mode, the game minimizes itself and won't come back. Clicking on the icon in the taskbar does nothing (although I can still hear the music and sound). I have to open up the task manager to exit out of the game.

I admit this is an unusual case that not many people will deal with, but it is a bit annoying when it comes up.

Anyway, I'm off to play with fonts now!

-Dave

greg

Thanks for this awesome new build!  The Object.Scaling option and additional audio channels are especially amazing.

When testing out the most recent version of 3.6, I noticed the following:

1. Text within buttons is placed differently in the editor than in the game.  Here's some text with alignment eAlignMiddleCenter.  (The font is LinLibertine_aBS.ttf, imported at 20 pt.)

https://drive.google.com/file/d/1VYqbj3KUjmCIAcXKTJudgZ33z8IkCJMw/view

It's worth noting that, when upgrading from 3.5.1 to 3.6, the font had a VerticalOffset of -2, which appeared as -2 in the editor and -4 in the game.  I've since set this offset to 0, and it now appears as 0 in the editor and -2 in the game.

2. Calling GetGlobalInt before SetGlobalInt results in a crash.  As my game was loading, I was calling GetGlobalInt(foo) before I'd called SetGlobalInt(foo, bar).  In 3.5.1, there was no error or crash.  In 3.6, there was a crash.  I addressed this by updating my script to set the variable before getting it.  I wanted to report it, though, as it's a different behavior from 3.5.1.

Crimson Wizard

Quote from: greg on 05 Nov 2021, 12:40
1. Text within buttons is placed differently in the editor than in the game.  Here's some text with alignment eAlignMiddleCenter.  (The font is LinLibertine_aBS.ttf, imported at 20 pt.)

I am currently experimenting with changing something in how TTF fonts work, and latest build unfortunately may contain mistakes. I realized this too late, when it was already posted. In any case it's better to not rely on the font looks right away and wait until the next update, which hopefully will be ready soon enough.

Quote
the font had a VerticalOffset of -2, which appeared as -2 in the editor and -4 in the game

This sounds weird though. But I will look at this as soon as I fix other obvious mistakes.

Quote from: greg on 05 Nov 2021, 12:40
2. Calling GetGlobalInt before SetGlobalInt results in a crash.  As my game was loading, I was calling GetGlobalInt(foo) before I'd called SetGlobalInt(foo, bar).  In 3.5.1, there was no error or crash.  In 3.6, there was a crash.  I addressed this by updating my script to set the variable before getting it.  I wanted to report it, though, as it's a different behavior from 3.5.1.

I will look into this, but just wanted to mention that these functions were deprecated many years ago, today it's recommended to use normal variables in script.


Crimson Wizard

@greg
Quote from: greg on 05 Nov 2021, 12:40
2. Calling GetGlobalInt before SetGlobalInt results in a crash.  As my game was loading, I was calling GetGlobalInt(foo) before I'd called SetGlobalInt(foo, bar).  In 3.5.1, there was no error or crash.  In 3.6, there was a crash.  I addressed this by updating my script to set the variable before getting it.  I wanted to report it, though, as it's a different behavior from 3.5.1.

I tried this, and I cannot reproduce a crash, nor see how exactly it may happen.

Could you give more information, like post the exact script, tell what function do you call the GetGlobalInt from, what kind of crash (were there error messages)?

greg

Sure, I've appended the crash message below, and I've uploaded the CrashInfo file here: https://drive.google.com/file/d/1WNVKOHaYn9HYax55KrQxvRI79nyY3A82/view?usp=sharing

The functions that called GetGlobalInt(foo) before SetGlobalInt(foo, bar) were called in game_start().  Also, thanks for the heads-up that GetGlobalInt and SetGlobalInt have been deprecated!

Separately, since upgrading from 3.5.1 to 3.6, I noticed that AudioChannel.LengthMs is sometimes returning 0 even when AudioChannel.PlayingClip.ID is not null.  Namely, in the same place in my code, the same log message sometimes prints this:

Code: ags
channel.ID: 3, channel.PlayingClip.ID: 267, channel.LengthMs: 3692


And sometimes it prints this:

Code: ags
channel.ID: 3, channel.PlayingClip.ID: 267, channel.LengthMs: 0


I can reproduce this consistently, but not every time, when I skip the cutscene in which the clip is played.  However, the behavior sometimes occurs (though far less often) even if I don't skip the cutscene.  (I had the same code in AGS 3.5.1, and channel.LengthMs never returned 0.)

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x00537F70; program pointer is -42, ACI version 3.6.0.10, gtags (78,214)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and contact the game author for support or post these details on the AGS Technical Forum.

in "Interface.asc", line 1001
from "Interface.asc", line 1010
from "Extender.asc", line 587
from "Extender.asc", line 596
from "Extender.asc", line 1090
from "Extender.asc", line 3539
(and more...)

Crimson Wizard

Quote from: greg on 06 Nov 2021, 16:55
Sure, I've appended the crash message below, and I've uploaded the CrashInfo file here: https://drive.google.com/file/d/1WNVKOHaYn9HYax55KrQxvRI79nyY3A82/view?usp=sharing

The functions that called GetGlobalInt(foo) before SetGlobalInt(foo, bar) were called in game_start().

From thois crash dump it seems that the last called function was GetWalkableAreaAtRoom. But maybe there was something wrong with either engine or the dump.

Could you post the code around "Interface.asc", line 1001 ?

EDIT: I can confirm that calling GetWalkableAreaAtRoom in game_start will crash the engine. No room is loaded at the time when game_start was called, but it seems this time engine was not able to handle that properly and display a regular error.

greg

Sure, here's the code.  Line 1001 is the one with "GetWalkableAreaAtRoom(player.x, player.y) != GetGlobalInt(EXIT_WA_ENABLED)":

Code: ags
function exit_hidewalkablearea() {
  if (GetGlobalInt(EXIT_WA_ENABLED) != -1) {  // line 999
    // don't hide walkable area if the character is currently on top of it
    if (GetWalkableAreaAtRoom(player.x, player.y) != GetGlobalInt(EXIT_WA_ENABLED)) {  // line 1001
      RemoveWalkableArea(GetGlobalInt(EXIT_WA_ENABLED));
      SetGlobalInt(EXIT_WA_ENABLED, -1);
    }
  }
}


In 3.6 (but not in 3.5.1), when I call this function before setting SetGlobalInt(EXIT_WA_ENABLED, -1), I get the crash from the dump file.  Now that I'm setting the variable first, I no longer get the crash (because it fails the condition at line 999).

I'd guess the change in behavior here is that 3.5.1 returns -1 for GetGlobalInt(foo) if foo hasn't been set, whereas 3.6 doesn't?  So in 3.5.1, even though I hadn't set the variable, it failed the condition at line 999 and never tried calling GetWalkableAreaAtRoom().

Thanks,
Greg

Crimson Wizard

Quote from: greg on 06 Nov 2021, 23:31
I'd guess the change in behavior here is that 3.5.1 returns -1 for GetGlobalInt(foo) if foo hasn't been set, whereas 3.6 doesn't?  So in 3.5.1, even though I hadn't set the variable, it failed the condition at line 999 and never tried calling GetWalkableAreaAtRoom().

I never paid attention to this, but just tested in several versions including 3.5.1, and it always returns "0" if called before SetGlobalInt.

Although looking at the engine code, it seems like this global ints array is not properly initialized in program memory at the game start, which in theory means that these values could be anything and must not be relied upon. So, I'm not really sure how they may have any consistent values as shown by tests.

Crimson Wizard

Updated to Alpha 12
(use download links in the first post)

IMPORTANT: I remade one recently added property in General Settings, and unfortunately this conflicts with the previous build (Alpha 11). If you already used that build, here's what you need to do to make your project open in the current version again:
- Open Game.agf in a notepad;
- Search for the line starting as "<UseRealFontHeight>" and delete it. Save the file.

I apologize for this inconvenience.


TTF fonts setup

In this version I implemented a way to configure how TTF fonts are loaded and displayed in AGS. The problem was that AGS historically did some fixups to TTF looks for backward compatibility, but that made some fonts act worse and not position correctly when drawn in game. There are two new properties in the project that let to specify either new and old behavior.

1) "TTF font adjustment" - this property exists in Fonts and may be set individually for each of them; also similar property is in General Settings and sets default value for each new font you add to your game. This property lets you choose between "no changes" and backward compatible TTF fixup called "Resize ascender to the nominal font height".

To clarify a little, what this "fixup" means: the font has ascender and descender parts separated by a baseline. Ascender is parts of letters above baseline, descender is parts below baseline.
In the past AGS forcefully resized ascender to match the font's size. This could lead to ascender becoming larger or smaller. Because AGS draws texts starting with top-left corner, such change would result in text appearing shifted up or down relative to what you'd normally expect.
Now you may disable this behavior. The ability to keep it for the chosen fonts is left because there's a number of TTF fonts around created specially for AGS, possibly taking this weird behavior into account. For these fonts it may be desired to retain this "fixup".

2) "TTF fonts height used in the game logic" - this property exists in "General Settings" and has a global effect on all fonts. It lets you select what value is used as a height of line of text in game: TTF's nominal size (in "points") or real size in pixels. "Nominal size" is a backward compatible choice.

Why there's a difference: TTF are vector fonts, which do not always scale 1:1 to pixels because they must keep letter proportions. So, when you tell AGS to import a font at size 10, the actual pixel size may end up equal to 10, bit less or larger. Historically AGS ignored that fact and always reported text height using the "nominal" size, but that was a "lie".
The best way to check this out is to put some common TTF font on a GUI, and set GUI's height exactly to the font's size. In many fonts you will notice that some letters (usually "q,j,g,y" and similar) will not fit in, sometimes by a noteable amount.

So, now there's a setting that lets you enable using real height. This means that if you do GetTextHeight or GetFontHeight and so on -- it will report correct pixel heights of a text. Also, default font's linespacing is set equal either to the nominal or real height depending on this setting. But linespacing may also always be customized using corresponding Font's property, in the editor ("LineSpacing").


Other changes:

Editor:
- Fonts now have a readonly Family Name field, that lets user see the original name of a font they've imported (if available).

Engine:
- Fixed potential crashes if a room-related API function has been called in "game_start"; this is achieved by having a dummy room placeholder object. Still results of such calls are undefined and should not be relied upon.
- Fixed some TTF fonts could be cut at the bottom when the speech is displayed.

Compatibility
- When running pre-3.4.1 games, anti-aliased TTF fonts display is now corrected (their vertical position was broken).

greg

Thanks very much, CW!  This fixed both the font issue and the hard crash in game_start() I'd been encountering.

Of the issues I'd reported, I'm only still experiencing the flakey AudioChannel.LengthMs issue.  That is, AudioChannel.LengthMs is sometimes returning 0 even when AudioChannel.PlayingClip.ID is not null.  (Details are a few appends down, but if you need further debugging information from me, just let me know.)  Thanks!

Baguettator

Great news about this new version !

I hope it will be soon a first 3.6 beta release :)

Good job, keep going ! ;)

Crimson Wizard

Updated to Alpha 13
(use download links in the first post)


PLEASE NOTE: For the technical reasons Editor now requires .NET Framework 4.6 to run (was 4.5).


Multiple Speech VOX support

Editor now packs alternate speech voxes, by scanning the top-level directories inside the "Speech" folder. For each top-level subdirectory It creates a sp_[name].vox where [name] is the lowercase subdir name.

For example, if you have this in your game project:

- Speech
- - Francais
- - MyLang

The editor will create following voxes:

- speech.vox (with top-level files from the root "Speech" folder);
- sp_francais.vox (with top-level files from "Speech/Francais");
- sp_mylang.vox (with top-level files from "Speech/MyLang");


Engine supports switching to a different speech vox anytime. To order so, there's a new script function Game.ChangeSpeechVox(string name), where you pass the "[name]" part of the vox filename. E.g. if you have sp_francais.vox then do Game.ChangeSpeechVox("francais"). For default speech.vox pass empty string. The new readonly property Game.SpeechVoxFilename returns current vox name. This works in similar fashion to the functions that control translations.

Note that speech vox selection is not tied to the current text translation in any way, so you may switch both text and voice to the same language, or switch them to different languages to have e.g. French voice-over with English text.



Other changes:

Editor:
- In the "Import TTF" dialog added a choice to import the size closest to the given pixel height (because TTF's point size does not 1:1 correspond to the size in pixels).
- Default config is now saved also when the game is run in debug mode (F5). This ensures that the test run is using the latest Default Setup, if the user's config has not been created yet.
- Editor no longer errors on empty translations when compiling the game.
- Editor now exports values of the string type Custom Properties to translations.

Engine:
- Engine no longer bails out with error if the chosen translation cannot be loaded on startup.
- Fixed previous music was not gradually lowering volume when crossfading (regression in 3.6.0).
- Fixed game window becoming non-resizing after switching from fullscreen (regression in 3.6.0).

nightmarer

Hello all.

Any update about the PNG compression for this new version?

Regards.

nightmarer

BTW I see at the beginning of my game that the black background, which it was blac at 3.5.1 now is pink.
After that everything is fine.
Any reason for that?

Crimson Wizard

Quote from: nightmarer on 28 Nov 2021, 23:32
Any update about the PNG compression for this new version?

If you mean changing the compression method for the game sprites, there were no actual plans for this within 3.6.0.

EDIT: ags currently has a ready support for LZW compression which is used with room backgrounds for some reason. It might be curious to experiment also using this with sprites (optionally, if certain setting is on) and see what compression ratios it can achieve and what will be a perfomance impact.

Quote from: nightmarer on 28 Nov 2021, 23:52
BTW I see at the beginning of my game that the black background, which it was blac at 3.5.1 now is pink.
After that everything is fine.

Do you mean the room's background, or before the first room fades in? Does this depend on the graphics driver selection?

nightmarer

Quote from: Crimson Wizard on 28 Nov 2021, 23:56
Quote from: nightmarer on 28 Nov 2021, 23:32
Any update about the PNG compression for this new version?

If you mean changing the compression method for the game sprites, there were no actual plans for this within 3.6.0.

EDIT: ags currently has a ready support for LZW compression which is used with room backgrounds for some reason. It might be curious to experiment also using this with sprites (optionally, if certain setting is on) and see what compression rates it can achieve and what will be a perfomance impact.

Our sprites are 1,6 GB and our acsprset file is 3,4 GB. It is a shame that our game is going to be so huge in disk space.

Quote from: Crimson Wizard on 28 Nov 2021, 23:56

Quote from: nightmarer on 28 Nov 2021, 23:52
BTW I see at the beginning of my game that the black background, which it was blac at 3.5.1 now is pink.
After that everything is fine.

Do you mean the room's background, or before the first room fades in? Does this depend on the graphics driver selection?

There where is empty background before it was black, and now it is pink/purple. This purple screen starts as soon as there is a fade in. Maybe it is showing the alpha layer as purple, when it should be invisible.

Crimson Wizard

Quote from: nightmarer on 29 Nov 2021, 11:46
There where is empty background before it was black, and now it is pink/purple. This purple screen starts as soon as there is a fade in. Maybe it is showing the alpha layer as purple, when it should be invisible.

Is the "fade" layer itself purple, or something behind it? Do you use standard fade effect, or other methods, like gui with changing transparency?
Could you record a video of what is happening?
Do you know approximately since which build this started?

nightmarer

Not sure from which build started, but I will provide you a video.

Crimson Wizard

Quote from: nightmarer on 29 Nov 2021, 14:32
Not sure from which build started, but I will provide you a video.

Actually, I've been testing some of my own games, and it looks like similar thing happen if you have a room without any imported background, then there's a 320x200 magenta rectangle drawn instead of regular black one.


Meanwhile, I made an experimental build that lets select a "LZW" compression for sprites:
https://www.dropbox.com/s/d51t7xnmnwfkzh8/ags-3.6.0--experiment-spritelzw.zip?dl=0
it replaces regular "Compress sprites" option to "Sprite compression type", which has None / RLE (current) / LZW.

Could you check that out and see what difference does this make to your game sprites? I tried this with my games, but the effect was kind of small (but my largest sprite file is around 15 mb).
NOTE that it's best to use this on a side copy of a project, not the main one.

If this does not help much then I may look into adding Deflate (compression used by PNG) or else.

arj0n

Tried the 3 sprite file compression settings on one of my latest project.

Filetype sprites before importing into ags: png,
largest being still pretty small: 35,5 KB (36.369 bytes)

Game:
Resolution: 640x480, 32-bit true-colour
Total sprites: 1855 / 90000
acsprset.spr filesize: 63,2 MB

Results after compile:
None: game.exe filesize: 550 MB (576.947.304 bytes)
LZW: game.exe filesize: 138 MB (144.977.308 bytes)
RLE: game.exe filesize: 105 MB (110.966.094 bytes)

Crimson Wizard

Quote from: arj0n on 30 Nov 2021, 23:35
Game:
Resolution: 640x480, 32-bit true-colour
Total sprites: 1855 / 90000
acsprset.spr filesize: 63,2 MB

Results after compile:
None: game.exe filesize: 550 MB (576.947.304 bytes)
LZW: game.exe filesize: 138 MB (144.977.308 bytes)
RLE: game.exe filesize: 105 MB (110.966.094 bytes)

Could you post sizes of acsprset.spr after changing compression and compiling, not full game.exe?
Also, do you have an estimate on the total size of source sprites?

arj0n

Quote from: Crimson Wizard on 01 Dec 2021, 00:48
Could you post sizes of acsprset.spr after changing compression and compiling, not full game.exe?
Also, do you have an estimate on the total size of source sprites?

sure:

source sprites: 2.352 png files; 6,03 MB (6.328.527 bytes)

Sprite file compression:
None: acsprset.spr filesize: 475 MB (498.297.296 bytes)
LZW: acsprset.spr filesize: 63,2 MB (66.327.300 bytes)
RLE: acsprset.spr filesize: 30,8 MB (32.316.086 bytes)

Crimson Wizard

Quote from: arj0n on 01 Dec 2021, 17:49
source sprites: 2.352 png files; 6,03 MB (6.328.527 bytes)

Sprite file compression:
None: acsprset.spr filesize: 475 MB (498.297.296 bytes)
LZW: acsprset.spr filesize: 63,2 MB (66.327.300 bytes)
RLE: acsprset.spr filesize: 30,8 MB (32.316.086 bytes)

This is horrendous...

Anyway, it's curious how LZW is twice as worse in your case, because in the hi-res 32-bit game I tested LZW was around 2% better than RLE:
raw: 14238 KB, RLE: 2693 KB, LZW: 2650 KB.
I'd wish to see other various projects tested, as results will likely depend on the amount of graphic detail and colors in a single sprite. But for now LZW does not seem worth adding, unless someone finds a project that displays better results with it. I suspect it may be best for larger photorealistic images.

Meanwhile, there are 2 more methods I am planning to add for this experiment, one is PNG's deflate algorithm, and another is basically to store sprites as indexed images whenever possible (if the total number of used colors is 256 or less). Latter has been suggested couple of years ago and i've been keeping that in mind for a while. Indexed format may in fact be used combined with other compression for even bigger effect.

nightmarer

Quote from: Crimson Wizard on 30 Nov 2021, 02:10
Quote from: nightmarer on 29 Nov 2021, 14:32
Not sure from which build started, but I will provide you a video.

Actually, I've been testing some of my own games, and it looks like similar thing happen if you have a room without any imported background, then there's a 320x200 magenta rectangle drawn instead of regular black one.


Meanwhile, I made an experimental build that lets select a "LZW" compression for sprites:
https://www.dropbox.com/s/d51t7xnmnwfkzh8/ags-3.6.0--experiment-spritelzw.zip?dl=0
it replaces regular "Compress sprites" option to "Sprite compression type", which has None / RLE (current) / LZW.

Could you check that out and see what difference does this make to your game sprites? I tried this with my games, but the effect was kind of small (but my largest sprite file is around 15 mb).
NOTE that it's best to use this on a side copy of a project, not the main one.

If this does not help much then I may look into adding Deflate (compression used by PNG) or else.
I'm afraid it didn't change the size of the asprset.spr. Do I need to do anything or just run it?

Crimson Wizard

Quote from: nightmarer on 01 Dec 2021, 21:51
I'm afraid it didn't change the size of the asprset.spr. Do I need to do anything or just run it?

You need to choose a "Sprite compression" in General Settings. I dont remember if saving is enough, so perhaps rebuild the game to be sure. The "RLE" is standard compression, "LZW" is a new choice added.

nightmarer

Ok I see, what it needs to be changed.
LEH 3.481.618 KB - I had this one selected
LZW 2.934.687 KB

nightmarer

Quote from: nightmarer on 29 Nov 2021, 14:32
Not sure from which build started, but I will provide you a video.
BTW I sent you the videos through Discord

Crimson Wizard

Reuploaded the experimental version with the new method that stores 16-bit and 32-bit images as 8-bit with palette so long as they have below 257 different colors in them.
https://www.dropbox.com/s/d51t7xnmnwfkzh8/ags-3.6.0--experiment-spritelzw.zip?dl=0
This new method is called "Indexed" for short.

My own test results vary depending on the game's graphic style. In the game with good quality antialiased sprites the effect is barely noticeable (reduces size by 10%) as most sprites have >256 colors with varying alpha channel values; but in the game with "old-school" pixel graphics it's comparable to RLE.
Might try another version of indexed image store where alpha channel is saved separately, which may significantly reduce the number of color variations and fit them into the 8-bit palette.

Also would need to make it possible to combine "indexed" format with other compressions (e.g. Indexed + RLE or Indexed + LZW).

arj0n

640x480, 32-bit true-colour
Total sprites in project (F2):   1855 / 90000
source sprites: 2.352 png files; 6,03 MB (6.328.527 bytes)

Sprite file compression:
None: acsprset.spr filesize: 475 MB (498.297.296 bytes)
Indexed: acsprset.spr filesize: 118 MB (124.652.814 bytes)
LZW: acsprset.spr filesize: 63,2 MB (66.327.300 bytes)
RLE: acsprset.spr filesize: 30,8 MB (32.316.086 bytes)

Crimson Wizard

Quote from: arj0n on 02 Dec 2021, 09:00
640x480, 32-bit true-colour

Sprite file compression:
None: acsprset.spr filesize: 475 MB (498.297.296 bytes)
Indexed: acsprset.spr filesize: 118 MB (124.652.814 bytes)

Well, it looks like it saved virtually all of your 32-bit sprites as indexed 8-bit, reducing size 4 times as expected :).
But yes, this is maximum of what it can do, so for better results it has to be combined with the other compression types.

arj0n

Given all sprites in my test do have below 257 different colors in them, this seems like a good result to me already :)

nightmarer

320x200, 32-bit true-colour
Total sprites in project:   35703 / 90000
PNG folder: 1,61 GB (1.734.822.663 bytes)

Sprite file compression:
None: acsprset.spr filesize: 8,77 GB (9.425.965.010 bytes)
Indexed: acsprset.spr filesize: 7,66 GB (8.229.703.633 bytes)
LZW: acsprset.spr filesize: 2,79 GB (3.005.119.147 bytes)
RLE: acsprset.spr filesize: 3,32 GB (3.565.176.753 bytes)

arj0n

That's quite a different result, nightmarer.

My 32-bit background sprites seem to have a max amount of only about 17 different colors in them.
When looking at your 'indexed' compression result, I suspect your sprites have a higher amount of different colors?


arj0n


Crimson Wizard

Here's a new experimental build:
https://www.dropbox.com/s/d51t7xnmnwfkzh8/ags-3.6.0--experiment-spritelzw.zip?dl=0

PLEASE NOTE: you may will have to make a new clean copy of your project to open in this build, because experimental settings changed again. Also do full rebuild at least once to ensure sprite file is recreated with correct settings.

* Can select "Indexed bitmap" method separate from the compression, which allows to mix these. The new option in settings is called "Save sprites as indexed bitmaps when possible" (True/False, default is True). So you may do both "Save sprites as indexed bitmap..." and some compression (None / RLE / LZW).
* The "indexed bitmap" method now does two attempts: first tries to make 256-colored palette with alpha, if failed then tries to make palette without alpha and if second succeeded then writes an indexed bitmap with an accompanying alpha channel. This essentially stores 32-bit sprite in 16-bit: less efficient but may still give x2 decrease in size if lucky.
* Slightly improved RLE compression, may do better by like couple % (not too important, but should mention this).



Quote from: arj0n on 02 Dec 2021, 21:35
My 32-bit background sprites seem to have a max amount of only about 17 different colors in them.

BTW, is there a reason why your game is not 8-bit? In your old game remakes you might be able to only use 1 set of sprites and change actual palette to emulate palettes from various systems.

arj0n

Quote from: Crimson Wizard on 03 Dec 2021, 02:49
BTW, is there a reason why your game is not 8-bit? In your old game remakes you might be able to only use 1 set of sprites and change actual palette to emulate palettes from various systems.

Normally I do use the palette change for such old game indeed.
But this time it wasn't an option because:

  • what is depicted in the sprites (for ex. a mirror) is the same for amiga en dos but differs in the atari version.
  • the dos version uses a strange way of vertical lines to create an effect, a bit like shading
There are several differences like the location and shape of mirror, lamp & nightstand for example:


But when I tried to go for an 8bit version for my project, I failed to get a normal result for the room bg after importing an 8bit version of the background sprite.
Here a test using a new clean project importing a 8bit room bg image:


AGS basic settings:



arj0n

Quote from: Crimson Wizard on 03 Dec 2021, 02:49
Here's a new experimental build:
https://www.dropbox.com/s/d51t7xnmnwfkzh8/ags-3.6.0--experiment-spritelzw.zip?dl=0

indexed bitmaps true
none: 118 MB (124.645.394 bytes)
rle: 9,24 MB (9.693.772 bytes)
lzw: 16,0 MB (16.871.106 bytes)

indexed bitmaps false
none: 475 MB (498.297.296 bytes)
rle: 29,5 MB (31.035.907 bytes)
lzw: 63,2 MB (66.327.162 bytes)

Crimson Wizard

Quote from: arj0n on 03 Dec 2021, 10:29
indexed bitmaps true
none: 118 MB (124.645.394 bytes)
rle: 9,24 MB (9.693.772 bytes)
lzw: 16,0 MB (16.871.106 bytes)

IIRC your raw sources were 6 MB, so indexed bitmaps + RLE give a pretty close result?

arj0n


nightmarer

Hello.
Here my files.

indexed bitmaps true
none: 7,41 GB (7.966.279.437 bytes)
rle: 3,23 GB (3.476.975.790 bytes)
lzw: 2,61 GB (2.811.194.259 bytes)

indexed bitmaps false
none: 8,77 GB (9.425.965.010 bytes)
rle: 3,31 GB (3.555.361.792 bytes)
lzw: 2,79 GB (3.005.119.147 bytes)

Crimson Wizard

Ah well, I see that indexed format does not help alot in your situation (effect is only noteable without extra compression).

Probably I'll add these new compression choices first, and then after check if the deflate (png's) compression will work any better.

At least LZW saves about 0.7 GB compared to RLE already.

TheNewSon

Any ETA for the stable release?

I'm so looking forward to adding all 9 languages into one single build for my prototype!!  :grin:

nightmarer

Any news about how the 3.6.0 is going to be released? I'm longing to change from 3.5.1 and enjoy the new features included.

Baguettator

Hi there !

Is the 3.6 version of AGS will allow to do something with the "length" of ListBox Items ? As far as I know, there is no option to "cut" the text, it always go outside the list box.

Of course, it could be perfect that AGS "remembers" the full length of the item, even if it's displayed not fully in the listbox. For scripting reasons, it could be nice ;)

Something like that is possible ?

Crimson Wizard

Hello.
Quote from: Baguettator on 28 Dec 2021, 18:59
Is the 3.6 version of AGS will allow to do something with the "length" of ListBox Items ? As far as I know, there is no option to "cut" the text, it always go outside the list box.

Of course, it could be perfect that AGS "remembers" the full length of the item, even if it's displayed not fully in the listbox. For scripting reasons, it could be nice

TBH I only recently realized that it's happening for some reason, never paid much attention to this before, I guess.

To be clear, none of the gui controls in AGS seem to clip their textual contents, and buttons only clip the image when certain property is set.
This is not right, afaik any normal GUI system clips the control contents to its size. I think it's possible to make this change for 3.6.0, maybe even unconditionally, because it looks weird. Unless someone has an idea of a good use case for non-clipping the text (which cannot be solved by also adding a label somewhere).
Of course this will have nothing to do with the actual text property, the clipping is a drawing operation that does not change the control's data but only affects its look.



Also, I'm sorry for not answering earlier -
Quote from: TheNewSon on 10 Dec 2021, 00:25
Any ETA for the stable release?
Quote from: nightmarer on 19 Dec 2021, 11:26
Any news about how the 3.6.0 is going to be released? I'm longing to change from 3.5.1 and enjoy the new features included.

I believe that the main bulk of changes is already complete (in fact it has much more than I initially planned, considering it also has a new render, audio & input backend based on SDL2). And I know that at least few people already made or are making their games with this (I recall seeing a 3.6.0 game in the AGS database).

But it's difficult to say when exactly the "final" release will be. Some of the new features may require polishing, and the version needs more testing overall.
Unfortunately the developers team is really small (there are like 2-4 people working at irregular times, and not all of them are working on this exactly version), so the only realistic solution is if the AGS community participates in testing.
I do regularily use the engine to run the games (not make ones), so may notice if some issue stands out, but frankly don't know how "stable" overall this is, and have to also rely on what other people report.

There are several known problems in 3.6.0, after fixing which I may release it as "Beta" to encourage more use and testing.

Crimson Wizard

Updated to Alpha 14
(use download links in the first post)

Contains all the changes from 3.5.1 Patch 6.

PLEASE NOTE: For the technical reasons Editor now requires .NET Framework 4.6 to run (was 4.5).


Editor
- Added "Sprite file compression" option in General Settings, replacing "Compress the sprite file" option. The new option allows a selection of compression algorithm used for sprites. Currently supported: None, RLE (old default compression) and LZW.
- Added "Enable sprite storage optimization" option to the General Settings, that permits the editor to repack sprites in a different storage format, reducing their disk size whenever possible. This option may be used alongside with the sprite compression. Note that this does not change how the sprites work in game.

NOTES: RLE compression is best for the games with simple graphics without much detail. LZW works better than RLE when the graphics are detailed, especially with anti-aliasing etc.
"Enable sprite storage optimization" is best for games with low-res "old-school" gfx which use relatively small number of individual colors. Games with anti-aliased sprites with alpha channel will benefit less from this (or not at all). Having this option enabled does not have any consequences if sprite storage cannot be optimized, these sprites are simply stored as default, so it's okay to keep this enabled at all times (unless your tests show that game loading times became longer because of this).

Engine
- Fixed default black room backgrounds were displayed as magenta / "magic pink" (regression).

Pajama Sam

Does this version have 16 sound channels now?

Manu

Thanks again for the amazing work! I wish I knew more about Windows/.net programming to be able to help you.

One question, do you think it will ever be possible to customize the font size of the editor UI? Not the code editor, because you can zoom in/zoom out, but the right panel (Explore project and Properties) would be extremely useful!

Crimson Wizard

My plan in regards to 3.6.0 is currently this:

1. Fill in most noteable gaps in existing functionality; fix known issues with the base features, etc.
2. Release 3.6.0 as Beta version, and encourage people to use and test it more.
3. While in Beta stage, look if there are feature requests that are significant and don't require much changes to implement, and maybe do some.

For some time I hoped to bring 3.6.0 to almost finished state before the New Year, but somehow I got distracted and did not work much during the autumn months... So now I do not want to prolong its development further. It's been worked on roughly for 13 or 14 months now, so it's time to wrap up.



Quote from: Pajama Sam on 30 Dec 2021, 06:51
Does this version have 16 sound channels now?

Yes, it does for a while. All the additions to 3.6.0 are mentioned in the first post (a little disorganized list, but I will make a proper one soon).

Quote from: Manu on 30 Dec 2021, 10:19
One question, do you think it will ever be possible to customize the font size of the editor UI? Not the code editor, because you can zoom in/zoom out, but the right panel (Explore project and Properties) would be extremely useful!

Sorry, I cannot really tell, this is something to plan ahead and think through. Editor currently supports "color themes" (File -> Preferences -> Editor appearance -> Color themes), which recolor all controls. So I suppose similar method could be used to alter fonts everywhere. But we need to ask those who were working on this last time, maybe they have certain plans already (Chamber of Fear (persn on github) and Alan v. Drake).


Dave Gilbert

This is SO GREAT! Thanks, CW.

One small thing I noticed. You incorporated this feature where you can resize the sprite images in the sprite tab (which is fantastic!), but it's not implemented in the view tab as well. The test that eri0o created in the thread contained both. Is it possible to include the view loop resizing as well?

Crimson Wizard

Quote from: Dave Gilbert on 30 Dec 2021, 16:32
One small thing I noticed. You incorporated this feature where you can resize the sprite images in the sprite tab (which is fantastic!), but it's not implemented in the view tab as well. The test that eri0o created in the thread contained both. Is it possible to include the view loop resizing as well?

Ah, right, this was suspended because it also included the "sound" icon, but there has been an argument about how this icon should be positioned.
But it must be possible to only add the zoom controls alone for now. I'll try do that on the next update.

Dave Gilbert

Yay! Thanks so much. I wasn't aware about a sound icon, but I found the thread and that also sounds extremely useful!

Pajama Sam

I wanted to suggest a script that can modify a sound as the game is running.
Such as-

Code: ags

function object_AnyClick()
{
   Sound.Pitch=-or+ number;
}

or
Code: ags

function object_AnyClick()
{
   Sound.FadeIn=-or+ number;
   Sound.FadeOut=-or+ number;
}

or
Code: ags

function object_AnyClick()
{
   Sound.Reverse=true;
}

Do you think these things could be useful in some way. Or is this already a module or plugin?

By the way what you did with resizing in the sprite tab is fantastic.Now people with poor eyesight"like my brother" can make games that were impossible for them to see to make.

I would also like to suggest making the scripting text size adjustable in prefrences.

Crimson Wizard

Quote from: Pajama Sam on 01 Mar 2022, 05:17
Code: ags

function object_AnyClick()
{
   Sound.FadeIn=-or+ number;
   Sound.FadeOut=-or+ number;
}


By "fade" do you mean volume? You may adjust the volume from the channel returned from Play function.
Code: ags

AudioChannel *chan = aSound.Play();
...
// later
...
chan.Volume += 1;


More info in the manual: https://adventuregamestudio.github.io/ags-manual/AudioChannel.html


Quote from: Pajama Sam on 01 Mar 2022, 05:17
I would also like to suggest making the scripting text size adjustable in prefrences.

Scripting text may be changed with Ctrl + Mouse Wheel, the only problem at the moment is that it does not save, so you have to do it every time.
I guess it should be possible to save the script font size in user settings.

Pajama Sam

I just forgot that you could fade sound that way but the main ones I was talking about were pitch and reverse.Another good thing would be the ability to set the sound file at more amplitude than the original.I know that volume control is available now but this is limited to the original clips volume.

Manu

Quote from: Crimson Wizard on 30 Dec 2021, 12:38
Sorry, I cannot really tell, this is something to plan ahead and think through. Editor currently supports "color themes" (File -> Preferences -> Editor appearance -> Color themes), which recolor all controls. So I suppose similar method could be used to alter fonts everywhere. But we need to ask those who were working on this last time, maybe they have certain plans already (Chamber of Fear (persn on github) and Alan v. Drake).

Yes, font size as part of the color themes would be ideal! Maybe, if it's easier, you could try to build an experimental/alternative version that uses by default a bigger font size (maybe 4px or 6px more) and see what happens?
If you need a beta tester, I'm here. thank you!


Dave Gilbert

Hello! I upgraded from 3.6.0.12 (alpha 13) to 3.6.0.13 (alpha 14). My game loads, compiles, and runs just fine. However, when I added some sprites to sprite editor, I got this error on saving:



I kept a backup so I could revert back to 3.6.0.12. But any help is appreciated!

Crimson Wizard

Quote from: Dave Gilbert on 18 Mar 2022, 15:12
Hello! I upgraded from 3.6.0.12 (alpha 13) to 3.6.0.13 (alpha 14). My game loads, compiles, and runs just fine. However, when I added some sprites to sprite editor, I got this error on saving:

So, ^ this is a bug found in the latest 3.6.0 build, it was reported just recently, and I will be releasing an update soon.

It happens whenever you are changing sprites in your game and then try to save.

Crimson Wizard

Updated to Alpha 15
(use download links in the first post)

Contains all the changes from 3.5.1 Patch 7.

PLEASE NOTE: For the technical reasons Editor now requires .NET Framework 4.6 to run (was 4.5).


Editor:
- Added "GUI controls clip their contents" option to the General Settings. Enabled by default in the new projects, this clips texts to the control's rectangle.
- Added zoom controls for the Cursor, Inventory Item and View panes.
- On the View pane the frames having set delay and linked sound will be now indicated with icons.
- Fixed potential exception that may occur when trying to save a modified spritefile (regression since 3.6.0.13).

Engine:
- Added "--sdl-log" command line option for setting up SDL2 library output verbosity. The engine log config now has a new "sdl" group meant for SDL2 messages.
- Fixed potential crash on startup which happens if no audio device was found.
- Fixed number of problems with OGV Theora playback (stuttering and freezing video).
- Corrections to switching graphic mode between windowed and fullscreen.

Android:
- Fix single game launcher not starting (regression since 3.6.0.13).
- AGS Player now searches for the games using proper detection (ported fix from 3.5.1 where it was applied to an older version of the game launcher).
- In AGS Player added "Browse" button to the game folder selection, which opens default system file picker.
- AGS Player now searches for games recursively, in all the subfolders.
- Fixed AGS Player crashing if no android.cfg was present in the games dir.

WinSetup:
- Fixed "Fullscreen as borderless window" checkbox was not actually working.

Baguettator

Great Job Crimson Wizard and the developer team !

It seems that the 3.6 can be considered as a beta version, now ? Or should we wait a bit more time ?

The new features are very interesting :)

Any way to have the "GUI Controls clip their content" option available individually ? Or is it for all GUI Controls ?

Crimson Wizard

Quote from: Baguettator on 20 Mar 2022, 12:58
It seems that the 3.6 can be considered as a beta version, now ?

Almost, I guess; i'd like to wait until we have Android and/or Web build available from the Editor (eri0o is working on that afaik).

Quote from: Baguettator on 20 Mar 2022, 12:58
Any way to have the "GUI Controls clip their content" option available individually ? Or is it for all GUI Controls ?

It is for all GUI in game.
Personally I believe that it should be a normal default, as it is in any common GUI frameworks, as far as I am aware. But the option exists for backward compatibility, e.g. if you import an older project where you'd like to keep existing looks.

In theory it is possible to have per-control option too, not much things have to be added by the way, as such option already exists, but is only used by the Button with image (known as ClipImage property).
The reason I did not do that right away is because I believe that would complicate game desig; such beavior already introduces separate idea of control's visual dimension different from the one defined by the X,Y,Width,Height.
There may be few situations where a user may want to have a text going outside a button, for example, but I think that may be solved by having both button and label combined.
In any case, I'd rather wait and see if there are any issues with the current option, as we may always add per-control option if there's no way around that.

Baguettator

Great !

The function to built for Android inside the Editor will be a very nice feature !!

I plan to go on the 3.6 very soon with my game.

eri0o

Once I get it a little prettier I will open a topic in the Editor board to ask feedback with test builds.

[spoiler][/spoiler]

Mehrdad

My official site: http://www.pershaland.ir/

Crimson Wizard

Only few days later, I must post an update fixing another annoying bug found just now.

Updated to Alpha 16
(use download links in the first post)

IMPORTANT: If you were using 3.6.0 before, then you may receive a warning about your project spritefile containing "leftover" data which will be cleaned up now. That is normal, kind of (see below). That does not delete any actual sprites from the game project itself, only fixes the compiled "acsprset.spr"


Editor:
- Fixed sprites were never deleted from spritefile, only had their references deleted from the project (NOTE: this bug exists at least since Alpha 9).
- Editor now cleanups spritefile on game load, identifying any data not referenced by the project and marking it for deletion.

Engine:
- Updated SDL_Sound lib to recent version, this is purely internal change but it's unknown if this will lead to anything noteable in particular.




Baguettator

Also I had an idea about Listboxes : should it be possible to have a feature that when you click on a listbox, if you just clicked on the already selected index, the listbox gets Listbox.SelectedIndex=-1 ?

It should be a nice native effect. What do you think ?

Baguettator

Also, sorry for the double-post, but I think this question has been asked a thousand times, but if possible, could we imagine a compatibility for AGS managing the PNG files like it manages BMP files ?

Creating DynamicSprites from PNG files out of the game, things like that. Would be perfect, with the alpha canal, will make the life easier for dynamicsprites with transparent backgrounds :)

Grundislav

Quote from: Crimson Wizard on 21 Mar 2022, 13:06
Engine:
- Updated SDL_Sound lib to recent version, this is purely internal change but it's unknown if this will lead to anything noteable in particular.

Unfortunately this seems to have brought back the annoying issue that was in the previous audio system.

Let's say you have INTRO.OGG and LOOP.OGG, and code it so one plays immediately after the other for a seamless transition:
Code: ags

CurrentMusic = aIntro.Play();
SetGameOption(OPT_CROSSFADEMUSIC, 0);
CurrentMusic = aLoop.PlayQueued();


But there is a very small hiccup when switching tracks. Sometimes it's more noticeable than others, but the problem had been completely resolved in an earlier version of this alpha.

Crimson Wizard

Quote from: Grundislav on 28 Mar 2022, 03:10
Quote from: Crimson Wizard on 21 Mar 2022, 13:06
Engine:
- Updated SDL_Sound lib to recent version, this is purely internal change but it's unknown if this will lead to anything noteable in particular.

Unfortunately this seems to have brought back the annoying issue that was in the previous audio system.

Does this happen with any random clips? I may test with the older library version, or make test builds for others to try.

Grundislav

It happens with any music track, and has been happening since at least version 2.72.

Crimson Wizard

Thing is, that SDL_Sound library is not participating in playing the sounds, but only in loading (decoding) them. So if anything affected this was elsewhere.

eri0o

The gap between songs tracking bug is this one: https://github.com/adventuregamestudio/ags/issues/501

@Grundislav, can you make a tiny test game that reproduces? I tried to make one, and I am not sure if I was hearing it or not, but when I recorded the sound being output with Audacity, I didn't saw the hiccup, which I was able to actually see in a previous version. If you could point an alpha version that had no hiccups would be interesting too

Anyway, rolling back SDL_sound in case it's the culprit it should be easy. I updated because it brought compatibility with 32bit wav files and fixed some minor issues. But as CW said we only use it for decoding.

Laura Hunt

Quote from: Grundislav on 28 Mar 2022, 04:51
It happens with any music track, and has been happening since at least version 2.72.

Does it happen only with mp3 files, or also with ogg and wav? If it's only a problem with mp3, it might be an issue of the format itself, not AGS, since mp3 encoding always creates a tiny "gap" at the end of the file.

(For more info: https://sound.stackexchange.com/questions/8916/mp3-gapless-looping-help)

Grundislav

I use Oggs, so it's not the issue with MP3s. Also I was assuming it was because of the SDL_sound update, but I'm probably wrong on that. If it helps, the version of the alpha I tested where the issue was not present was alpha 10. Is there an archive of previous versions where I can download alpha 10 again to make the test games for comparison?

Crimson Wizard

Quote from: Grundislav on 28 Mar 2022, 14:28
I use Oggs, so it's not the issue with MP3s. Also I was assuming it was because of the SDL_sound update, but I'm probably wrong on that. If it helps, the version of the alpha I tested where the issue was not present was alpha 10. Is there an archive of previous versions where I can download alpha 10 again to make the test games for comparison?

Certainly, we have all the releases on github:
https://github.com/adventuregamestudio/ags/releases

specifically 3.6.0 alpha 10:
https://github.com/adventuregamestudio/ags/releases/tag/v.3.6.0.9

The downloads are attached at the end of the post, under "Assets".

Grundislav

Great, thank you!

Here is an archive with several tests for 2 tracks. All notes provided in the readme.txt.

https://www.dropbox.com/s/vayozljgedx3rx0/AudioTests.zip?dl=0

Baguettator

Sorry to post it here, but maybe it needs to be fixed in the new 3.6 coming...

I encounter this problem : when I press "enter", it generates something that would be done by pressiong CtrlK or something like that (a combination of 2 keys, but NOT the "enter" key).

I have no "if (keycode==eKeyenter)" in my "on_keypress" function... And I don't ever know if "enter" key can be used like that.

Any idea about it ? Which value has the enter key ?

Crimson Wizard

Quote from: Baguettator on 28 Mar 2022, 22:44
I encounter this problem : when I press "enter", it generates something that would be done by pressiong CtrlK or something like that (a combination of 2 keys, but NOT the "enter" key).

It's a known issue that eKeyCtrlM has the same code as Enter/Return.
This may be noticed by comparing their values in the key codes table in the manual: https://adventuregamestudio.github.io/ags-manual/ASCIIcodes.html

The workaround is to additionally test if ctrl is pressed as
Code: ags

if ( IsKeyPressed(eKeyCtrlLeft) ||  IsKeyPressed(eKeyCtrlRight) )

Baguettator

Oh, I see ! But is there a way to fix it ?

EDIT : eKeyCtrlLeft and eKeyCtrlRight don't exist... Have they got another name in AGS ?

EDIT 2 : so I just used their ASCII code (405 and 406) instead, but there are no "enum value" for them in my version (3.5.1)

EDIT 3 : in the same "theme", is "eMouseWheelNorth" and "eMouseWheelSouth" should work with a tactile pad of a PC ? (I don't know the english name for that, but you know, the tactile zone where your fingers can simulate the mouse, like for a smartphone. Scrolling can be done by using two fingers).

Crimson Wizard

Quote from: Baguettator on 29 Mar 2022, 08:09
Oh, I see ! But is there a way to fix it ?

Probably won't do this for 3.5.1, as it's a rare problem and there's a workaround (posted above). We may look if it's possible to improve in 3.6.0 version.


Quote from: Baguettator on 29 Mar 2022, 08:09
EDIT 3 : in the same "theme", is "eMouseWheelNorth" and "eMouseWheelSouth" should work with a tactile pad of a PC ? (I don't know the english name for that, but you know, the tactile zone where your fingers can simulate the mouse, like for a smartphone. Scrolling can be done by using two fingers).

I don't know. But we recently received a bug report that touch pad does not register some command for the right click on Linux in 3.5.1, and later this was confirmed to work in 3.6.0. Perhaps you could test in 3.6.0 to see if it works there.

Baguettator

OK, will see in 3.6 !

And what about the ekeyCtrlLeft and ekeyCtrlRight ? Have they been deleted ?

Crimson Wizard

Quote from: Baguettator on 29 Mar 2022, 15:53
And what about the ekeyCtrlLeft and ekeyCtrlRight ? Have they been deleted ?

They have been added in 3.6.0, were not declared earlier. The values themselves should be valid in earlier versions.

Laura Hunt

I'm not sure if this is an issue with 3.6.0 or with all versions of the engine, so I'll mention it here.

When importing ttf fonts, it seems that the engine is mixing up px (pixels) and pt (points).

I have a font that is 11x11 pixels (this one), however, when I import it, AGS says it has a point size of 11 and thus a pixel height of 14:



However, this is incorrect because as mentioned above, the pixel size is 11, which corresponds to a point size of 8. This happens with other fonts too, e.g., if I have a font with a nominal size of 9px, AGS will say it's 9pt, etc.

Crimson Wizard

Quote from: Laura Hunt on 29 Mar 2022, 21:13
I have a font that is 11x11 pixels (this one), however, when I import it, AGS says it has a point size of 11 and thus a pixel height of 14:



However, this is incorrect because as mentioned above, the pixel size is 11, which corresponds to a point size of 8.

Please check the value of "TTF font adjustment" property?

Laura Hunt

Quote from: Crimson Wizard on 29 Mar 2022, 22:26
Please check the value of "TTF font adjustment" property?

In my example above, it's set to "Resize ascender to the nominal font height". If I switch it to "Do nothing", the Font Height field changes to 13.

That's the only thing that changes; the point size field still displays "11 pt".

Crimson Wizard

Quote from: Laura Hunt on 29 Mar 2022, 21:13
However, this is incorrect because as mentioned above, the pixel size is 11

I'm not certain if I understand this. AFAIK the TTF is not supposed to have a fixed pixel size itself, its pixel size depends on the point size it's used at, as well as some characteristics.
In the description it sais "font is designed to be displayed at 11px and multiples thereof", but afaik that does not mean that "the font is 11px".
Where may I see the information about point size 8 corresponding to 11px?

AGS asks for the size you want to import the font at, and it's the "Point size" property it displays.

UPDATE: I've read a bit about this, and apparently AGS editor uses "Point" term incorrectly there. I think it's meaning is rather "Import size", as in something that user requested.
TBH this specific may be due to how the importing process works with the library that we're using.

It also might be that the new "import ttf" dialog is also wrong, and should be designed differently. As an option it may be reversed to its old looks if it was more correct.

On a side note, testing this font in 3.2.1 produces same results as 3.6.0, judging by the font looks (when importing with same size parameter).

UPDATE 2: Running under debugger, i can see that when the font is imported with the size "11", its data sais "size 11x11". However the font rendering library calculates final size by summing "ascender + descender", which results in a higher height (13). AGS uses this reported number to show as "Font Height".
What puzzles me further is that under the same circumstances the actual size of letters on screen (tested by screenshot) could be 14px (capital letters).
Perhaps, 11x11 is some kind of a control size, not directly related to particular letter(s).
I wish I knew more about TTF fonts.

Laura Hunt

Quote from: Crimson Wizard on 29 Mar 2022, 23:14
I'm not certain if I understand this. AFAIK the TTF is not supposed to have a fixed pixel size itself, its pixel size depends on the point size it's used at, as well as some characteristics.
In the description it sais "font is designed to be displayed at 11px and multiples thereof", but afaik that does not mean that "the font is 11px".

Right, but pixel fonts like this one are not "real" true type fonts; rather they are more like bitmap fonts saved as ttf for convenience and for wider compatibilty than a strict bitmap font format. But they are only meant to be rendered at very specific sizes (i.e., the "native" size the characters/glyphs were designed at, and integer multipliers of that, just like any pixel art in general).


Quote from: Crimson Wizard on 29 Mar 2022, 23:14Where may I see the information about point size 8 corresponding to 11px?

Here, for example: https://simplecss.eu/pxtoems.html



Quote from: Crimson Wizard on 29 Mar 2022, 23:14It also might be that the new "import ttf" dialog is also wrong, and should be designed differently. As an option it may be reversed to its old looks if it was more correct.

It could be an option, yes. So far, the "Import at font's point size" option hasn't done anything for me in most cases. How does AGS calculate the font's point size anyway, given that, as you said above, a true vector font doesn't really have a specific/default point size?


Quote from: Crimson Wizard on 29 Mar 2022, 23:14
UPDATE 2: Running under debugger, i can see that when the font is imported with the size "11", its data sais "size 11x11". However the font rendering library calculates final size by summing "ascender + descender", which results in a higher height (13). AGS uses this reported number to show as "Font Height".
What puzzles me further is that under the same circumstances the actual size of letters on screen (tested by screenshot) could be 14px (capital letters).
Perhaps, 11x11 is some kind of a control size, not directly related to particular letter(s).

Yes, I found that confusing too. I'm assuming that 11x11 is simply saying that every character by itself fits in a 11x11 cell, but of course, this is not the same as the total font height when we take the tallest characters + descenders into account. But at least this confirms that AGS is calculating the total font height correctly as 14 (when the "resize ascender" option is active). This is making me think that maybe AGS is indeed doing things correctly, and it's the font designers who are failing to account for the real total height of their fonts by reporting only the "cell size".

Crimson Wizard

Quote from: Laura Hunt on 30 Mar 2022, 08:21
Quote from: Crimson Wizard on 29 Mar 2022, 23:14It also might be that the new "import ttf" dialog is also wrong, and should be designed differently. As an option it may be reversed to its old looks if it was more correct.

It could be an option, yes. So far, the "Import at font's point size" option hasn't done anything for me in most cases. How does AGS calculate the font's point size anyway, given that, as you said above, a true vector font doesn't really have a specific/default point size?

I think there may be a misunderstanding too. "Import at font's point size" also uses the number field, it tries to import the font at the typed size. But it uses "point" term incorrectly, as it seems. So the correct title would be "Import at this font's size".
The difference between two these options is that the first option imports at the size given by user, and the second searches for the font size that results in particular full font height (ascender + descender).
I may either remove the second option if it's not useful, or reorganize fields to make it more clear that both options use the number field.


Quote from: Crimson Wizard on 29 Mar 2022, 23:14But at least this confirms that AGS is calculating the total font height correctly as 14 (when the "resize ascender" option is active).
Erm, this particular option is a backward compatibility feature, and is meant mostly for fonts which made specifically for AGS in the past. Because ascender is resized to match the demanded font size, this option may result in font glyphs being drawn lower, adding vertical space above the letters.

The problem with 3.6.0 is that it still uses unmodified templates from 3.5.*, and therefore when you create your games all the properties are adjusted for importing these older projects.
We need to update the templates to have the recommended settings for 3.6.0, with "resize ascender" off, and other changes.

Laura Hunt

Quote from: Crimson Wizard on 30 Mar 2022, 15:34
Quote from: Laura Hunt on 30 Mar 2022, 08:21
Quote from: Crimson Wizard on 29 Mar 2022, 23:14It also might be that the new "import ttf" dialog is also wrong, and should be designed differently. As an option it may be reversed to its old looks if it was more correct.

It could be an option, yes. So far, the "Import at font's point size" option hasn't done anything for me in most cases. How does AGS calculate the font's point size anyway, given that, as you said above, a true vector font doesn't really have a specific/default point size?

I think there may be a misunderstanding too. "Import at font's point size" also uses the number field, it tries to import the font at the typed size. But it uses "point" term incorrectly, as it seems. So the correct title would be "Import at this font's size".
The difference between two these options is that the first option imports at the size given by user, and the second searches for the font size that results in particular full font height (ascender + descender).
I may either remove the second option if it's not useful, or reorganize fields to make it more clear that both options use the number field.

Oh. Oh! Yeah, that wasn't clear to me at all, I thought only the second option used the number field.

Quote from: Crimson Wizard on 30 Mar 2022, 15:34
Quote from: Laura Hunt on 29 Mar 2022, 23:14But at least this confirms that AGS is calculating the total font height correctly as 14 (when the "resize ascender" option is active).
Erm, this particular option is a backward compatibility feature, and is meant mostly for fonts which made specifically for AGS in the past. Because ascender is resized to match the demanded font size, this option may result in font glyphs being drawn lower, adding vertical space above the letters.

The problem with 3.6.0 is that it still uses unmodified templates from 3.5.*, and therefore when you create your games all the properties are adjusted for importing these older projects.
We need to update the templates to have the recommended settings for 3.6.0, with "resize ascender" off, and other changes.

Yes, I had the impression that "resize ascender" was the new option and "do nothing" was the backwards-compatible one. All clear now.

Baguettator

PROBLEM !! :)

I installed the 3.6 last version, and I encountered a problem using the ReadRawLine function.

I use this function to read some attributes for characters and custom things players can create to play with in the game. So I read these informations in a .txt file, and store that in a struct.

I have to read this line :

0;NomVéhicCréé0;null;null;null;0;25;25;25;25;55;35;10;10;90;10;null;0;null;0;null;0;0;

and it crashes !

I debugged the situation and found that, using this function, it meant that :

String s=File.ReadRawLineBack();
Display(s);
// Displayed : "0;NomV"

It seems that "é" was causing an error in the ReadRawLineBack function. I changed into the .txt file and replaced all the "é" with "e", and it worked perfectly.

Any idea what's happenning ? It was NOT happenning with the 3.5.1 version I used before :)

EDIT : was the limit of 199 removed for the ReadRawLineBack function ? I thought that yes, but I'm not sure...

EDIT 2 : just managed to launch the game with the 3.6, and I found that scrolling with the finger pad works perfectly ! (it was one of my previous questions).

Crimson Wizard

Quote from: Baguettator on 02 Feb 2022, 19:19
It seems that "é" was causing an error in the ReadRawLineBack function. I changed into the .txt file and replaced all the "é" with "e", and it worked perfectly.

Any idea what's happenning ? It was NOT happenning with the 3.5.1 version I used before :)

Yes, this is a bug in 3.6.0, any letter with code above 127 will be mistakenly treated as an end of file. We have this recorded, and it will be trivial to fix.

I should note just in case, that if the letter is a "unicode" one (code above 255), and text is saved as UTF-8, this expected to be read normally (after this bug is fixed), as it reads byte by byte, but the string will only be correctly displayed if the engine works in the Unicode mode. Currently it may only be switched to this mode by the use of translation options; if you use translations and it has a utf-8 encoding option set, as explained in the thread: https://www.adventuregamestudio.co.uk/forums/index.php?topic=59240.0

Quote from: Baguettator on 02 Feb 2022, 19:19
EDIT : was the limit of 199 removed for the ReadRawLineBack function ? I thought that yes, but I'm not sure...

Yes, it should be mentioned in the Changes log: https://github.com/adventuregamestudio/ags/blob/master/Changes.txt

Quote from: Baguettator on 02 Feb 2022, 19:19
EDIT 2 : just managed to launch the game with the 3.6, and I found that scrolling with the finger pad works perfectly ! (it was one of my previous questions).

Nice, this is very good to know that SDL2 works better in this regard.

Baguettator

Does that mean that I need to put this :

// Text encoding hint
//#Encoding=UTF-8
// Source text encoding hint
//#GameEncoding=UTF-8

At the top of my translation file, then save the file where I have to read something using the ReadRawLineBack function in UTF-8, and then it will work as expected ?

Crimson Wizard

Quote from: Baguettator on 03 Feb 2022, 20:10
Does that mean that I need to put this :

At the top of my translation file, then save the file where I have to read something using the ReadRawLineBack function in UTF-8, and then it will work as expected ?

You need to have that translation active, for the engine to display the UTF-8 text.
Create and compile translation normally, you don't have to save the file somewhere else.


On a separate note, we're currently conducting experiments to see how easy that would be to make the Editor itself work and save data in unicode mode. If it worked, then users won't have to rely on translations.
There are preliminary tests that give a hope it's possible, but this may take a while to integrate, so no promises for now.

Baguettator

OK, but the ReadRawLineBack function is used in another .txt file, not the one for the translation. So are we talking about the same thing ?

Sorry if I misunderstand you, english is not my 1st language :(

Crimson Wizard

Quote from: Baguettator on 03 Feb 2022, 21:26
OK, but the ReadRawLineBack function is used in another .txt file, not the one for the translation. So are we talking about the same thing ?

There are two separate problems.

1. ReadRawLineBack had a mistake that made it cut the line if a utf-8 character is met. Now this is fixed, you may download the patched editor here:
https://cirrus-ci.com/task/5287098419773440

2. Displaying the UTF-8 characters on screen. This is not directly related to ReadRawLineBack, but related to the data it read.
Engine will only display UTF-8 characters on screen if it works in "unicode" mode and you provide a proper unicode font.
There's currently only one way to switch engine to "unicode" mode: it is to enable translation that has "//#Encoding=UTF-8" in it.


Crimson Wizard

Updated to Alpha 17
(use download links in the first post)

Synced with AGS 3.5.1 - Patch 8.

New changes:

Editor:
- Added Web/Emscripten build target support (requires "Web build component" installed). See below for brief instructions.
- Added Character.IdleAnimationDelay property to let setup idle view's animation speed.
- Added Cursor.AnimationDelay property to let setup cursor's animation speed.
- Rooms created from a Blank template will now have default background of a game's resolution.
- Editor no longer prevents exporting string arguments from Get/SetTextProperty calls to TRS file.
- Fixed Custom properties' default values were not exported to translation.

Script API:
- Hotspot.Name and Object.Name may now be set in script.
- Added Character.IdleAnimationDelay to let control idle view's animation speed.
- Added new delay parameter to Mouse.ChangeModeView() to let control cursor's animation speed.

Engine:
- Fixed AudioChannel.Speed not working.
- Fixed AudioChannel.PositionMs now resetting when the repeating clip rewinds.
- Fixed File.ReadRawLine() failing at character values >127.
- Fixed potential crash on room load if the walkable area mask contained color values above the supported range.
- Fixed loading savegame made before 3.6.0 was crashing due to incorrect audio channels initialization.

Web / Emscripten:
- Initial port release.




In regards to building Web version of the game. We do not provide necessary files in installation yet, so you'd have to download them yourself for now. They may be found attached to any release on github starting with v3.6.0.16, the archive is called "emscripten.zip". For instance, the current one is: https://github.com/adventuregamestudio/ags/releases/download/v.3.6.0.16/emscripten.zip

Go to your Editor's program folder, create a new subfolder inside called "Web". Unpack emscripten.zip there (unpack fully, there are several archives inside for technical reasons, we will fix this later).
You should now have 4 files there:
- ags.js
- ags.wasm
- index.html
- my_game_files.js

Now when you have this, run the Editor and open your project. 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

Laura Hunt

Quote from: Crimson Wizard on 04 Feb 2022, 06:59
Updated to Alpha 17
(use download links in the first post)

- Added Character.IdleAnimationDelay property to let setup idle view's animation speed.
- Added Cursor.AnimationDelay property to let setup cursor's animation speed.
- Rooms created from a Blank template will now have default background of a game's resolution.
- Editor no longer prevents exporting string arguments from Get/SetTextProperty calls to TRS file.
- Fixed Custom properties' default values were not exported to translation.

Yesss I already said this on Discord, but thanks again for these fixes/additions! :)

I have a very tiny additional suggestion to make. In the header of the .tra file, there are some lines with instructions as to how to use the various parameters:

Code: ags
// The normal font to use - DEFAULT or font number
//#NormalFont=DEFAULT
// The speech font to use - DEFAULT or font number
//#SpeechFont=DEFAULT
// Text direction - DEFAULT, LEFT or RIGHT
//#TextDirection=DEFAULT
// Text encoding hint
//#Encoding=UTF-8


However, "Text encoding hint" doesn't have any instructions, so new users won't know which options can be used here (I myself sometimes forget if I should write ASCII or ANSI there). In order to make it more user friendly, could it be amended to something like this?

Code: ags

// Text encoding hint - UTF-8 or ASCII
//#Encoding=UTF-8



Baguettator

Hey !

Is it possible to manage in-game the windowed mode ? It could be pleasant to decide in-game to switch from full screen to windowed mode and vice-versa, or adjust the size of the windowed mode.

eri0o

Use alt+enter to alternate between windowed and Fullscreen mode. On windowed mode it's possible to resize the window by clicking on the window borders and resizing. It will obey what you set about the sizing behavior on Winsetup/acsetup.cfg (proportional, stretch, ...)

Through script it should be System.Windowed property.

Baguettator

Thanks ErioO !

Also, I just thought about something I encountered before, and maybe it could be changed in new versions of AGS : now, the maximum number of parameters in a function is 14. Could this limit be removed/pushed away ? It could be useful :)

EDIT : also new suggestion : would it be possible and technically possible to have a text in a label that uses different fonts ? Also for ListBox Items in different colors ? It could be useful ;) But I don't know if it's technically possible in AGS ?

eri0o

It should not be needed to push more than 14 parameters in a function. The usual approach is to simply build and object (managed struct) and then pass this managed struct to the function.

Baguettator

Hmm... I can't vizualize your solution. How could it "increase" the number of parameters in a function by passing a struct ?

Crimson Wizard

Quote from: Baguettator on 05 Feb 2022, 21:15
Hmm... I can't vizualize your solution. How could it "increase" the number of parameters in a function by passing a struct ?

You can put multiple variables in a managed struct and pass the instance of that struct as 1 parameter. There may be other solutions, depending on the situation: what the function is for, how do you use it, maybe it can be replaced with just a struct and setting struct members instead? But this is a general scripting topic.

Quote from: Baguettator on 05 Feb 2022, 19:15
EDIT : also new suggestion : would it be possible and technically possible to have a text in a label that uses different fonts ? Also for ListBox Items in different colors ? It could be useful ;) But I don't know if it's technically possible in AGS ?

It's currently possible to script your own label or list box that uses several fonts and colors, with DrawingSurface and DynamicSprite functions.
In theory it's possible to implement some kind of a "rich text" control in the engine too, for example one that draws text using html-like tags, but that's a serious work that requires some good design decision first. We have already planned to wrap 3.6.0 version up, and now working towards finishing priority major features. The other features added were ones that cover problems that are too inconvenient for scripting and simple enough to do quickly in the engine at the same time.
If there's an actual interest in such engine feature, you may post it in the engine suggestions forum section, or our issue tracker on github.

eri0o

Hey, I would like to suggest two modifications on the top post


  • Clearly explain when saying the Editor requires .NET, that it's just something the developer needs, but not for people who will be playing the game. Also, for people in Windows 10 and forward, you already have .NET preinstalled.
  • Remove the SDL2.dll download from there, since it already comes with both the archive and the installer. It may confuse people as if it's a requirement - it's, but it's already packed with the Editor and it will already pack it in the Windows games when needed.

Crimson Wizard

Quote from: eri0o on 05 Feb 2022, 22:43
Hey, I would like to suggest two modifications on the top post

Should be done now.

Baguettator

Quote from: Crimson Wizard on 05 Feb 2022, 22:08
You can put multiple variables in a managed struct and pass the instance of that struct as 1 parameter. There may be other solutions, depending on the situation: what the function is for, how do you use it, maybe it can be replaced with just a struct and setting struct members instead? But this is a general scripting topic.

I really don't understand how a managed struct can replace several function parameters, but the thing is I created functions to place some tokens in a map (like a tabletop game), and sometimes 1 function is to set the different possibilities of placement for 1 token. So, for each possibility, I need to tell which tile, which x coordinate of the tile, and which y coordinate of the tile. 3 parameters per possibility. In this case, my function can get only 4 possibilities. Of course I can set up a way to stock these possibilities, then recall the same function with other parameters and increase the number of possibilities, that's what I did. But it could be useful to have a greater limit. Or maybe I'm wrong ?

Quote from: Crimson Wizard on 05 Feb 2022, 22:08
It's currently possible to script your own label or list box that uses several fonts and colors, with DrawingSurface and DynamicSprite functions.
In theory it's possible to implement some kind of a "rich text" control in the engine too, for example one that draws text using html-like tags, but that's a serious work that requires some good design decision first. We have already planned to wrap 3.6.0 version up, and now working towards finishing priority major features. The other features added were ones that cover problems that are too inconvenient for scripting and simple enough to do quickly in the engine at the same time.
If there's an actual interest in such engine feature, you may post it in the engine suggestions forum section, or our issue tracker on github.

Hmm seems complicate for me to do so. Is there any module for that kind of things, existing for the 3.6 ? Or any method to do the same ?

Also, I already mentionned it, but got no answer : I don't know if it's a problem, but it's a bit annoying for me : in my struct to manage the maps in my game, I have plenty of functions to set up the map. I have a huge function that creates the chosen map (with if/else conditions). The problem is that when my function becomes to big, and if I write something like that :

Code: ags
function Cartes::Create(int c)
{
  this.PlaceTokenA(
  // the PlaceTokenA function has parameters like "int tile, int x, int y, int rotation" etc...
}


Normally, when I hit the "(", AGS shows me the order of the parameters below the editor's text. But it doesn't if the function is too big (I think after a hundred or so lines long). It's a bit annoying because sometimes I have to look in the script in which order are the parameter of the function (like PlaceTokenA), it's a lost of time. Any idea why it happens ? Is it possible to correct it ?

eri0o

@Baguettator, I am sorry but this is very offtopic, if you want help with the design you should ask in the advanced technical forum.

Baguettator

Sorry, I didn't thought about it. Excuse me for that...

But I think this is not offtopic : I don't know if it's a problem, but it's a bit annoying for me : in my struct to manage the maps in my game, I have plenty of functions to set up the map. I have a huge function that creates the chosen map (with if/else conditions). The problem is that when my function becomes to big, and if I write something like that :

    function Cartes::Create(int c)
    {
      this.PlaceTokenA(
      // the PlaceTokenA function has parameters like "int tile, int x, int y, int rotation" etc...
    }

Normally, when I hit the "(", AGS shows me the order of the parameters below the editor's text. But it doesn't if the function is too big (I think after a hundred or so lines long). It's a bit annoying because sometimes I have to look in the script in which order are the parameter of the function (like PlaceTokenA), it's a lost of time. Any idea why it happens ? Is it possible to correct it ?

For me, it's a problem, like a problem of memory or I don't know what...

Crimson Wizard

Updated to Alpha 18
(use download links in the first post)

I had to post another update early, because there was a critical bug found in the Alpha 17, related to audio playback.

New changes:

Editor:
- The new Editor's Preferences dialog now features several tabs, including "Advanced" with a property grid. There's nothing special there yet (it just repeats all the same options in the table format), but this will be used later to add certain settings for Android build, etc.
- Added Room.BackgroundAnimationEnabled property to let have disabled animation on room load.
- Renamed font's "Point Size" property to just "Font Size", because AGS historically used wrong term in regards to this value.
- An attempt to enhance new "Import TTF dialog", making it easier for users to understand the import method selection.

Engine:
- Fixed potential crash occuring randomly when the audio playback starts (regression in 3.6.0.16).



Quote from: Baguettator on 06 Feb 2022, 15:50
I don't know if it's a problem, but it's a bit annoying for me : in my struct to manage the maps in my game, I have plenty of functions to set up the map. I have a huge function that creates the chosen map (with if/else conditions). The problem is that when my function becomes to big, and if I write something like that :
<...>
Normally, when I hit the "(", AGS shows me the order of the parameters below the editor's text. But it doesn't if the function is too big (I think after a hundred or so lines long).

This sounds like a autocomplete bug; we may open a bug report for that. Autocomplete is known to have number of problems in AGS...

Baguettator

Thanks Crimson for your answer ! Indeed, it could be SO NICE to have the autocomplete working well, at least for my situation... Let me know :)

eri0o

On the top post it's written
QuoteKnown problems

* AudioChannel.Speed property is not working at the moment.
But you have fixed this already CW.

Stranga

Hello everyone,

I have a strange bug when saving and loading a game.

If I have a room with a background with more than one frame and save it, when it loads the background animation just plays. Now, I figured that I can now turn off background animations via the room setting, however, I was working with day/night cycles, and if I save at night and load it's day (or background frame resorts to default which I think is 0). Basically, it's not saving room background frames (Not sure if this is affecting other frame animations, haven't tested it with views yet)


I'm not sure if this is an actual bug and I have to code it some other way, just thought I'd report it just in case.

Crimson Wizard

Quote from: Stranga on 18 Feb 2022, 06:57if I save at night and load it's day (or background frame resorts to default which I think is 0). Basically, it's not saving room background frames (Not sure if this is affecting other frame animations, haven't tested it with views yet)

Looks like a bug.

Stranga

Thanks for the update and fix CW  :-D

I also found this, not sure if it's a bug either but when running custom dialog options via scripting I get these errors:
[spoiler]

[/spoiler]

the first one is in Turkish, which just seems to show some displacement of the letters and the other two are Russian which doesn't show up at all, I've tried a few different fonts with Russian but still, the same result.
The rest of the GUI and regular text seems to work fine :)

Crimson Wizard

Quote from: Stranga on 02 Mar 2022, 06:09
I also found this, not sure if it's a bug either but when running custom dialog options via scripting I get these errors:

I cannot answer this question without knowing more details - what script you have, which fonts you have, and so on.

Stranga

Quote from: Crimson Wizard on 02 Mar 2022, 08:20
I cannot answer this question without knowing more details - what script you have, which fonts you have, and so on.

My apologies, here's the script:
[spoiler]
Code: ags

// new module script

//int dlg_opt_color = ;
int dlg_opt_acolor = 30719;
int dlg_opt_ncolor = 65535;
int DlgCursorPos = 1;

import int  KeyUp[2];
import int  KeyDown[2];
import int  KeyLeft[2];
import int  KeyRight[2];
import int  KeyAction[2];
import int  KeyBack;
import int  KeyMenu;
import int  KeySprint[2];

import bool CanPress;

function repeatedly_execute()
{
  btnDialogCursor.Visible = false;
  btnOptionsBox.Visible = false;
}

function dialog_options_get_dimensions(DialogOptionsRenderingInfo *info)
{
  // Create a 200x200 dialog options area at (50,100)
  info.X = 30;
  info.Y = 50;//50
  info.Width = 256;
  info.Height = 256;
  info.ActiveOptionID = 1; // set to first option
}

function dialog_options_render(DialogOptionsRenderingInfo *info)
{
  //info.Surface.Clear(dlg_opt_color);
  int i = 1,  ypos = 24,  xpos = 0;
  // Render all the options that are enabled
  while (i <= info.DialogToRender.OptionCount)
  {
    if (info.DialogToRender.GetOptionState(i) == eOptionOn)
    {
      if (info.ActiveOptionID == i){
       
          btnDialogCursor.SetPosition(6, ypos+42); //Cursor Position
          btnDialogCursor.Animate(5, 0, 5, eRepeat);
      }
       else
       
        info.Surface.DrawingColor = dlg_opt_ncolor;
        info.Surface.DrawStringWrapped(5, ypos, info.Width - 10,
        eFontfntDefault, eAlignLeft, info.DialogToRender.GetOptionText(i));
        ypos += GetTextHeight(info.DialogToRender.GetOptionText(i), eFontfntAll, info.Width - 10);   
    }
    aMenuSelector.Play();
    i++;
  }
}

function dialog_options_key_press(DialogOptionsRenderingInfo *info, eKeyCode keycode)
{
  switch (keycode)
  {
  case KeyUp[0]:
  case KeyUp[1]:
    // check all options upwards until found an active one
    for (int next_opt = info.ActiveOptionID - 1; next_opt >= 1; next_opt--)
    {
      if (info.DialogToRender.GetOptionState(next_opt) == eOptionOn)
      {
        info.ActiveOptionID = next_opt;
        break;
      }
    }
  break;
  case KeyDown[0]:
  case KeyDown[1]:
    // check all options downwards until found an active one
    for (int next_opt = info.ActiveOptionID + 1; next_opt <= info.DialogToRender.OptionCount; next_opt++)
    {
      if (info.DialogToRender.GetOptionState(next_opt) == eOptionOn)
      {
        info.ActiveOptionID = next_opt;
        break;
      }
    }
  break;
  }
 
if(CanPress)
  {
    switch(keycode)
    {
      case KeyAction[0]:
      case KeyAction[1]:
        btnDialogCursor.Visible = false;
        btnOptionsBox.Visible = false;
        btnPopUp.Visible = false;
        btnPopTalk.Visible = false;
        info.RunActiveOption();
      break;
    }
  }
}

function dialog_options_repexec(DialogOptionsRenderingInfo *info)
{
    btnOptionsBox.Visible = true;
    btnDialogCursor.Visible = true;
}
[/spoiler]

Here's the font I am using too: https://opengameart.org/content/lanapixel-localization-friendly-pixel-font
The game is keyboard-only based so I used the custom choice scripting found in the manual. I also use this same font with other languages too and it works fine with them.

Crimson Wizard

Quote from: Stranga on 02 Mar 2022, 23:33
Here's the font I am using too: https://opengameart.org/content/lanapixel-localization-friendly-pixel-font
The game is keyboard-only based so I used the custom choice scripting found in the manual. I also use this same font with other languages too and it works fine with them.

I will make some tests, but something I noticed in the script:
- calling GetTextHeight you use eFontfntAll, but
- calling DrawStringWrapped you use eFontfntDefault.

What's the difference between these fonts, could you double check that this is correct?

Stranga

That was the problem! Thanks, CW! I can't believe I missed that  :-[ Everything works fine now  :-D

Edit: the difference was that "Default" was the AGS font I was using during the development "All" was the one that contained the customer symbols and such for different languages

Crimson Wizard

#186
Updated to Alpha 19
(use download links in the first post)

New changes:

Editor:
- Finally, full Unicode support right in the Editor. Script, game properties and so on, support any human language. Note that you have to use proper Unicode fonts for this to work correctly.
To upgrade your game to unicode mode, goto General Settings and check the "Text format" option. Changing it will convert game files and resave the project. If you had only basic latin text - nothing should change; this is mostly done in case you had other languages in your game. After we update templates, unicode mode should be default for all the new projects.
ANSI mode is still supported, mostly in case you're upgrading an old game and wish to stick to old fonts.
- Upgraded script editor to Scintilla 3.21.1 and ScintillaNET 3.6.3. This was done for easier unicode support. I don't think anything has changed feature-wise, but keep an eye for regressions.
- Added Android build target support (requires "Android component" installed).
More info on building for Android is here: https://www.adventuregamestudio.co.uk/forums/index.php?topic=59772.0
- Removed game Cursors hard limit (was 20), fwiw.
- Fixed few editor panes were not opening correct help topics in F1.

Engine:
- Added "--clear-cache-on-room-change" command-line arg (and similar config option).
- Fixed OGV Theora videos positioned incorrectly if they have certain sizes or aspect ratios.


I think we're now done with major features in this version. In order to move to Beta stage, we only need to update game templates, because they are still upgraded from 3.5.1, and some options are set to backward compatible values at start.

eri0o

The web component is now in too (as part of the installer), so it's not necessary to link it separately in the main page anymore.

I think during beta we will also be writing the missing manual pages, updating script API changes in documentation.

Crimson Wizard

Unfortunately found two bugs in Alpha 19:
- When converting text format (in General Settings) all your scripts should be closed, otherwise the editor may crash;
- In script editor deleting multiple lines at once (with selection) may cause crash.

Both are fixed in this temp build:
https://cirrus-ci.com/task/6570224085368832

I will be releasing a proper update too soon.

Crimson Wizard

#189
Updated to Alpha 20
(use download links in the first post)

Had to make new update soon, to fix couple of problems found since the last update.

New changes:

Editor:
- Fixed crash when changing game encoding if any script window is open (since 3.6.0.18).
- Fixed script editor "random" errors when deleting multiline selection (regression in 3.6.0.18).

Compiler:
- Support hexadecimal number literals (32-bit max). May be used anywhere where regular decimal numbers are used.
Code: ags

int a = 0xFFFFFF00;
int b = 0x01234567;
int c = 0xabcdefab; // both capital and small x and a-f letters are supported
int d = 16 + 0x10; // means 16 + 16


Engine:
- Removed limit of simultaneous Button animations (was 15).
- Removed limit of Character followers (was 30) (was not demanded, but because why not).

Full list of changes is available here:
https://github.com/adventuregamestudio/ags/blob/master/Changes.txt

SMF spam blocked by CleanTalk