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.


Messages - jdkilby

Pages: 1
1
Paid Work / Re: Behavior Icon Request: Mouse Follow
« on: July 14, 2011, 08:31:43 pm »
I'd still like to finish the prototype I started way back when... hope to find some time soon to do that.

2
Shared Resources / Re: Behavior: Mouse Follow
« on: July 13, 2011, 08:42:05 pm »
Sorry for the late replies...

Thanks epic and carroll!

Silux: I'm not sure I understand what you want to do. Are you saying you want an Actor to take some fixed number of seconds to travel between its current location and where the mouse cursor is located?

3
Paid Work / Re: Behavior Icon Request: Mouse Follow
« on: July 13, 2011, 08:29:19 pm »
Hey Rob,

Sorry for disappearing on you - it's been a busy month for me!

That's perfect. I updated it on the Forge. Thanks for the graphic!

4
Paid Work / Re: Behavior Icon Request: Mouse Follow
« on: June 06, 2011, 08:40:04 am »
Thanks, Rob! The link doesn't work for me though (I get a 403 forbidden error).

5
Paid Work / Re: Behavior Icon Request: Mouse Follow
« on: June 03, 2011, 10:42:10 am »
I assume you are talking about the behavior "Move Toward Mouse"?

If so, there are two key differences in my Behavior versus that one:

1) "Mouse Follow" puts a bit of "lag" on the animation so that it has a "catch-up effect" (it slows down as it reaches the destination, the mouse cursor). "Move Toward Mouse" uses a constant speed.

2) "Mouse Toward Mouse" rotates the Actor; "Mouse Follow" does not.

Perhaps I need a better name to make the difference clear?

Anyways, I built this for a game prototype I'm making - I didn't set out specifically to create this behavior. I figure it's better to share than to keep all the code locked away in the archives, right? :)

6
Paid Work / Behavior Icon Request: Mouse Follow
« on: June 03, 2011, 09:23:40 am »
I just posted about a new Behavior I created called Mouse Follow.

Would anyone be willing to create an icon for it? It doesn't have to be anything extraoridinary - just something to communicate that it allows an Actor to follow a mouse cursor.

Maybe something like a mouse or mouse cursor with some trailing lines to indicate motion? Or some sort of graphic or character chasing after a mouse cursor? I'm open to ideas.

7
Shared Resources / Behavior: Mouse Follow
« on: June 03, 2011, 09:15:41 am »
I'm currently working on my first game prototype in Stencyl and thought I'd share my first Behavior of real substance.

When attached to an Actor, the Mouse Follow behavior causes the actor to... well, move to the mouse cursor. The difference is that it adds a "lag" effect so that it isn't just a one-to-one movement of the Actor to the location of the mouse cursor.

The further away the Actor is from the mouse cursor, the faster it moves toward the cursor.

You can set the maximum distance and maximum speed for each axis (the position adjustments are performed individually on each axis). When the Actor is at the maximum distance or greater from the mouse cursor, it moves at the maximum speed.

If you decide to set the maximum speed greater than the maximum distance, the Actor will follow the mouse cursor one-to-one. This is not recommended because this could be done much more simply and efficiently with just a couple of blocks.

Lastly, if you look at the code, you'll see that this Behavior does not use the built-in speed / velocity variables for Actors. I found the performance to be better when I handled calculating and maintaining these variables myself.

It's on the StencylForge... feedback and suggestions are welcome!

Pages: 1