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

#1
Quote from: Grundislav on Yesterday at 21:40:03With regards to the above code, the line that causes the crash is Phonograph2 = aPalesteena.Play.

I am frankly confused, because earlier you said that the crash was caused by a blocking function called in rep_ex_always. Are these two separate crashes?

Quote from: Grundislav on Yesterday at 21:40:03It makes no sense to me. If Phonograph is stopped, there's no reason why that line should make the game think a clip is playing on it. I can send you a build, as it's only 4 rooms, if you want to see all the code for yourself.

Alright.
#2
I don't know what to say at this point.
AudioChannel.Stop just stops the current playback. If testing in a simple game it works well, and IsPlaying reports correct state. That's why I suspect a logical mistake somewhere in script, but I don't see the whole related script, so cannot tell.

In regards to the blocking action played in rep-exec-always, there are other ways to print messages without blocking the game:
* Character.SayBackground
* System.Log (and use Log Panel in the editor to see the game logs, if you are using AGS 3.6.1 or later)
#3
Quote from: Grundislav on Yesterday at 21:06:03
Quote from: Crimson Wizard on Yesterday at 20:59:13How do you assign Phonograph and Phonograph2 variables?

I set them as global variables.

I mean, could you post a code of how do you assign them in script?
#4
How do you assign Phonograph and Phonograph2 variables?

EDIT:
Also, you say in the video that the game crashes when you try to play again, but I do not see a crash demonstration in the video itself. Could you tell if there's a error message or anything when it crashes?
#5
I'm sorry, I have trouble understanding these explanations in the video format. I need to know what do you have in script.

- Which variables do you have
- What script is run when you use one object, what script is run when you use another object.
- anything else related to the situation.

Something that I may note right away though: whenever I hear "I have 2 audio channels, one is called X and another is called Y", I immediately suspect that this is a wrong understanding of how audiochannels work. Because having a AudioChannel* variable in your script does not create a audiochannel, it is a reference to a audio channel which may or not point to an existing channel allocated by the engine.
This is explained in detail here: https://adventuregamestudio.github.io/ags-manual/AudioInScript.html
#6
I also recommend looking into Custom Properties that let add values to hotspots and other things. This is often better than relying on hotspot/object's number:

https://adventuregamestudio.github.io/ags-manual/CustomProperties.html
#7
Quote from: Snarky on Sun 10/08/2025 20:10:09Hmm, looking at the walk at 17:30 in this video, it doesn't look like it does:

Rather, it looks like it switches instantaneously from one angle to another (but it looks like there are 16 walk angles, which makes the transition quite smooth: George starts off heading ESE, switches almost immediately to E, then ENE as he rounds the corner, then N when he hits the edge, and NE when he hits the wall).

I am watching at 16:20-21 where the character is walking around the fence, it looks like the walking animation keeps playing during turning: character turns practically at a spot but the legs keep moving, and frames are synchronized between directions. Idk if it's a separate turning animation, or just walking animation playing while turning. That's also why I don't like to judge about details of the game mechanics by a video, it's difficult to understand the underlying logic by watching the recorded video alone.
#8
Alright, that answers my question about which walking frame to use after a turning animation.
#9
Quote from: Mehrdad on Sun 10/08/2025 18:10:10
Quote from: Crimson Wizard on Sun 10/08/2025 17:53:47So, you are saying that the walk after turning animation should begin with frame 1?


Yes
Of course, if you build a system that has more than one stop frame, it should skip all of these frames. We talked about this in previous posts.

Stop frame? Do you maybe mean "start frames" here?

So, if there's a walking animation like this:

[Start frames] --> [Repeating frames]

Then after the turning the next walk begins with the first repeating frame. Is this right?
#10
Quote from: Mehrdad on Sun 10/08/2025 17:30:53In View editor and loops , Frame 0 = Stop player . Please ignore it after finished " turning animation"

So, you are saying that the walk after turning animation should begin with frame 1?
#11
Quote from: Mehrdad on Sun 10/08/2025 16:15:16If the character is looking to the left, and we click exactly to the right. This happens:
The player stands to the left --> Run the custom animation "left to right" --> walk to the right
Note that the standing frame, which is the first frame in the View editor, should be ignored

I did not understand the last sentence. When should the standing frame be ignored?
#12
Quote from: Mehrdad on Sun 10/08/2025 08:21:14
Quote from: Crimson Wizard on Sat 09/08/2025 19:09:38If we play a "turning" animation instead, is the last walking frame saved, or is it reset to 0 when it starts moving again?

Sorry, I didn't understand your question exactly. Please see the example and video I sent you earlier.

Your video shows only turning when the character is standing still. But it does not show what happens when the character changes direction when it is already moving.

Also, it's not always easy to understand what is happening from the video. The animation is too fast and smooth to see these details. That is why I like to have the desired behavior explained in words (or charts), like a list of instructions.

Here's how the turning works in AGS right now. If the character is walking, and does the turn, then its current walking frame is kept, the turning changes loops but keeps the frame number, and the next walk after turning continues from that last frame number, not from frame 0.
It looks like this, for example:



So, I am asking, how do you want this work with turning animations. Should they always start with frame 0, regardless of what the last walking frame was?
What about the next walking animation, should it also start with frame 0 again after turning animation? Or else?

#13
Quote from: Snarky on Sat 09/08/2025 20:27:47Text display time should scale linearly with text length, and the animation speed remain roughly constant. There was a bug around this in earlier engine versions, but it is listed as being fixed in v3.6.1 (Patch 6)

The lipsync animation speed was always slower with shorter texts and faster with longer text, that's a historical behavior, and I did not change it. My fix was regarding the unproportional speed jumps occuring between texts of near lengths, this was happening because of the mistakes introduced by integer divisions. But I have left the original overall behavior untouched.

The formula used to calculate lipsync frame delay in the engine is this:
QuoteFrameTime = (((TextLength / LipsyncSpeed) + 1) * FPS) / TextLength

Notice this "+1" constant added after "(TextLength / LipsyncSpeed)". It's essentially forcing a minimal frame time for short texts, making lipsync animated slower. When I tried removing it, lipsync animation started to play lightning fast for the short texts. I could not guess how else to keep the old behavior, so kept this constant there. (Only adjusted its value little, since it's now working in floating math, so it's now 0.75 instead)
With the increase of the text length, this constant's effect gradually diminishes.
#14
@AGA it looks like the VC Redist link was not updated since, could you check that out once more?

EDIT: also, would it be possible to add a clarification that a x86 version of VC is required, as Editor we distribute is a x86 application?
#15
Quote from: uDe on Sat 09/08/2025 23:46:48Hello, I tried to post here before but somehow it got rejected by system. I hope this doesn't come out as a duplicate.

I'm getting an error on this version & AGS doesn't start up:
 
https://i.postimg.cc/2ynzG973/ags-3-6-2-error.jpg

(3.6.1.31-P9 is working fine on my machine)

Hello, have you installed from a zip archive?
You need to install a newer VC Redistributable on your system, the link may be found under "For Editor" spoiler in the first post:
https://download.visualstudio.microsoft.com/download/pr/5319f718-2a84-4aff-86be-8dbdefd92ca1/DD1A8BE03398367745A87A5E35BEBDAB00FDAD080CF42AF0C3F20802D08C25D4/VC_redist.x86.exe


EDIT: erm, somehow it's still not mentioned on the homepage, gotta ask admins to fix that.
#16
Quote from: Mehrdad on Sat 09/08/2025 19:00:02This is the same "Turn before walking" that is present by default in AGS, but here we tell the player to first execute our frames and then move.

Okay. But standard turning in AGS does this: it fixes character at the current walking frame, and turns it around, while the frame number is kept. And then the walking continues from that frame.

If we play a "turning" animation instead, is the last walking frame saved, or is it reset to 0 when it starts moving again?
#17
Quote from: Mehrdad on Sat 09/08/2025 18:36:51special animation when the character is stopping in the end of the movement.

Alright.

Is this animation played while the character is still moving a second before stop; or is it played after the character have stopped and is standing still already?

What should happen if player clicks to start a new walk during the stopping animation, does the character finish the stopping animation first and then starts moving again, or is the stopping animation interrupted and walk animation plays instead?

Quote from: Mehrdad on Sat 09/08/2025 18:36:51Ok. Let me explain to you with an example

cEgo.SetTurnAnimation(eDirectionDown,eDirectionUp , eTurnClockwise , 4, 0);
The character is in the "down" state and is clicked "up". it moves clockwise, and int view 4 , int loop 0

That's not what I meant...
I meant logical explanation of how the turning animation should work.

For instance:

Is there a difference if character is turning while standing still, or is turning while already moving? Is it the same animation, or two different animations?

What happens after the turning animation, does the character begin walking from frame 0 again, or does he continue with the last walking frame he was on?
#18
@Mehrdad , sorry, but that's not elaboration, that's short version, it is already present in the first post.

Let's start with "More than one frame for Stop character".
What do you mean by this?
- animating a character while the character is standing?
- or special animation when the character is stopping in the end of the movement?


Quote2) Custom turning ( Like Visionaire). I sent for you this module

Can you explain, in plain words, what is the desired behavior? I do not want to read the script module, trying to understand what it does.

For instance: should there be different animations depending on whether character was standing still, or moving when turning?
#19
Quote from: Snarky on Thu 07/08/2025 15:38:05For example, there can be cases for walk-start animations where the character remains stationary while the start animation plays (for example an animated skeleton that collapses whenever it stops, and has to reassemble and reanimate before it can move), and other cases where they start moving while it plays (for example a character with a cape, where the walk-start animation is to get the cape, which hangs straight down when stationary, to lift and trail after the character).

From what I understand from the first post, the request was to have a "intro" and "repeating" part of the same animation. That is - the second case in your examples.

It's not a separate view that plays as a separate stage, but the same walking view, except it does not go all the way back when it repeats, but goes back to the particular frame in the middle.

This may be implemented fairly easily in AGS without changing much. We only need to be able to mark a frame that begins the repeating part.


Quote from: Snarky on Thu 07/08/2025 15:38:05And what happens if you send another walk command in a different direction while the walk-start animation is playing? Do you play the turn animation? Do you restart the walk-start animation with the new angle, or continue from the same frame?

I think that if there's no turn animation, then it should continue a different loop from the same frame, just like it does now when walking. If that's a frame from "intro" sequence, then the new direction continues with the "intro". if it's in "repeating" sequence, then it continues with repeating.
If there is a turn animation, then I am not sure what it should do.


Quote from: Snarky on Thu 07/08/2025 15:38:05As for the stop, will it play before the character comes to a stop? (Like a "skid to a stop" animation for a run.) In that case you need logic to predict how far there is left, so you can start playing the animation while the character is still moving.

I am not sure myself. Maybe we may begin with having a "outro" loop sequence that plays when the character stopped moving.
In other words, we can have a "intro"/ "repeat" (or middle) / "outro" parts of the animation loop.

But re-reading the first post, I begin to doubt if that's what Mehrdad meant. Maybe he was speaking about "idle standing" animation, not "stopping after walk" animation.


@Mehrdad, could you please elaborate on these? We need to understand which kind of animation behavior are you asking about exactly.


EDIT:
I checked the Visionair Studio. I've never used it before, so only understand the basic idea.
They have separate entries (sort of views from AGS) for:
- Walk animations
- Stand animations
- Turn animations

Other interesting bits:
- each frame may have a trigger action, including calling a script; I believe that Alan Drake was trying to design a similar thing a while ago (although it is difficult because AGS does not have a base object class in order to pass the generic pointer into such function as a "caller" parameter).
- walking animation allows to define the amount of movement per each frame (although i could not understand how to set separate values, the UI is rather confusing in this editor).
#20
Quote from: Mystère Poe on Sat 09/08/2025 00:52:54In fact, I tried to respect as possible the original game and rebuild it identically. One view, one room. One step, one room.

The thing is, a "view" in that game does not necessarily equal a "room" in AGS. They may be technically different. AGS room contains more things, because it's meant for a more complicated scene, with walkable areas, walk-behinds, and so forth. By creating over 1000 rooms you likely create a lot of "material" which will take disk space, and occupy game memory, but won't be useful. That's why it's not optimal to do that.
SMF spam blocked by CleanTalk