Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Crimson Wizard

#181
From my memories of investigating the Editor's code, the root of this problem is that the whole subtree is getting recreated each time something changes in it. This is quite inefficient, and of course this causes the folders loose their collapsed/expanded state.

I do not know why this is done so, or since when, but it's possible that this behavior was introduced along with the folder support, which was done by contributors around the time the Editor went opensource (AGS v3.2.2).

The dumb approach would be to fix the consequence of the problem, for instance: remember which folders are expanded and restore them after the change. But the ideal approach would be to fix the root of the problem: find out why this subtree recreation is ever necessary, and change the code so that it's not performed.


EDIT: Opened a ticket:
https://github.com/adventuregamestudio/ags/issues/2105
#182
Quote from: Gal Shemesh on Wed 23/08/2023 18:29:29I'd love to report this as a problem and much appreciate if this could be fixed. I'd also add to this a suggestion for an option to update the sound files from source, like we can do in the Sprites editor, so it won't be required to delete and re-import the audio assets.

I must note that this is already added in 3.6.1 Beta.

But, it was supposed to not require to delete and re-import an audio. Editor is supposed to update the audio automatically when detecting a change to the source file, but that did not work at all times for some reason.

This was discussed here:
https://www.adventuregamestudio.co.uk/forums/editor-development/feature-suggestion-replace-audio-clips-from-source-files/
#183
If the folder behavior is countering the work, then this may be brought up as a problem, added to our bug tracker, and then someone who finds spare time will fix this eventually. Few similar problems have been fixed in the past.

Quote from: Gal Shemesh on Wed 23/08/2023 17:31:22I'm just thinking aloud here. I really don't know what it involves to change such things in the editor. So I just bring this up, and would like to know how you guys work or prefer to work with your audio files - do you still use the old fashioned way of numbering your audio files in external folders on your computer and set AGS to play them, or do you use the new audio system and import your audio assets into AGS?

These may be two options available now in practice (at least if working strictly in the Editor), but they are not the only possible options from the design perspective, and having external files don't prevent having a new audio system. Because the new audio system is not strictly in having to import audio by hand in the project tree, but in 1) giving meta data to audio items; 2) having OO-style script commands for audio, where audio items are referred to using script names rather than numbers.
There are several steps in managing of game assets, and they may be reviewed and redesigned separately.
To give a hypothetical example, we could have audio files of arbitrary names placed in a particular Audio folder, and have them automatically hooked up into the game, given script names based on their filenames.
#184
Quote from: Gal Shemesh on Wed 23/08/2023 14:31:42So, is there a simple script way to setting this up? (and if there's an option to make the outline font a little transparent that would be even better!)

No.

Although, in theory, you might script displaying 2 lines of same text with 2 fonts one above another.
#185
I was not certain what does "backward" means in this context; so it means backwards other way?
Expected behavior is that buttons, textboxes and listboxes are only given RTL support in 3.6.1. But labels were supposed to work correctly in 3.6.0.
Therefore, I still do not understand what you are saying about labels.
#186
Quote from: Gal Shemesh on Tue 22/08/2023 14:53:28Only came to checking this now in the current game of a friend which I finished migrating to 3.6.0. The text boxes are also showing the Hebrew text backwards. I just checked saving in Hebrew and realized that writing in the text box is backward... I guess it's the same as with the labels.

I'm sorry, I don't know what this means. Is it working as expected or not as expected? How is this related to the above quote?
#187
Quote from: Gal Shemesh on Tue 22/08/2023 14:17:55On the internal timer topic of the SayBackground overlay - how does it work? I mean, I tried using it in another place in the game to make a character speak in the background, writing his cues line by line and expected that there will be an automatic timer that removes each message after a period of time, but all I got was only the last message in the sequence showing up...

Because SayBackground is not a blocking action, the script continues further and all SayBackgrounds execute before screen can be redrawn once. Since only one speech may be displayed for same character at the same time, each next command was overriding the previous one.
If you need a sequence of non-blocking actions, that work in parallel to the rest of the game, the solution is to remember current "state" and test for this state in repeatedly-execute function(s).
In case of SayBackground, it returns an Overlay pointer, which you may store in a variable and test for Overlay.Valid to know when it's removed, so that you could continue with the next SayBackground.
The alternative is to use your own timer.
#188
Quote from: PEd1 on Tue 22/08/2023 14:16:20if (CoininMachine == true) {
// player says the coin has been dislodged
// player gets drink added to their inventory
}
else if (CoininMachine == false) {
// player says nothing happened
}

Please note that this code may be simplified for two reasons: 1) checking boolean variable may be done directly without comparing with true/false; and 2) if you have only 2 possible variants, then there's no need for the second "if":
Code: ags
if (CoininMachine) {
// player says the coin has been dislodged
// player gets drink added to their inventory
}
else {
// player says nothing happened
}
#189
Character.SayBackground creates a textual overlay in a position based on character's position.
The direct equivalent is Overlay.CreateTextual. This may be used to write custom speech too.

The benefits of using another character with SayBackground are that it calculates the position according to the same rule, and has its own internal timer for removing the overlay.
The benefit of using Overlay.CreateTextual is that you don't need dummy character(s). Note that unlike blocking speech, where you may use 1 dummy character always, for non blocking speech you need as many dummy characters as many simultaneous background speeches are there.
#190
Quote from: Ghostlady on Mon 21/08/2023 04:27:51I figured it out.  I forgot about the saving and you can't add anything new to the rooms and I was using a save.

This is strange. When you restore a save the room's backgrounds still should be in place since these are not written to a save but taken from the current room file. Room bgs animate by default, so unless there was a "fixed bg" parameter set at the time the save was done, I cannot explain why animation was not playing.
#191
Updated to Beta 7
(Please use download links in the first post)

Changes in this update:

Contains all fixes from 3.6.0 Patch 4.

Editor:
- In Dialog Script editor support most Edit menu and context menu commands from the regular Script editor, with a few exceptions.
- Added "Replace with all sprites from folder" command to the View editor's context menu.
- For Audio Clips in the project tree added "Force Reimport", "Force reimport all file(s)" and "Replace Source File" context menu commands.
- For Output Panel added "Copy selection" context menu command.
- Improved LipSync panel looks in case user's system has display scaling option enabled.

Engine:
- Support handling multiple mouse clicks per game frame, similar to how multiple key presses were supported since 3.6.0.
- Fixed program crash occuring when trying to get a screenshot from a save which does not contain one (regression in previous 3.6.1 Betas).

Android:
- Fixed crash in AGS Player when opening a games directory for browsing a list of games (regression in previous 3.6.1 Betas).
#192
Quote from: Gal Shemesh on Sat 19/08/2023 17:26:51At this point I can only assume that the old engine version scripts were more forgiving.

I suppose that this is the only option here, as the above code normally should not even compile, not finding a bracket match.

By the way, I recommend to put checks in order by default, making the game progression easier to understand: test variable case 0 first, then case 1, and so forth.
#193
There seem to be some kind of misunderstanding here, so I must clarify something first.

There's a big difference between a sequence of bare "ifs" and "else ifs". These are logically different, and of course must not be substituted during the migration process.

1. Sequence of ifs:
Code: ags
    int a = 10;
    int b = 20;
    int c = 30;
    
    if (a == 10)
    {
        Display("Checked first");
    }
    if (b == 20)
    {
        Display("Checked second");
    }
    if (c == 30)
    {
        Display("Checked third");
    }

Here every "if" is a separate check, not depending on the previous ones, and therefore will be checked one by one regardless of the previous check's result. In the above example the engine will display all 3 lines.


2. Sequence with else ifs:
Code: ags
    int a = 10;
    int b = 20;
    int c = 30;
    
    if (a == 10)
    {
        Display("Checked first");
    }
    else if (b == 20)
    {
        Display("Checked second");
    }
    else if (c == 30)
    {
        Display("Checked third");
    }

Here the if/else ifs form a single chain of checks, and the following "else ifs" will only be checked if the previous failed. As soon as one of the checks succeeded, the rest of the sequence is skipped. In the above example engine will display only the first line.

These are the syntax rules, common to any program language using these constructs. If the engine's behavior does not match this, this would mean there's a error either in script compiler or in the engine.

I tested this in 3.6.0 just in case, and both cases work as expected there. (But I suppose if they did not, users would notice this long time ago.)

If some script does not work as expected in your game, then please post the actual script example, as there may be other reasons for it to not work.
#194
The "Find" dialog is in Edit menu, which is only visible when any script is open.


Can you double check that the room has a second background? Do you see it in the list of backgrounds when you open  "Background" list in the room editor, and is it visibly different from the first one?

Could you perhaps upload your room file to let us check it out?
#195
Quote from: Baguettator on Thu 17/08/2023 22:06:15Hi ! How is working the Web Compiler ? Does a big game (like 1,5Go of size) can be launched on the web ? And how it works ? It allows multiplayers, or players on different computers can see the same game at the same moment and everyone can control it ?

I don't know about the size, so cannot answer that, but I suspect that large games won't work well in browser, the loading times will be huge.

I suppose that if multiple clients connect to the same web server running the game, then they will be able to send input to it, and see and control same game. That won't classify as "multiplayer" though, and AGS itself won't be able to distinguish clicks from different clients, for AGS it will look same as if multiple people were taking turns to click with the same mouse.
#196
Quote from: Ghostlady on Thu 17/08/2023 19:29:10I don't have that set in the room script. Actually it's a very small script with not too much going on.

Do you have this in any of the global script perhaps? You may search for SetBackgroundFrame in the whole project using Find dialog in AGS.
What is the value of BackgroundAnimationDelay?

I don't think there's any other condition under which this won't run.
#198
This is a well known issue, since the game archive is built on Windows these files don't contain necessary flags.

You need to apply chmod to the launch script too (file with the name of your game in the parent dir).

EDIT: I was expecting to see this mentioned in the manual, but cannot find any note about this either, so apparently this is another thing that has not been documented.
#199
Yes of course, having dynamically created objects would be an important and useful functionality.
But there is a number of problems and design questions that have to be resolved first. Especially if we don't want to push another set of ugly hacks into the engine. I need to gather up the information about everything that has to be solved, and write a ticket about this.

At the moment the dynamic creation of objects is not even in the first ags4 milestone draft:
https://github.com/adventuregamestudio/ags/issues/1298

There's always something else that has to be worked on. Always more and more tasks, problems and requests stacking up, and for some reasons their numbers are not diminishing, but rising in time. From all the tasks that I've been scheduling for a period of time, I accomplish around 50%, or less, and am constantly changing plans due to urgent requests. It's going like this for years.

This project has always been lacking a proper project manager who would work on setting up priority tasks and keep team focus on them.
As well as more help, at least to deal with minor tasks.
#200
Quote from: RootBound on Wed 16/08/2023 02:54:24But why would Ctrl+[ trigger escape?  :-\ 

This is 3.5.1.22

This is just how the codes for combinations were made in AGS.

Since 3.6.0 the on_key_press receives a key and mod separately, so this is less of an issue.
SMF spam blocked by CleanTalk