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

#461
WOW!

I was NOT expecting something of this high-quality, holy geeze! haha, man...!

Well, thanks a lot again, its absolutely perfect!  :)
#462
Ok well I had A LOT of fun screwing around with your code Wyz! Heheh...drawing the mouse's cursor everywhere onto the background for the hell of it is quite addictive :P

Ok, well I got to the point where (in rep_exec) with mouse movement, I have a bit of a wiggle with randomness around the cursor, and it draws on the background OK...step 1 is done :)

Code: ags

  //this will draw cursor onto background with mouse movement
  CursorMode mode = mouse.Mode;
  int iSprite = mouse.GetModeGraphic(mode);
  surface = Room.GetDrawingSurfaceForBackground();
  int iRandX = RandomBoundries(-20, 20);
  int iRandY = RandomBoundries(0, 40);
  surface.BrushLine(mouse.x+iRandX , mouse.y+iRandY, mouse.x, mouse.y, iSprite, 4.0);
  surface.Release();


For step 2, I was thinking I create a 200x200 gui named "gTrailGuiZone" (that frames the mouse cursor to give enough space for the trail) with a dynamic sprite as its background image, and that gui follows the mouse. Then, I can grab that 200x200 zone around the mouse, draw the trail onto it with Wyz's script and fade out each time so that after x loops, the trail dies off (and regenerates itself until the effect is turned off). The problem with my above code is that it draws onto the background so the cursor trail will show up behind characters and objects...it would be great to draw on top of that, so Im guessing we'd need to do a partial screen-grab of the "gTrailGuiZone" within the bounderies (mouse.x - 200, mouse.x + 200, mouse.y - 200, mouse.y + 200 ) and paste that into its dynamic sprite.

This, I admit, is beyond my limited beginner skills!

So, uh, yeah Calin, rustle it up bay-bayh!
;D
#463
The more I read this thread the more I hope it DOES go open source...people like Khris, Monkey, Calin, GarageGothic, Wyz, Tzachs, Abstauber, RyanTimothy (and many others) etc...could reaaally make AGS even more pwerful, which, in turn, would make better, more awesomer* games!

*awesome + awesome = awesomer:
http://www.youtube.com/watch?v=w355PoLomwE
#464
Oh wow, so many options...cool!  :D

Ok,well I look into all of those to see what I can come up with...if Im still stuck Ill let you guys know :P

#465
Ok, I found these threads but it didnt quite answer what Im searching for:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=40332.0
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=35864.0
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=11100.0

Is it possible (and not too laggy) to create a mouse trail effect "on the fly" with whatever the current mouse cursor graphic is? Im guessing the best and fastest way is with dynamic sprites, right? Is there any way I can do this without creating characters that follow the mouse? Id rather not create multiple individual characters or gui's for the trail effect (if possible).

I thought maybe have a timer + store the mouse cursor's position and then redraw the 4 trail cursors "1,2,3,4" at the main cursor's previous position "x" loops ago + then fading out that dynamic sprite x loops later...(and off-setting each trail graphic with different x or y values + opacities, depending on the mouse's direction)?

Im guessing (without trying it just yet) it might be too much...I have a tendency to over-complicate things, anyone have a simpler idea?
#466
I would suggest you get some dedicated programmers to help you fix bugs and add features...and if you need money to get that done, start charging...or atleast accept donations to help pay for programmers? Id pay for AGS + updates...I love this program, and the community!

Just dont let it die  :P
#467
Yup, perfect!

Saved (no kidding) approx 400 sprites (40 sprites x 10 modes) :)
#468
Awesome...placed it to non-clickable and it works!

Is there a way to "query" the current mouseMode's hotspot? Im aware of HotspotX and HotspotY...but it seems there is only "ChangeModeHotspot"...and not "GetModeHotspot" (for X and Y)...how could one get this information?

Actually, what would be better is how to get the real center of the current cursor mode's sprite with the SpriteWidth + SpriteHeight commands?
#469
Ok, well I decided to create a GUI under the cursor for starters, to see if this works first before trying your 2nd suggestion (the dynamic drawing).

What I have now (to test) is my gui becomes visible when the cursor is over an object, hotspot or character...if that gui is visible, animate it (the storm loop view). I commented out the part where I update the gui's coordinates to take the current position of the mouse cursor because its acting "buggy" with those lines...it updates over and over again making that gui flicker...

...how should I update the coordinates of the GUI so its always under the mouse cursor without having it buggout? (For example, with those 2 lines I can no longer right-click to switch mouse modes, and I have a label that no longer updates its text to tell me what my mouse is over)...Im not sure how to do this part.

REP EXEC:
Code: ags
  
if (mouse.Mode == eModeLookat || mouse.Mode == eModeInteract || mouse.Mode == eModeQuestion || mouse.Mode == eModeCommand)
  {
    if (locType != eLocationNothing)
    {
      //move GUI to cursor position
      //if (gCursorStorm.X != mouse.x) gCursorStorm.X = mouse.x;
      //if (gCursorStorm.Y != mouse.y) gCursorStorm.Y = mouse.y;
      if (gCursorStorm.Visible == false) gCursorStorm.Visible = true;
    }
    else
    {
      if (gCursorStorm.Visible == true) gCursorStorm.Visible = false;
    }
  }
  if (gCursorStorm.Visible && !gCursorStorm.IsAnimating())
  {
    gCursorStorm.LockView(75);
    gCursorStorm.Animate(0, 5, eRepeat, eNoBlock);
  }
  else if (!gCursorStorm.Visible && gIconbar.IsAnimating()) gCursorStorm.UnlockView(false);  
#470
hmm ok, I think Ill go with the 2nd option aswell...although your idea to use a GUI under the cursor sounds way way easier...I think Ill try that too, just to see :P

Ill see what I can do!

thanks GarageGothic (again) :)
#471
Ive been doing an optimization pass recently on various things, and one of them I put on my "to-do" list consists of optimizing the way my cursor highlight system uses sprites.

Right now when my cursor is over an object, character or hotspot, it will play an animation from a view that loops. Ive made a different view for each cursor type, and now realize I could save sprite room if I just drew that animation under the current cursor's sprite. The current sprite also has a small animation, but its timing is different than the animation that is underneath...for example:

The look cursor gets a small animation of the eye blinking, while underneath that cursor there is a looping animation of a "storm cloud" moving/swirling around.

Ive got a vague idea how I can manage to just use 1 view of the looped cloud anim for every possible cursor I might have, even to be used for any inventory item aswell! (That would save me loads of views, sprites, and time!)

Could someone perhaps give me a nudge in the right direction? :)
#472
Khris's solution works perfectly, I tested it out (not actually using it in my own game, but sounded awesome I wanted to test it out!) heheh...
#473
ok cool Im going to try that tomorrow morning!

**It works!

thanks :)
#474
What reason are you using the hypertext module for? If its to create a speech bubble, you can do it with a normal text window gui...Im not sure if this can help but you can modify the bottom left-hand or the bottom-right-hand textwindow's sprite to be the bubble's "arrow" depending on what side the character's portrait image is...so if the speech portrait pops up on the right you modify the bottom right-hand sprite of the textwindow so the "arrow" of the bubble points to the character's portrait... wait...are you using the Sierra speech style?
#475
I looked up the textWindow properties and I could only seem to find background image, but nothing for the specific corner sprites...

How could I change a corner's bottom left-hand or right-hand graphic (in my case ID 1 or ID 3) with a script?

I could just create a new textWindow GUI with the appropriate sprites...but I wanted to know if it can be done by just switching the id's graphic.

Something like :
Code: ags

void processBubbleSide(string sSide)
{
  if (sSide == "Left") gTextWindow.TextWindowEdgeGraphic(1) = 45;
  else if (sSide == "Right") gTextWindow.TextWindowEdgeGraphic(3) = 46;
}


The number in the parenthesis would be the TextWindowEdge's ID (1 is bottom left corner, 3 is the bottom-right corner)

This will enable me to have a bubble-arrow on the appropriate side depending on where the character's portrait shows up.

ps: If this isnt possible, Ill just make a 2nd textWindow gui and switch between the 2 gui's instead :P
#476
Wow! Its really good to know then...thanks for doing that, I was going to test that out today actually :P

Sauce-sem!
#477
Alright, I just wanted to be sure I understand a bit more on how AGS processes the transparency.

Well thanks guys for your information, it helps!
#478
ok so the png alpha is converted into pink so a bmp you import with pink as trasnparent is the same as a png you import using its alpha...?

...meaning AGS wont draw one version "faster" than the other, right?
#479
Hey Monkey!

Oh yeah I still use those...just would be nice to be able to use as many controls you want on gui's without resorting to work-arounds!
#480
Hi guys,

Well I was wondering if there was any difference for AGS displaying a sprite using magic pink for transparency vesus a png image using its alpha channel for transparency.

Im guessing it would be "faster" for AGS to draw the transparency with the magic pink, am I right?

If so, then does that mean for a fullscreen effect (a view with 20+ frames, 1024x768) with lots of areas that are transparent, its better to use magic pink for the transparency rather than have a huge png with the alpha channel making the transparency...right?

...or does this "not matter" since today's computers are good enough that the speed difference is negligeable...
SMF spam blocked by CleanTalk