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

#281
Haha! It works man!

Yoo-sow-goud  ;D
#282
Ok this is cool, I'll test it out and let you know what happens!

Thnx :)
#283
Hey Monkey,

Great module! I have another question (maybe this one doesnt make sense either):

When I have a blocking script running (like "Say", for example), my wait cursor animates no problems. However, Ive noticed if I use the GUIAnimation's "animate" with "eBlock", I will see my wait cursor, but that cursor doesnt get animated.

Do I need to do this manually, is it something we can fix in the module, or am I not doing something right/not understanding correctly?
#284
Ok well I decided to pre-load my sprites onto a "gLoadSprites" gui instead...and it works better than if it was on an object (plus I can place that gui in any room I want/creating it only once + setting its transparency to 100).

Ill let the other solutions go for now.

Thanks for your help!!
#285
Exactly as shown.

I did some further tests and noticed it works for me only if I select in the setup settings "downgrade 32-bit to 16-bit".

**EDIT: So I guess this doesnt work for 32-bit alpha sprites?
#286
Hi mode7,

Ok well I tried the new version, still get that pesky memory error (but with a different number after the "PP" )-->

Code: ags
Error: Out of memory: failed to allocate 2055200 bytes (at PP=1101)

#287
Hi Zetsaika,

Thats a good idea. I checked but its already set at the current maximum, 100mb.

Do you think we can change the maximum amount of the sprite cache to something much bigger than 100mb? (like a feature request?) If so, well I post in the appropriate thread!
#288
@ Mazoliin: Oh I forgot to mention I did replace the number 3000 to 3436, but I made a typo, it was actually 3463...so that's why I was getting that error :P

Well we're almost there, it seems to run after the room load, just I get an out of memory error now right after this line is displayed-->Display("%d sprites written", spritescount);

Code: ags

Error: Out of memory: failed to allocate 2055200 bytes (at PP=6)
#289
ok, well I got it all setup, however I am getting a crash error due to the number of sprites in "ViewFrame *SpritesData[3000]"

Error running function 'room_AfterFadeIn': Array index out of bounds (index: 3000, bounds: 0..2999)

**ps: I currently have 3436 sprites.

**EDIT: I did GarageGothic's method. I set the object's transparency to 100 to make it invisible and assigned+animated (one by one)  the heavy views after the room loads...all of them eBlock (so each one plays fully one after the other). It seems to me (unless Im wrong) that there isnt any noticeable speed improvement after those animations have been played on that invisible object.
#290
Ok, Ill try that tonight and post the results here. I currently have around 3800 sprites, so Ill test it to see if I can change the number in your script to that amount.

Thnx for the help mode7, its appreciated!
#291
Hi mode7!

Hmm, well I dont think I would want to lose the functions, like Animate, haha! Is there a way to create a dynamic sprite array without losing the built-in functions?

I'll continue checking the various threads/help manual and try to find some obscure solution hidden away somewhere...if I find something I'll post it here.

The 1st time I tried GarageGothic's solution was quite a while ago, and I didnt get positive results...however I think I'll regive it a go and see what I come up with.
#292
QuoteEsc may not work if Photoshop is open. Photoshop has a known issue in Win7 where it catches the escape key

wow, didnt know that...we should check that out!
#293
Im currently creating a game with win 7 x64, so far no probs.

For the esc problem sometimes not working as you mentionned, I get the same thing...sometimes its as if AGS doesnt capture the esc key or something.
#294
Ok, I solved it! I was missing a 2nd bool. Here is the code for those who want to do something similar:
Code: ags

bool bRolledOver = false;
function repeatedly_execute_always() 
{
  GUIControl*gc = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
  if (gc == bTest) 
  {
    if (!bRollOverBtnAnim) 
    {
      bTest.Animate(VCRL_ROLLOVERS, 0, 1, eOnce);
      bRollOverBtnAnim = true;
      bRolledOver = true;
    }
  }
  else if (gc != bTest)
  {
    if (bRolledOver)
    {
      //Display("Rolled Over...and no longer over button: play 2nd animation");
      bTest.Animate(VCRL_ROLLOVERS, 1, 1, eOnce);
      bRolledOver = false;
      bRollOverBtnAnim = false;
    }
  }  
}

#295
Hi,

I based this script on what Khris suggested in this thread: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=43755.0

Code: ags

function repeatedly_execute_always() 
{
  GUIControl*gc = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
  if (gc == bTest) 
  {
    if (!bRollOverBtnAnim) 
    {
      bTest.Animate(VCRL_ROLLOVERS, 0, 1, eOnce);
      bRollOverBtnAnim = true;
    }
  }
  else if (gc != bTest)
  {
    bTest.Animate(VCRL_ROLLOVERS, 1, 1, eOnce);  // this animation doesnt play at all when the mouse leaves the button
    if (bTest.NormalGraphic != 2752) bTest.NormalGraphic = 2752;
    bRollOverBtnAnim = false; 
  }  
}


What Im trying to do is when the mouse is over a certain button, it plays an animation once. As soon as it leaves the button (no longer over it), it plays another animation, then returns to its normal graphic.

The 1st animation plays OK, but when my mouse is no longer on the button, that 2nd animation doesnt play at all.

What did I do wrong?
#296
I found a relatively old thread about pre-loading sprites into memory: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=39487.0

I was wondering, how can I pre-load all the game sprites efficiently the moment the player presses either the "start new game" or "continue game" button from the main menu?

GarageGothic suggests in the thread posted above:
QuoteYou could play the animation on an invisible object first, then the sprites should be preloaded in memory for when you actually need them.  

Is this a good way to do it? Or is there a better way? I have some very heavy animations for some full-screen effects (1024x768) and the firt time around, those animations lag...but once they've been played once + loaded, they run quite smoothly.

I'd add a  "loading bar" aswell to show the progress of each sprite/animation views being loaded into memory...so that way the player only needs to load everything once, at the beginning.

Im sure its doable, only Im not too sure how, or the best way to load them without the player seeing anything. I think* I can figure out the loading bar myself though...we'll see!
:P
#297
Hey Snarky,

Those are good ideas, I added a check if the mouse exits the window from the top right corner...that way players dont need to struggle to exit the window + close it while "drunk".
#298
lol! It works so nice! Haha, man, as soon as I tested it out, it does EXACTLY what I was looking for!

Sigh, I wish I had your skills...

Thnx Khris!
;D
#299
Hi guys,

This is a pretty old thread, however I was starting to work on my game after a pretty big break of not doing much, and I must admit: Im not getting very far in this area! I can get my mouse to move randomly, but without being inside a "set path" that follows a lemniscate so it mimicks a "drunken mouse".

I guess I will wave my white flag and surrender.  :'(

Any help would be more than appreciated!
#300
Does anyone have a theory as to why the edges seem "blocky" while drawing the line, when the sprite being used to draw with has semi-transparentcy on its edges (its a spot with faded/blurred halo).

Im guessing cause the sprite gets redrawn over and over as you make a line, so the semi-transparent part gets added to itself, making it opaque?
SMF spam blocked by CleanTalk