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

Started by Crimson Wizard, Thu 25/03/2021 02:28:54

Previous topic - Next topic

Crimson Wizard

Quote from: Pajama Sam on Sat 01/01/2022 05:17:50
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 Sat 01/01/2022 05:17:50
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.

FanOfHumor

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 Thu 30/12/2021 12:38:15
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 Tue 18/01/2022 15:12:23
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 Thu 20/01/2022 12:58:34
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 Thu 20/01/2022 12:58:34
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
[close]

Mehrdad

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

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 Fri 21/01/2022 13:06:00
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 Fri 28/01/2022 03:10:50
Quote from: Crimson Wizard on Fri 21/01/2022 13:06:00
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 Fri 28/01/2022 04:51:00
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)

SMF spam blocked by CleanTalk