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 - Custerly

#1
Ok. Thanks a bunch for clearing all of the up guys. You are always so helpful.
#2
Thanks guys.
#3
Hi,

I have been working on a project on AGS 3.6, and realized recently there is a newer version. A few questions:
- Can I set it up to auto update? (I was not made aware of this update, I just stumbled upon its existance from coming on the forum)
- Is there a harm to updating to the new version? Could it corrupt my project file in some way?
- Do I update by downloading and running the new installer?

Thanks
#4
Hi,

Sorry, but how do I download and install this? The download link took to me a page which contained a bunch of code which I assume i the code for the theme. I copied and saved that into a notepad, but when I open the folder for themes in the AGS Preferences tab, it just opens that notepad file, it doesn't change the theme.
#5
Quote from: eri0o on Sat 30/11/2024 20:48:13AGS doesn't have a difference between those, if you make the game 60fps by using SetGameSpeed(60), it will also be using 60 ticks.

Thanks eri0o. I thought this was the case, and was very confused when the tick rate didn't change after I used the SetGameSpeed function, hence this post. I have since realized that I was already using that function elsewhere and it was superceding the code I was adding without me realizing that.
#6
Hi guys,

I understand the tick rate for a game loop is 40 times per second. As the frame rate for my game is 60, I'd prefer to change the loop tick rate to 60 per second. Is there a way to do this?
#7
@Crimson Wizard Thanks for all of your insights! Very informative, as always.
#8
@Snarky, @Crimson Wizard, @eri0o:

Well, it seems there were several factors in the animation choppiness you good folks were helping me troubleshoot. I ran through the advice given, and had some interesting findings.

Firstly, I just moved around the mouse to see how the game overall was running. I noticed chopiness there, and after some investigation, I realized that AGS uses a default frame rate limiter of 40 FPS. I find this pretty strange, as most displays (mine included) are 60 hz. I changed the frame limitier to 60 FPS, and noticed a marked improvement in mouse motion clarity and the smoothness of the quick animations used in my dialogue portraits.

The issue was not totally resolved though, as I noticed a very slight stutter on the aforementioned portrait animations. Unexpectedly, this corresponded with a 5ish FPS drop only on the first time the animation ran per game. If I ran the animation again before restarting, it would not effect the frame rate. I tested this by pre-running all game animations on startup, and the frame rate remained clean when running the animations later in the typical gameplay context. This was all in the 4k (overkill, I know) build of the game. I tested again in the 1080p build, and noticed only a 1-2 frame drop during the first animation per game.

Adding to the confusion, for a period of time I noticed that, in the 4k build of the game, running animations for the first time per run would tank the frame rate down to the mid 40s. Testing the same build on subsequent days, I saw the frame rate in the same scenario drop to mid 50s. So I assume that there was some load on my computer that I wasnt aware of at some point, and that probably is what made me notice the frame rate hitches in the first place.

TLDR:
Ultimately, the solution was a combo of increasing frame rate limiter to 60 FPS, dropping the game resolution to 1080p, and my computer seamingly no longer having an unexplained secondary load on it.

A few questions for you guys, if you still have some patience for meL
- Why does AGS default to a 40 FPS limit?
- Why is there a greater frametime impact on the first run of these animations, and is there a way (other than the aforementioned pre-running of animations) to mitigate this?
- Is a 512 mb cache sufficent for 1080p graphics?
- I have been saving the graphics, after editing, via Photoshop 'export as PNG'. Is there a more size/performace optimal way of doing this?
#9
@Snarky, @Crimson Wizard, @eri0o:

I will amass the requested info and files and post here at my first opportunity. Thanks for looking into this.
#10
@Crimson Wizard:

I updated everything to 1080p from 4k, and the animation stutter is persisting. Again, it is only choppy if my dialogue GUI is open while the animation is playing (if I set the GUI to invisible, the animation plays butter smooth).

I was wondering if this is the fault of my dialogue GUI specifically, or if this is an issue AGS has running animations while a GUI is open, so I tested this by making a new and very small GUI consisting of just one button to trigger the animation (the lightest GUI possible). The animation stuttered. Therefor, this is an inherent issue AGS has running animations while any GUI is open.

This seems beyond me to troubleshoot, but I did think of a potential workaround: Is it possible to copy the appearancy of my GUI (buttons, labels, and all), write that onto the background, make the actual GUI invisible, run the animation, then revert the background to its former appearance and make the GUI visible again?
#11
@Crimson Wizard:

I actually have already been using a dummy character for these portraits. I wasn't aware that AGS has a built-in system for character portraits as you implied. I will continue with this method, I just thought I'd check and see if there was a more automated route I could take.

Thanks once again for sharing your knowledge and insights.
#12
Quote from: Khris on Tue 16/01/2024 22:28:52@Custerly Well, properly unlocking the view means after the animation is done, so if you do it right after running a non-blocking animate command then it will indeed produce what you described (i.e. nix the animation).

Animating characters non-blocking during a dialog should work fine in principle; locking the view means that AGS will no longer switch to the appropriate view itself based on what's happening with the character (walking, talking, etc), so as long as it's the same view for all character frames, it's probably safe to call UnlockView() only after the dialog ends.

@Khris:
Here's the code I used:
Code: ags
        c.Animate(1, 1, eOnce, eNoBlock);
        
        c.LockView (3); 
        c.Animate(3, 1, eOnce, eNoBlock);
        c.Animate(0, 1, eOnce, eNoBlock);
I originally did not unlock the view after (this is for a dummy character serving as a charatcer portrait during dialogues, so I don't need AGS to automatically animate this 'character' ever). Using the above code, I see no animation, just the switch from the former view over to view 3 (via [c.LockView (3);]).

If I add in [c.UnlockView (3);] afterwards, the issue remains.

If I enable eblocking, the animations play out, but the game pauses, which I'd hoped to avoid.
#13
@Crimson Wizard:

I will take your advice (and that of others here) and lower the res. Will I need to manually resize all assets, replace the current assets with the smaller ones, redraw all hotspots, re-place all sprites, etc. or is there a way to automate this within AGS?

Also, I want to have character portraits shrink to half size when they are not the current speaker during a conversation, but I want these miniature sprites to retain the ability to animate. Do I need to make new, smaller sprites and also make new views for animations, or is it possible to have AGS shrink down the existing sprites on the fly and thereby utilize the same graphics and animation views directly? I see that I can use DynamicSprite.Resize, but I assume that I won't be able to animate that.
#14
Quote from: Khris on Tue 16/01/2024 17:53:09Resetting a button to displaying text should work by setting its .NormalGraphic to 0, but I haven't tested this.

That is weird, people use non-blocking animations all the time without issue. You do have a frame delay of 1 in your code, but that should still not run the entire animation in a single frame.

One reason would be your game graphics, which I don't think require 4k at all. You have a fairly lowres background, a portrait with visible pixels and even for the font, Full HD should easily suffice.
There is no reason to go for the max resolution unless you actually require that level of detail, especially on a "legacy" engine like AGS.

@Khris: Above, eri0o said "If there's nothing blocking, they will run one after the other, in the same frame, so only the last one should play - or maybe not even that assuming you are properly locking and unlocking the view you want to animate." and that has been my experience when using animations without blocking. Are you sure it can work without blocking?
#15
@Khris:
- To clarify, I do make the buttons invisible during animations (as I observed that reduces the stuttering while not toally eliminating it), but the reason for the transparent background is so that I can have dialogue options displayed to the player without a button graphic being seen. So obviously, turning the buttons invisible is not an option during conversations.
- Whether one loop or 100, the animations are not being displayed during runtime unless there is blocking. They just run through instantly and are inperceptible to the user unless there is blocking.
- Perhaps 4k is excessive, I just didn't previously see a reason not to go for the max resolution.

@Crimson Wizard:
- I see. I will then port everything over to 1080p as suggested. When doing so, is there a way that AGS can automate this transition, or do I need to manually resize all game assets, re-load them into the game, and re-place all sprites and redraw all hotspots?
PS. I have been developing this on a 1080p monitor with no perceptible degredation in quality from AGS downsizingh everything from 4k.
- It is a cutom dialogue GUI made from the ground up. You've helped me in the past with several roadblocks I've run into while building it. It has buttons for up to 9 dialogue options, it has a label displaying dialogue, it has labels showing numbers for each dialogue option visible, it has labels for each speaker in sequence, it has labels floating over buttons to get text wrapping on the buttons.
Here's what it looks like in action (please ignore the nonsense dialogue, it is purely for testing):
https://imgur.com/a/sLqtcYp

Bonus question: Can I have AGS automatically re-size a sprite during runtime? I want to have character portraits shrink to half size when they are not the current speaker during a conversation.
- EDIT: After some Googling, it looks like I want DynamicSprite.Resize right? Will I still be able to animate the new dynamic sprite using the same views as the original?

#16
Thanks @Crimson Wizard, @Matti, & @eri0o: Thanks very much for your input.

@Matti: The code I shared was from a function in the global script (not RepEx).

@Crimson Wizard: To clarify, it is one character animating (1 animation in 1 view, then switches to a 2nd view and runs 2 animations). It needs to be done sequentially obviously, so I guess the fact is that all animations need to run with eblocking enabled and I have to accept that the game will be paused during the animations, correct?

That being the case, if I want multiple animations running simultaneously, the way to achieve that is by having the first animation appearing in the script set to enoblock and the final animation in the script set to eblock, as you said. I understand that now.

I have a bonus issue that I'm wondering if you could weigh on on. When I revert to the original code with eblock enabled, and I run said animation chain via scripting triggered during a conversation (with my custom dialogue GUI open) it stutters noticably. When I run the same animation chain outside of dialogue via clicking on a hotspot, it runs butter smooth. After poking around a bit, I noticed that if I set all of the dialogue GUI buttons to invisible during the animations, it runs smoother (though still not as smooth as when the animations are triggered outside of the dialogue GUI). The game res is 4k, the sprite animating is 1024x1024, and those buttons all have needlessly large transparent PNGs as their background images (so I can have invisible buttons), but I can see no reason why those factors should be burdening the system so much as to produce noticable stuttering in a simple 2d animation. I am running this in a 3-year old low end Dell laptop that I'd think should be more than capable of handling it. Any ideas of things I may be doing wrong?
#17
Hi all,

When animating a sprite, I initially used this code:
Code: ags
        c.Animate(1, 1);
        
        c.LockView (3); 
        c.Animate(3, 1);
        c.Animate(0, 1);
... but I found that the game was paused during the animation (due to eblock being enabled by default). I figured this would become an issue when I want to have multiple animations running simultaneously, so I updated the code like this:
Code: ags
        c.Animate(1, 1, eOnce, eNoBlock);
        
        c.LockView (3); 
        c.Animate(3, 1, eOnce, eNoBlock);
        c.Animate(0, 1, eOnce, eNoBlock);
... which brings about a new issue: the animations now seem to be skipping through all of the frames instantly, as it jumps right from the starting frame to the ending frame with nothing perceptible in between. I slowed this down by inserting [Display ("blah"];] after each animation line, and that showed that each animation is indeed queing up, and then playing instantly without actually appearing to animate from the user's perspective.

Am I doing something wrong?
#18
Thanks a bunch @Crimson Wizard. I didn't know they were called global arrays, so I couldn't find them in the AGS manual.

If there's ever anything I can do to return the favor for all of the help you've provided me over the past few weeks/months, please let me know.
#19
Hi all,

I want to be able to move a dynamic selection of characters by their ID to a certain room via scripting.

In the past, I did this with labels using this code
Code: ags
for (int i = 0;  i < gDialogue.ControlCount;  i++)
{
  Label *theLabel = gDialogue.Controls[i].AsLabel;
  ...
so I am hoping there is a way to do something similar, but with characters.
#20
Thanks @Crimson Wizard for the module suggestion. I may look into that, though I think I can get by without it since I don't need a tonne of timers.

Regarding the first part of my post, is it so that I will need to essentially place the remainder of my dialogue GUI code after [ if (IsTimerExpired(1)) ] in order to ensure it does not run until the timer expires?

EDIT:
No worries, I figured out a solution to the question posed in the first part of my original post.
SMF spam blocked by CleanTalk