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

#41
There have been a similar report:

https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/sound-of-my-video-has-a-delay-that-is-getting-worse-every-second/


Unfortunately, the previous user did not provide any further information.

We need to know some details about video format and how did you make the video (which software, export settings).
If possible, could you upload a short video example that has this problem?
Also, which version of AGS are you using?
#42
Quote from: k3nzngtn on Tue 03/06/2025 09:49:57Ok thx.  :smiley: But then it's weird, I get the error "This is not a valid AGS script module." when I try to import the DobuleClick_1.0.0.scm into a 3.6 BASS project.  :confused:

There's something wrong with the links, here are the working ones:
https://github.com/ivan-mogilko/ags-script-modules/releases/download/initial/DoubleClick_1.0.0.scm
https://github.com/ivan-mogilko/ags-script-modules/releases/download/initial/KeyListener_0.9.7.scm

I'll update them in the head post too.
#43
In the situation like this the first thing that you should check is whether the function "room_AfterFadeIn" is run at all. Place a simple display command there:

Code: ags
function room_AfterFadeIn()
{
  Display("Play music!");
  aMusic.Play(eAudioPriorityVeryHigh, eRepeat); 
}

If you won't see the message either, that means that your function is not connected to the room event.
https://adventuregamestudio.github.io/ags-manual/images/acintro3_05.png
#44
Quote from: eri0o on Mon 02/06/2025 21:03:21One thing I would like is to be able to pass a volume right when using Play, and have that volume be a percentage that gets multiplied by whatever is the volume type percentage - so I could have a slider for the sounds per type in a menu.

Having volume as a multiplier everywhere is a correct way IMO too. I've posted this somewhere before, the volume should be adjusted as a combination of multipliers:

System (master) volume -> Audio Type volume -> Clip volume

and optionally -> Emitter volume (e.g. character) -> Animation volume (for view frame linked sounds)
#45
Quote from: k3nzngtn on Mon 02/06/2025 19:49:31is this compatible with AGS 3.6, or just in the 3.2.# range?

This should be compatible with any version in the range 3.2 to 3.6.
It may be used in 4.0 too, but likely will require to fix a script syntax.

The demo project is made in 3.2 iirc, but they can import into 3.6 without trouble.
#46
I've been busy with other things, but now I will probably return to this issue. It's been a while since I've given any thought to the audio system, so will have to spend some time and think this through again.

I do believe that there has to be a way of limiting the number of simultaneous playbacks according to user-defined rule. The question is whether we support this as a native engine feature, or expose enough API to let users write their own "audio mixer", or both. Native feature may still be useful, because limiting e.g. music to 1 channel and having an automatic replacement is a very convenient functionality and used almost in every game.

There's one thing regarding the ideas mentioned above, which I do not like:

Quote from: Snarky on Sun 30/03/2025 08:00:23AudioTypes seem more useful to me as a way to easily set up game logic for sound. MaxChannels would still help control whether a track replaces what is currently playing or not, for example. It's also important to consider how speech will work. It would be good if the system could support voiced background speech; some way to control the speech "channel(s)"/get speech playback instances would be needed.

The reason why I do not like this approach is that if AudioTypes control number of simultaneous tracks, then that means there are still "audio channels" out there, except now they are "hidden" if AudioChannel is removed. We remove AudioChannels from script, and instead get secret "channels" in AudioTypes.

If we allow to access a list of AudioPlayback instances per AudioType, that makes AudioType to be a sort owning container of playback references (which seems like a strange organization to me). And if we would like to let users read the contents of these containers, then a) we have to expose AudioType as a struct in script, and b) we practically recreate audio channel in a less convenient way.

Why not keep AudioChannel, but make it
* not having a hard engine limit, but let users define as many as they like
* strip their API by moving playback control to AudioPlayback, and keep the channel object only as a "slot" which may contain a playback?
#47
AGS Engine & Editor Releases / Re: AGS 3.6.2
Sun 01/06/2025 22:10:15
Alright, here's a AGS build with this problem fixed up:
https://cirrus-ci.com/task/5954940373303296

this fix will also be included into the first 3.6.2 patch (when it's released).
#48
AGS Engine & Editor Releases / Re: AGS 3.6.2
Sun 01/06/2025 20:19:07
@Kiszonka this appears to be a mistake in PlaceOnWalkableArea. This function is run whenever a character ends up on a non-walkable area after walking (because of pathfinder imperfection), and idea is that it jumps a pixel to the nearest area.

I suspect that there may be a coordinate conversion mistake somewhere.

The easy way to reproduce the issue is this:
Code: ags
function on_key_press(eKeyCode k)
{
  if (k == eKeySpace)
  {
    Point* p = Screen.ScreenToRoomPoint(mouse.x, mouse.y);
    player.x = p.x;
    player.y = p.y;
  }
  else if (k == eKeyW)
  {
    player.PlaceOnWalkableArea();
  }
}

This puts a character on any place in room with Space key, and orders to move it to the nearest walkable area with W.
#49
AGS Engine & Editor Releases / Re: AGS 3.6.2
Sun 01/06/2025 15:51:46
Quote from: RootBound on Sun 01/06/2025 10:10:12I posted this on discord this week but will mention it here too:

I am not available on discord at all times, and there's no guarantee that the bug reports will be noticed if posted in tech support chat, for instance, because nor me nor other developers read all of it consistently. It's best to post bug reports on forums or in our github issue tracker.

Quote from: RootBound on Sun 01/06/2025 10:10:12I found an "illegal exception" bug. This happened when I made a mistake in my code and used "%s" instead of "%c" when formatting a string to use String.Chars[]. The line that caused the error was inside a "for" statement, and looked like this:
Code: ags
String value = String.Format("%s", otherString.Chars[i]);

Changing %s to %c stops the error, but I assume there ought to simply be some kind of error message here that stops compilation of the game instead of a crash.

Added argument test into the engine. This may prevent crashes in majority of cases, but does not give a 100% guarantee. Because of how AGS script is compiled it's not always possible to know the value type for certain, and not possible at all when it is returned by a plugin's script function.

Opened a feature suggestion about implementing string format parsing in the compiler:
https://github.com/adventuregamestudio/ags/issues/2739
#50
AGS Engine & Editor Releases / Re: AGS 3.6.2
Sun 01/06/2025 13:20:06
Quote from: Kiszonka on Sun 01/06/2025 12:26:22I moved from from 3.6.2.6 beta to 3.6.2.10, and since upgrading I've been experiencing an issue regarding characters walking.
When a character hits an edge of a walkable area, they sometimes teleport to a seemingly random location (sometimes more than 300px away).

It happens in more than one room in my game and I can repro this about 10%-20% of the time by hitting a specific corner in a specific room (image attached - teleport happens when walking from right to left).

Mask resolution of the room is 1:4.

Hello.

In order to diagnose the problem I will need a walkable area (could you export the walkable mask and upload somewhere?), and an example of walking order that results in this problem: starting and target coordinates.

Out of curiosity, why do you use 1:4 mask resolution? We've only have it in AGS as a formality, I have not heard anyone using this before (old games used 1:2 sometimes for performance reasons, and today people just use 1:1 most of the time).
#51
Quote from: Danvzare on Sun 01/06/2025 12:15:05Wait, what if you press the keyboard key corresponding to the empty dialog option?

I get the feeling it'd be possible to sequence skip with that. So perhaps that should also be disabled if the dialog option has no text.

This is already done. Engine keeps a list of the currently displayed options, and all actions only affect this list.
#52
AGS Engine & Editor Releases / Re: AGS 3.6.2
Sun 01/06/2025 01:02:23
Here's an updated temporary build with all accumulated fixes so far:
https://cirrus-ci.com/task/5506729732997120

Following bugs fixed:
- Pressing Enter on Text Parser panel while no item is selected was causing an exception.
- Engine crashing if SpeechView has no loops.
- Speech displaying in a wrong place if there's a transparent GUI covering whole screen.
- Pink pixels appearing around sprites when the sprite anti-aliasing setting is on.
- Engine crashing if Character.DestinationX/Y is read while character is turning on spot after a call to FaceDirection.
- Dialog options with empty names are still displayed (as empty lines) and can be selected.



I will wait for a small while before releasing a first patch to 3.6.2, in case more regressions are found.

#53
If there are problems then it's better to find them early.
We don't have a lot of testers, and people are usually reluctant to use a beta version unless they start a new game, so every time there's a new version release we expect more bugs to be found as larger number of users finally upgrade to it.
#54
I tried this (using the engine exe from the new build) an cannot reproduce the problem.
I choose options 2,3,4 as you mentioned, and option 1 is still displayed afterwards and not run automatically.
After I run option 1, it goes into "search room" sequence.

Unfortunately, I do not see the script for the first option, and dFoundVictim3 dialog, so cannot tell if the dialog proceeded correctly after that.
#55
Quote from: Honza on Sat 31/05/2025 20:06:08Thanks! The empty option is now hidden, but it also behaves as if it was completely switched off. In my example, if I click options 2, 3 and 4, option 1 runs automatically (the game sees it as the only remaining one) and then the dialogue ends without option 5 being triggered.

I tested this several times, and it worked when I did.

I have 6 options, 1 of them without a name. Only 5 are visible, I click these in any order, and neither of them is run automatically. After the 5th are switched off, the 6th invisible one is run on its own.

Where can I see this dialog in your game?
#56
Ok, here's a link to yet another test build:
https://cirrus-ci.com/task/5506729732997120
#58
Updated the first post with the new download link, now this version supports up to 3 secondary textures attached to a shader. Instructions are also updated in the first post.

For a quicker reference, the update contents are explained in this comment:
https://www.adventuregamestudio.co.uk/forums/engine-development/experiment-ags-4-custom-shaders-support/msg636683542/#msg636683542
#59
The behavior of empty options was never documented, so I never thought about them.

I just tried this in various versions of AGS, starting with 3.2.1, and in 3.2.1 you could still select an empty option if you click on a 1-pixel high location after the options. Somewhere between 3.2.1 and 3.6.0 it changed to not being clickable. In 3.6.2 empty options are displayed in full line height even if they are in the middle of other options.

Not displaying them seems reasonable, and they were already used in older games, then I must revert this, and document this behavior in the manual.
#60
After re-reading the question and trying to guess what the scene looks like, I think the more natural solution is to go opposite direction and don't use GUIs representing something that a character's hand may interact with, and use room object or room overlay instead. These may too display health bars, although it may be bit more work than with buttons (i don't see the picture so can only guess how it's made now...)
SMF spam blocked by CleanTalk