Author Topic: AGS 3.6.0 WIP (Alpha 10) - SDL2-based engine + Unicode Translations  (Read 8276 times)

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
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

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Ok, I fixed the broken speech bug, and reuploaded Alpha 6 version, please download again.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
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: Adventure Game Studio
  1. Overlay* lastSpeech;
  2.  
  3. function late_repeatedly_execute_always() {
  4.     Overlay* curSpeech = Speech.TextOverlay;
  5.     if (lastSpeech == null && curSpeech != null) {
  6.          // speech has started
  7.     } else if (lastSpeech != null && curSpeech == null) {
  8.          // speech is over
  9.     } else if (lastSpeech != null && curSpeech != lastSpeech) {
  10.          // speech changed to the next line
  11.     }
  12.     lastSpeech = curSpeech;
  13. }
  14.  


Waving a speech portrait up and down
Code: Adventure Game Studio
  1. #define PORTRAIT_YMIN 5
  2. #define PORTRAIT_YMAX 30
  3. int plast = -1;
  4. int pmove = 1;
  5. function repeatedly_execute_always() {
  6.         if (Speech.PortraitOverlay != null) {
  7.                 if (plast >= 0) Speech.PortraitOverlay.Y = plast;
  8.                 Speech.PortraitOverlay.Y += pmove;
  9.                 if (Speech.PortraitOverlay.Y < PORTRAIT_YMIN) pmove = 1;
  10.                 if (Speech.PortraitOverlay.Y > PORTRAIT_YMAX) pmove = -1;
  11.                 plast = Speech.PortraitOverlay.Y;
  12.         }
  13. }
  14.  
« Last Edit: 16 Jul 2021, 11:31 by Crimson Wizard »

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

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
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

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
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).
« Last Edit: 18 Jul 2021, 23:17 by Crimson Wizard »

Sorry, The links doesn't work for me.
My official site: http://www.pershaland.ir/

arj0n

  • Mittens Vassal
  • art consists in drawing a line somewhere
    • arj0n worked on one or more games that won an AGS Award!
    •  
    • arj0n worked on one or more games that was nominated for an AGS Award!
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

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
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

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
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

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Does AGS struggle with audio being cut now, with SDL being implemented?
No more military army stuff. I'm alive and back.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Does AGS struggle with audio being cut now, with SDL being implemented?

Do you have a sound clip or a game for a test?
« Last Edit: 02 Aug 2021, 12:06 by Crimson Wizard »

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

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
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: Adventure Game Studio
  1. // open custom packed file
  2. File *f = File.Open("$DATA$/MyDir/myfile.txt", eFileRead);
  3. // create a dynamic sprite out of a custom packed image file
  4. DynamicSprite *spr = DynamicSprite.CreateFromFile("$DATA$/MyDir/mypic.bmp");
  5. // List all existing resources
  6. ListBox.FillDirList("$DATA$/MyDir/*.*");
  7.  

You may even use this with regular game files, even though that may be not commonly meaningful (if only for some hacks):
Code: Adventure Game Studio
  1. // List all existing rooms
  2. ListBox.FillDirList("$DATA$/*.crm");
  3.  


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

Code: Adventure Game Studio
  1. static DrawingSurface* Hotspot.GetDrawingSurface();
  2. static DrawingSurface* Region.GetDrawingSurface();
  3. DrawingSurface* GetDrawingSurfaceForWalkableArea();
  4. DrawingSurface* GetDrawingSurfaceForWalkbehind();
  5.  

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: Adventure Game Studio
  1. ds.DrawingColor = 4; // will draw area number 4.
  2.  

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.
« Last Edit: 06 Aug 2021, 12:40 by Crimson Wizard »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
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.
« Last Edit: 26 Aug 2021, 15:49 by Crimson Wizard »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
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

  • AGS Baker
  • Wild colonial boy.
    • Lifetime Achievement Award Winner
    • ThreeOhFour worked on one or more games that won an AGS Award!
    •  
    • ThreeOhFour worked on one or more games that was nominated for an AGS Award!
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

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
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).
« Last Edit: 13 Sep 2021, 19:12 by Crimson Wizard »

Audio related

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



Grundislav

  • AGS Baker
  • Mittens Prince
  • Brogan
    • Lifetime Achievement Award Winner
    • Grundislav worked on one or more games that won an AGS Award!
    •  
    • Grundislav worked on one or more games that was nominated for an AGS Award!
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
« Last Edit: 11 Oct 2021, 20:02 by Grundislav »