View Loops not showing

Started by SilverSpook, Sat 26/03/2022 05:06:32

Previous topic - Next topic

SilverSpook

Hi, I'm having a weird problem where suddenly I can't see any of the loops in a view past Loop 279? It seems to have just started where I can create new loops, and I can see the new loops' animations, (like 281, 290, etc) but once I close AGS and re-open, all loops past 279 are invisible again. Any idea what might cause this?


Crimson Wizard

#1
That's just a guess, but it could be a limitation of the .NET control, because each loop is represented as a child control within a larger panel. Maybe it cannot make more, or cannot position them further. You may already notice there's something wrong with the "Create new frame" button on the last loop - it's shifted up relatively to the frames, compared to others.

We may do some experiments or research to find out, but in any case, you probably could split this view into multiple ones?


PS. opened a ticket regarding possible optimization to the view editor, that may prevent this:
https://github.com/adventuregamestudio/ags/issues/1588

SilverSpook

Ok thanks for the info and opening the ticket. I will try making a new view for now.

Here's an update: I can make new loops, which appear properly, and I can even add frames. But everything after 279 remains invisible. If I close and open the program again, everything after loops 279 is invisible, except the brand new loops made.


Cassiebsg

 :shocked: Sorry, never seen so many loops in one view.  (laugh)
Any reason you're keeping it in a single view? I find it easier to have views with a single loop for each animation (if they don't have multiple view angles, than keeping track of multiple different animations in a single view). Cause I rather type vGuyExplodes, vGuyDies, vGuyCrawls, etc...than remembering that's loop 20, and the other is loop 100, and then next is loop 5...   (laugh)
There are those who believe that life here began out there...

SilverSpook

Quote from: Cassiebsg on Sat 26/03/2022 18:43:06
:shocked: Sorry, never seen so many loops in one view.  (laugh)
Any reason you're keeping it in a single view? I find it easier to have views with a single loop for each animation (if they don't have multiple view angles, than keeping track of multiple different animations in a single view). Cause I rather type vGuyExplodes, vGuyDies, vGuyCrawls, etc...than remembering that's loop 20, and the other is loop 100, and then next is loop 5...   (laugh)

I've been having character animations in one view cause it seemed like less total code to have one view with the main walking animation loops, plus all the other actions, rather than having to use 'ChangeView()' to play a door open animation, 'Animate()', and then 'ChangeView()' back to the walking character view.

Snarky

Yeah, the AGS API for this (common!) use case is clunkyâ€"though you're meant to use LockView() rather than ChangeView(), but that's pretty easy to remedy:

Code: ags
// Header
import void AnimateView(this Character*, int view, int loop, int delay, RepeatStyle repeatStyle=eOnce, BlockingStyle blockingStyle=eBlock, Direction direction=eForwards);

// Script
void AnimateView(this Character*, int view, int loop, int delay, RepeatStyle repeatStyle, BlockingStyle blockingStyle, Direction direction)
{
  this.LockView(view);
  this.Animate(loop, delay, repeatStyle, blockingStyle, direction);
  this.UnlockView();
}

SMF spam blocked by CleanTalk