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
Quote from: Ghostlady on Sat 07/06/2025 23:25:47I haven't tried Crimson Wizards plan yet.  That may be the easiest solution.

The best solution would be to script this. The transparent gui is a "quick & dirty" solution that is easy to understand, but I recommend doing this in script.

Since you mentioned that the Inventory GUI pauses the game when shown, then you can just test for IsGamePaused() or IsInterfaceEnabled() around the code that changes cursor. Like this:

Code: ags
if ( !IsGamePaused() )
{
    // all the cursor changing code here
}

EDIT:
On another issue, I see that you have a special code for Room's "repeatedly execute". Do you have this duplicated in multiple rooms?
If you do, then I may propose to find a way to write a generic code in the global "rep exec". Usually this is possible to do if you use custom properties:
https://adventuregamestudio.github.io/ags-manual/CustomProperties.html
where you assign custom properties to your room hotspots, and then can read these in global script.
But this may be alot of extra work if your game already has a lot of rooms.
#182
Make a fullscreen GUI, and set its background and border color to 0, which will make it fully transparent.
Keep it Clickable = true.
Set its ZOrder to be lower than the inventory gui.
Make it show along with the inventory gui and hide when you hide inventory.
#183
There should be a big update to 4.0 Alpha in about a week or two, but since a number of serious regressions were found since the previous update, I wonder if anyone could test whatever game they are making with AGS 4 using latest "nightly" build and see if anything is wrong:
https://cirrus-ci.com/task/6429007354265600

(of course, making a project copy for this test just in case).
#184
Alright, since this is a clear observable problem, and I now have an actual video that demonstrates this, I'll address this now and try to fix this within one of the next 3.6.2 patches.
#185
I tried the project that you linked above, and I see a different problem where video plays in a good rate (or so it seems), but sound is delayed by 1-1.5 seconds. This may be a general desync issue. Of course I cannot tell if this is the original video, or it's already an edited one, so maybe the situation with it is different from the earlier one that you tried.

(On a side note, I have a question whether the choice of 1920x1080 resolution is optimal for the game, as both the video and backgrounds that I see in this project were probably converted from lower res.)

Quoteso videos under 7 seconds play without problems

What about videos longer than 7 seconds?

QuoteI think this AGS problem should be worked on and it has been going on for too long.

Unfortunately a number of problems in AGS have been going for too long, as it's been developed by a tiny number of people working in their spare time. Videos are not used often in games made by AGS, so the video playback support has always been low priority.

Apparently, I will have to look into video playback closely this year.
#186
Zrezal, I'm sorry if I was not clear, by "posting a video" I meant uploading it somewhere as a file which I could download and test in the engine.

I need to actually see the video file, see its parameters, see what the engine is doing.
#187
I have found a change in the engine that caused this problem. This is a "smooth walk transition" functionality added in 3.6.1. Historically each Character.Walk stopped the character before making it walk again. If character was already walking, this caused it to "stumble" for a split second, resetting any current step. The smooth transition carries current step progress over to make new walk order seamless with the previous one.

I have no idea why, but this behavior causes this game script to malfunction. The only guess that I have is that there's some "fragile" logic there that depends on characters being in exact coordinates, and maybe exact timing.

I added a backwards compatible hack in the engine. This fixes this cutscene for the game compiled prior to 3.6.1. But this won't fix it if it's compiled in 3.6.1+. A game script should be fixed instead.

The exact old behavior may be recreated (maybe) by issuing Character.Stop command before each next Walk. But I believe that fixing trigger conditions is better.
#188
Quote from: Zrezal on Tue 03/06/2025 21:20:59I can't give you a video because I am constantly changing parameters and recompiling it.

Well, you could post any of them that did not work?
#189
I found another example in recent "Old Skies", it has following videos:
- 1920 x 1080
- Framerate: 24 - 36 fps
- Bitrate: 25 - 34.0 Mbps

But these are very short (few seconds only).
#190
I haven't done many tests of videos in AGS, so I don't have enough experience to tell which parameters to use.
Quickly checked couple of AGS games that had video cutscenes in them.
For example, "Zniw Adventure" (a 640x480 game) has videos with following parameters:
- 640x480
- Framerate: 13 fps
- Bitrate: 1 to 1.5 Mbps (varies between videos)
#191
Quote from: Zrezal on Tue 03/06/2025 20:28:06I don't understand why AGS is having trouble playing a simple video.

I cannot answer this question without having a video that I may do tests with.
The two guesses I have is:
1. It does not process the video fast enough
2. AGS uses a pretty old video decoder library. It's possible that it cannot process certain video format properly.

#192
Quote from: Zrezal on Tue 03/06/2025 19:13:49The video has been encoded with Shotcut with these characteristics: bitrate 12M, resolution 1920X1080.

That's a high resolution video; is your game also 1920x1080? What is the video's framerate (fps)?

If your video's fps is high enough (like 60 fps), then there's a real chance that AGS cannot handle this fast enough, because it's streaming video from the file realtime and not only has to load and decode a frame, but also has to convert each frame into the texture.

Could you upload any random short video that you've made and that does not work (previously you mentioned a 7 seconds video)? I'd like to check out what is happening with it.
#193
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?
#194
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.
#195
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
#196
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)
#197
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.
#198
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?
#199
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).
#200
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.
SMF spam blocked by CleanTalk