There is a new version of the forums ready for testing. Please post here if you're willing to help test! We could also use the help of coders!

Author Topic: AGS 3.6.0 - Beta 9  (Read 11487 times)

eri0o

Re: AGS 3.6.0 - Beta 4
« Reply #80 on: 27 Apr 2022, 10:46 »
The library we are using is for 3D positional audio, I linked in the issue a discussion that explains it a bit more.

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • 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!
Re: AGS 3.6.0 - Beta 4
« Reply #81 on: 27 Apr 2022, 13:09 »


The sprite in question is this. Sprite 3819 is used as a normal graphic in a button. In general it seems to be weird because there are other UIs that appear on top of this UI [the top UIs get rendered [they are mostly transparent, but the UI that contains this button, doesn't really get rendered or is partially rendered].

I can take a video if it helps.
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!
Re: AGS 3.6.0 - Beta 4
« Reply #82 on: 27 Apr 2022, 13:19 »
I can take a video if it helps.

It would actually help if I could get this sprite (or any other sprite that causes this problem) and exact gui setup it's used on; this would let me investigate the situation closely.

EDIT: ok, since I can see the import settings, then perhaps i could make a sprite myself. But I'd really need to know GUI setup.
« Last Edit: 27 Apr 2022, 13:25 by Crimson Wizard »

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • 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!
Re: AGS 3.6.0 - Beta 4
« Reply #83 on: 27 Apr 2022, 15:53 »
That'd be more complex to explain and would take more of your time [meaning we'd be lost in translation], I can rar the game files, if that helps? It's a big project in size.

EDIT: I could try thinning out the project, as well, so it's easier to send out, let me do that.
« Last Edit: 27 Apr 2022, 15:56 by Dualnames »
No more military army stuff. I'm alive and back.

eri0o

Re: AGS 3.6.0 - Beta 4
« Reply #84 on: 27 Apr 2022, 17:24 »
Can't you right click on the project explorer and simply export the GUI?

(And then load an empty project and import it and then place the resulting project here...)

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!
Re: AGS 3.6.0 - Beta 4
« Reply #85 on: 27 Apr 2022, 18:34 »
That'd be more complex to explain and would take more of your time [meaning we'd be lost in translation], I can rar the game files, if that helps? It's a big project in size.

EDIT: I could try thinning out the project, as well, so it's easier to send out, let me do that.

So, this is happening because button moves, and the latest engine has a mistake when it does not update the control's texture position, so it stays hidden behind the screen.

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!
Re: AGS 3.6.0 - Beta 4
« Reply #86 on: 27 Apr 2022, 20:58 »
@Dualnames, please try this temp build:
https://cirrus-ci.com/task/5782450277187584

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • 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!
Re: AGS 3.6.0 - Beta 4
« Reply #87 on: 28 Apr 2022, 05:08 »
That works on the testing build, checking the main build also works yay!
No more military army stuff. I'm alive and back.

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #88 on: 28 Apr 2022, 18:20 »
Hello! Loving the latest beta so far, although I've uncovered a pretty major bug. :(

I use several struct arrays where I store various data. One example: a struct containing characters and their view numbers for various costume changes. I propagate these structs at the beginning of the game by calling a function at game_start. ("setupCharacterInfo();"  in this example).

Filling up the structs with data works fine when the game first starts up, but if I load a saved game, the data just disappears. Calling the setup functions a second time under "eEventRestoreGame" fixes it, but I feel like this shouldn't be happening in the first place.

If you need any more information, please let me know!

-Dave


« Last Edit: 28 Apr 2022, 18:22 by Dave Gilbert »

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!
Re: AGS 3.6.0 - Beta 4
« Reply #89 on: 28 Apr 2022, 18:25 »
Filling up the structs with data works fine when the game first starts up, but if I load a saved game, the data just disappears. Calling the setup functions a second time under "eEventRestoreGame" fixes it, but I feel like this shouldn't be happening in the first place.

Was that save made after you configured these structs in your script or earlier?

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #90 on: 28 Apr 2022, 18:26 »
I configure the structs on game_start, so definitely after.

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!
Re: AGS 3.6.0 - Beta 4
« Reply #91 on: 28 Apr 2022, 20:17 »
So, we found that Strings in script are not saved properly.

Here's the fixed build:
https://cirrus-ci.com/task/5389912781357056

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #92 on: 28 Apr 2022, 20:29 »
Thanks! That fixed the problem.

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!
Re: AGS 3.6.0 - Beta 5
« Reply #93 on: 06 May 2022, 04:28 »
Updated to Beta 5
(use download links in the first post)

A bit unexpected, but this is suddenly a larger feature update, complementing improvements to Overlays in this version.
Additionally this update contains a way to set volume for the frame-linked sounds during animation (see below).
Normally this is not a good thing to add so much stuff while the version is already far in Beta, but some of these changes were in plans for 3.6.0 for a while now, and they appeared to be not too difficult to make. At the same time, I believe that's the last of the feature additions for 3.6.0 engine.

Editor:
 - Fixed extracting room template files (other than the blank template).
 - Fixed editor displaying unhandled exception if the room script which user is trying to open was missing. Instead it will now open a blank script.

Compiler:
 - Support using float literals when defining default values for function arguments.

Script API:
 - Extended all Animate() commands by adding "volume" parameter, that defines relative volume of the frame-linked sounds for the duration of this animation.
 - Added Character.AnimationVolume, defining relative volume of the frame-linked sounds.
 - Added Overlay.CreateRoomGraphical and CreateRoomTextual. Use these two functions to create "room overlays": that is - overlays that display a sprite inside the room, sorted among other room objects, characters and walk-behinds.
 - Added readonly Overlay.InRoom property that tells if this is a room or screen overlay.
 - Extended Overlay.CreateGraphical() with a new "clone" parameter that tells whether to assign a sprite index, or make a sprite's copy owned exclusively by this overlay. The former will save program memory but make overlay update if the sprite is edited later. The latter is meant primarily for backwards compatibility. Overlay.CreateRoomGraphical has the same param. Default is false (don't clone).
 - Added Overlay.Graphic property that lets you change overlay's sprite after it's created.

Engine:
 - Perfomance improvement to overlays: engine will not make a sprite copy when they are created whenever possible (non-dynamic sprites), or when told not to by the script command that creates a custom overlay.
 - When reporting script errors, engine will print callstack for all the active script "threads": for example, if there's Wait() function called and error happened in repeatedly_execute_always, then it will print both actual error's location, and Wait() call's location.
 - Added "load_latest_save" and "show_fps" options to config (in "[misc]" category).
 - Fixed overlay may fail to be created sometimes, if previously another overlay had been forcefully removed when changing rooms (this is an ancient bug which existed for many years).
 - Fixes GUI controls not getting redrawn in correct locations if they were moved at runtime.
 - Fixed script's String type could be stored in game saves with a wrong length.
 - Fixed Game.InputBox() duplicating key input if new key handling mode is active.



NOTES: On Overlays

So, from this update 3.6.0 allows to dynamically create overlays not only "on screen", among GUIs, but also inside rooms - among the characters and objects. Overlays still remain a simplistic kind of object that does not have any automated behavior, so it won't interact with anything inside the room, but it still may be sorted among other objects there by manually setting Overlay.ZOrder. So, for example, if you'd like room overlay to change its "baseline" along with its vertical position, you will have to do something like this in rep-exec:
Code: Adventure Game Studio
  1. over.ZOrder = over.Y + over.Height;
In overall, I believe that room overlays open new possibilities in making temporary visual effects in the game, and also may help to script custom game elements from ground up (as they have no additional functionality on them).

On overlay's sprite cloning. This may not be well known, but for "historical reasons" (tm) overlays were doing a copy of the sprite when created. This was fine while overlays were limited to 20 in previous versions, but now when they are unlimited this could become an annoyance. So now, firstly, engine may decide when it is safe to not do a sprite copy (normally - when using regular non-dynamic sprites), and secondly Overlay.CreateGraphical now has an additional parameter which tells whether to make a copy of the sprite or not (not by default). This parameter may be used for backwards compatibility with some old scripts, where dynamic sprites are used to create an overlay and then discarded.

After the above change, it now makes sense to have Overlay.Graphic property, similar to Object.Graphic etc. This changes the overlay's sprite without having to recreate overlay.
Note that there's no Animate function for them, but you may script one yourself, using timers, and changing Overlay.Graphic.

NOTES: On Animation volume

Previously there was no way to choose the playback volume of sounds linked to the animation frames. The only related property was Character.ScaleVolume.
Now there are two ways to do this. First of all, there's Character.AnimationVolume. It sets the default relative volume of any frame sounds. For example, here's a primitive example of how you can make the footsteps volume depend on the character's X position in room:
Code: Adventure Game Studio
  1. player.AnimationVolume = player.x * 100 / Room.Width;
Secondly, each Animate() function (for Button, Character and Object) now has a "volume" parameter. Passing -1 (default) will ignore this, but when a 0-100 value is passed, that value overrides the frame sound volume.

EDIT: hmm, i just realized that maybe Animate() should not override Character.AnimationVolume, but also be relative to it... According to the idea that character is "sound emitter" with it's volume and Animate() is playing an individual sequence, then the volume of the sequence should not be louder than the volume of the emitter?
« Last Edit: 06 May 2022, 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!
Re: AGS 3.6.0 - Beta 5
« Reply #94 on: 08 May 2022, 02:26 »
Started writing "Upgrade to 3.6.0" topic in the manual, in case someone needs an explanation on most noteable changes:
https://github.com/adventuregamestudio/ags-manual/wiki/UpgradeTo36
(work in progress)

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 5
« Reply #95 on: 15 May 2022, 00:34 »
Hello! Noticing a problem with the searching feature.

Normally, when I do a search for a word or phrase in my script, I press "control-F", select "look in current project", and then press enter. I can click on the results and them I am taken to the point in the script where word/phrase resides.

However, it now only works properly when searching in a standard script. For dialog scripts (meaning dialog that is written in the dialog editor), it just opens up the dialog script without highlighting the search result. Here are examples:




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!
Re: AGS 3.6.0 - Beta 5
« Reply #96 on: 16 May 2022, 20:21 »
Hello! Noticing a problem with the searching feature.

Normally, when I do a search for a word or phrase in my script, I press "control-F", select "look in current project", and then press enter. I can click on the results and them I am taken to the point in the script where word/phrase resides.

However, it now only works properly when searching in a standard script. For dialog scripts (meaning dialog that is written in the dialog editor), it just opens up the dialog script without highlighting the search result. Here are examples:


I tried this, and for me it finds the dialog line, but does not highlight it, just puts cursor there. Could you double check if that happens to you, or it does not even move to the line itself?

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 5
« Reply #97 on: 16 May 2022, 21:41 »
Yes, you are correct. The cursor is put on the proper line, but when the script opens it is displayed at the beginning on the page. I have to press a key to jump down to where the cursor is.

Pajama Sam

  • Sam's The name
Re: AGS 3.6.0 - Beta 5
« Reply #98 on: 26 May 2022, 19:15 »
I've been encountering an error" Undefined token overplay".Overplay is a function and is imported in overplay.ash but when I call it sometimes it works and sometimes it doesn't.I don't think theres anything wrong with how I placed the script although I could be wrong.I also encountered this same error for another function a few days ago.After a while it seemed to just fix itself with no changes done to it.
heres the .scm scripts
https://www.filemail.com/d/khuayqkknjpyaol
« Last Edit: 26 May 2022, 19:23 by Pajama Sam »

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!
Re: AGS 3.6.0 - Beta 5
« Reply #99 on: 26 May 2022, 20:19 »
I've been encountering an error" Undefined token overplay".Overplay is a function and is imported in overplay.ash but when I call it sometimes it works and sometimes it doesn't.I don't think theres anything wrong with how I placed the script although I could be wrong.I also encountered this same error for another function a few days ago.After a while it seemed to just fix itself with no changes done to it.
heres the .scm scripts
https://www.filemail.com/d/khuayqkknjpyaol

If this error happens during compilation, "Undefined token" means the script does not see the function. The usual case is that your module with function "overplay" is located below the module that tries to use it ("fishtank") in the list of modules. In AGS script modules can only see functions declared above them.
« Last Edit: 26 May 2022, 20:20 by Crimson Wizard »