The Daily Click ::. Forums ::. Digital Works ::. Squirrel Animation - hE WiLL pRoD yOU!!
 

Post Reply  Post Oekaki 
 

Posted By Message

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
7th March, 2008 at 17:36:03 -

Image

Image

Animated squirrel, for a platformer.

When he's finished, his NPC should have the following behaviours:
-Spot the player when onscreen and has line of sight
-Jump down short distances to chase the player
-Screech to a halt if an edge is too high
-Possibly jump small gaps
-PROD YOU WITH THE POINTY STICK OF DOOM!!
-Twitch tail

Thoughts? I think he priddy

 
191 / 9999 * 7 + 191 * 7

Tim

I'm on here way too much

Registered
  25/08/2006
Points
  132

You've Been Circy'd!Clickzine StaffSilverNova MemberVIP MemberTurtle Power!Evil klikerWii OwnerHero of TimeGhostbuster!Pokemon Ball!
7th March, 2008 at 17:45:53 -

LOL!! that's awesome dines

I love how his tail moves too! hehe

 
http://www.SilverNova.co.uk


Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
7th March, 2008 at 17:46:44 -

coolio!!!

i dont like his outfit

give him a robin hood hat instead!

Image Edited by the Author.

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
7th March, 2008 at 18:04:04 -

Aww, little chargin' squirril

 
Image

Tell 'em Babs is 'ere...

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
7th March, 2008 at 20:05:04 -

looks nice,
But i always find if you use colours too close to each other they're barely noticeable. See the feather? when it's small you can't see the line in the middle, and the small shadow below his hand, can't see it either.

Personally I would darken any shadows and make features clearer if they're seen in a window at desktop resolution.

 
.

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
7th March, 2008 at 20:07:32 -

his left eye also makes him look retarted lol. unless that was intentional.

 
n/a

machrider



Registered
  25/06/2006
Points
  121
7th March, 2008 at 20:27:23 -

Nice pimp hat.

 
n/a

Deleted User
7th March, 2008 at 20:40:30 -


Originally Posted by I am AndyUK (honest)
looks nice,
But i always find if you use colours too close to each other they're barely noticeable. See the feather? when it's small you can't see the line in the middle, and the small shadow below his hand, can't see it either.

Personally I would darken any shadows and make features clearer if they're seen in a window at desktop resolution.



Mmm, it's not like the 2-bit days when all colours contrasted super well, people don't always want every object to be bright orange with black hands to stand out against the green backdrop. I don't know why I'm saying this but it looks offensive now so YOU BETTER BE HURT INSIDE.

 

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
7th March, 2008 at 20:45:57 -

I like the close colours. The feather has a nice subtle effect to it.

Good anim!

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
7th March, 2008 at 22:15:02 -


Originally Posted by Is it Bill Bailey?

Originally Posted by I am AndyUK (honest)
looks nice,
But i always find if you use colours too close to each other they're barely noticeable. See the feather? when it's small you can't see the line in the middle, and the small shadow below his hand, can't see it either.

Personally I would darken any shadows and make features clearer if they're seen in a window at desktop resolution.



Mmm, it's not like the 2-bit days when all colours contrasted super well, people don't always want every object to be bright orange with black hands to stand out against the green backdrop. I don't know why I'm saying this but it looks offensive now so YOU BETTER BE HURT INSIDE.



Do you even have a point?

My suggestion is a personal preference towards pixel graphics. I'm talking about small details being noticable on the sprite itself as apposed to contrasting with the background. That would only really apply to 16 bit and beyond or the more colourful 8 bit machines.

NOW GO AND MAKE MY EDITOR!

 
.

Xhunterko



Registered
  07/05/2003
Points
  1015

VIP MemberHas Donated, Thank You!Hasslevania 2!Pokemon Ball!
7th March, 2008 at 23:44:13 -

EHEM. Actually, i'm a bit curious as to know how you intend to simulate the intelligence you plan on giving it. That's more then just a two edge detector plan there. Are they going to have their own detector system? I'm not familiar with 'new' code principles, but i assume your using the platform object? I would probly do it this way. Make a 6 detector movement for the enemy.

Give it the top, sides, a body maybe, and two feet corner detectors. Give them all id vals and either create each one at the squirrel, or give each squirrel their own detectors at start. Then, I would make the left and right wall detectors for wall checks. And the corner feet detectors (._. the periods) edge detectors. The feet detectors would tell it to turn on edges or jump.

Or I would have an edge placer on each edge and have it check to jump that way. Then, for getting close to the player, i'd have another long detector for checking distance. That's what i would do anyway

 
All platforming problems can be mostly solved here:

http://www.clickteam.com/mbfiles2/277308-engine.zip
http://www.angelfire.com/games5/psywakd/platform.gam
www.zephni.com

These are very excellent examples by other people and are very informative.
Image

I work at the speed of "maybe".

Coming Soon: Diary Of An Indie Developer
http://www.youtube.com/watch?v=XaF6H9MrgH8

Twitter:
http://twitter.com/xhunterko

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
8th March, 2008 at 02:41:28 -

Very nice, although I would say that I think the STICK OF DOOM should move up and down as he runs

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
8th March, 2008 at 09:27:43 -


Originally Posted by Xhunterko
EHEM. Actually, i'm a bit curious as to know how you intend to simulate the intelligence you plan on giving it. That's more then just a two edge detector plan there. Are they going to have their own detector system? I'm not familiar with 'new' code principles, but i assume your using the platform object? I would probly do it this way. Make a 6 detector movement for the enemy.

Give it the top, sides, a body maybe, and two feet corner detectors. Give them all id vals and either create each one at the squirrel, or give each squirrel their own detectors at start. Then, I would make the left and right wall detectors for wall checks. And the corner feet detectors (._. the periods) edge detectors. The feet detectors would tell it to turn on edges or jump.

Or I would have an edge placer on each edge and have it check to jump that way. Then, for getting close to the player, i'd have another long detector for checking distance. That's what i would do anyway



That should be quite simple in theory,
line of sight should be possible by testing X and Y position relative to the player.

and you can use one detector for wall collisions, or even none if you're smarter than me (maybe using the collision hack Podunkian wrote an article on?)

dunno about edge detection though.

 
.

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
8th March, 2008 at 09:44:18 -

Small squirrel, or big squirrel?

There's only one way to settle this!

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
8th March, 2008 at 11:29:58 -

FIIIIIGGGHT!

omg it's on soon... can't wait

 
n/a

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
8th March, 2008 at 11:45:31 -

Lol. Yeah, I personally thought the stick of doomness looked better still, but I may alter it

His clothes are the way they are cos the squirrels are supposed to be vicious natives. They're gonna have lots of different types of squirrel, so any ideas would be appreciated!

Thanks for all the comments

The AI shouldn't be too tricky. The way I'm gonna approach it is this:

One detector object, with several different animations inside it. As it needs to detect different things, it changes the animation. EG:

//Checking edge
Always
--- Set anim to EDGE DETECTOR

Detector overlaps obstacle
--- Squirrel: Set 'Is at Edge' to YES

//Checking normal obstacles
Always
--- Set anim to NORMAL DETECTOR


See? It just keeps changing to detect different shapes in different places. In addition, the detector can move around. So for instance, I can check if the squirrel overlaps player and is playing "Running" animation, and then place the detector over the action point (the point of the arrow) and change its animation to an arrow detector. If the player also overlaps the detector in this position, then he's been skewered!

For edge detection, we use an animation in this shape:

                 SS

SS
000 #######################
000 #######################
#######################


# = floor/obstacle
0 = detector
S = squirrel


The squirrel moves its detector a few pixels in front, ready to check for any edges. If it overlaps an obstacle, the result is ignored. But if it doesn't, the squirrel can worry, because it means there's a big gap approaching!

When this situation is found, he'll run a fastloop in which the detector drops, checking just how deep this gap is. If it's deeper than a certain amount, the loop stops and the Squirrel senses a dangerous edge. If it hits an obstacle not too far down, it senses a non-dangerous edge.

When it comes to decision making, the squirrel will screech to a halt at dangerous edges, but drop down at non-dangerous edges.

This use of altering and moving the same detector forms the basis of almost every bad guy in the game. And just to keep framerate up, it carefully selects which tests to run, based on which squirrels are near the screen. So a squirrel offscreen won't even move, so no edge detection or colision detection needed.

That's how it should work anyway

 
191 / 9999 * 7 + 191 * 7

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
8th March, 2008 at 18:21:38 -


Originally Posted by I am AndyUK (honest)

dunno about edge detection though.



You can do something like:

Always set X pos to X pos + Width
Always set Y pos to Y pos + Height
If squirrel isn't overlapping the ground then he's at an edge
Always set X pos to Xpos - Width
Always set Y pos to Y pos - Height

Always set X pos to X pos - Width
Always set Y pos to Y pos - Height
If squirrel isn't overlapping the ground then he's at an edge
Always set X pos to Xpos + Width
Always set Y pos to Y pos + Height

Though width and height might have to be divided by 2 or something.

EDIT: lol Dines posted at the same time as me.


Image Edited by the Author.

 
Image
http://bfollington.tumblr.com

Xhunterko



Registered
  07/05/2003
Points
  1015

VIP MemberHas Donated, Thank You!Hasslevania 2!Pokemon Ball!
8th March, 2008 at 18:28:39 -

I think there's a small problem with that method dines. I've looked at several methods here in tuts and have always found the same issue with every single one of them. They don't handle fast scrolling very well, they just slip off the screen. Try one and you'll see. But, about that, if you can do it well, you shouldn't have any problems. I think.

 
All platforming problems can be mostly solved here:

http://www.clickteam.com/mbfiles2/277308-engine.zip
http://www.angelfire.com/games5/psywakd/platform.gam
www.zephni.com

These are very excellent examples by other people and are very informative.
Image

I work at the speed of "maybe".

Coming Soon: Diary Of An Indie Developer
http://www.youtube.com/watch?v=XaF6H9MrgH8

Twitter:
http://twitter.com/xhunterko

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
9th March, 2008 at 13:23:45 -

What do you mean by fast scrolling? I've never encountered that issue before.

What it basically does is, it tests all these different things, then draws the frame. It makes sure it only executes on squirrels who're near the screen or onscreen, so squirrels who're offscreen will kind of pause.

It should be okay, in theory.

 
191 / 9999 * 7 + 191 * 7

Xhunterko



Registered
  07/05/2003
Points
  1015

VIP MemberHas Donated, Thank You!Hasslevania 2!Pokemon Ball!
11th March, 2008 at 00:17:25 -

Well, okay, here goes. Here's an example of not handling fast scrolling. When i download tutorials and engines, I always test the scrolling. There was an example of a guy showing how he did the ai of a particular game. It only fit on one screen and it worked really well. The ai moved up stairs and jumped over pits like the player would. So i increased the frame size, doubled the level and then ran the game with the scroll bars on the bottom and the sides. The scroll bars represented a fast moving player. When i moved these quickly, then came back to the game play, the ai was no longer there. What happened was, the fast scrolling speed somehow messed up with the ai logics and messed up the detector collision system. Thus, i knew that that ai would not work for a game type like shooters and the like. Thats what i mean. Sorry if i dont make sense.

 
All platforming problems can be mostly solved here:

http://www.clickteam.com/mbfiles2/277308-engine.zip
http://www.angelfire.com/games5/psywakd/platform.gam
www.zephni.com

These are very excellent examples by other people and are very informative.
Image

I work at the speed of "maybe".

Coming Soon: Diary Of An Indie Developer
http://www.youtube.com/watch?v=XaF6H9MrgH8

Twitter:
http://twitter.com/xhunterko

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
11th March, 2008 at 02:41:51 -

You shouldn't have problems when using scrolling. I use a method like Dines does for detector, it works a treat.

 
n/a

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
11th March, 2008 at 09:15:54 -

I think what happened in that case wasn't a scrolling problem per se. It's due to the fact that, to run quick, MMF switches off certain processes if they're far from the screen.

So sometimes the AI will fall thru the floor if he's too far away, or even get deleted completely.

You can prevent it by changing the object's properties to 'Don't inactivate when too far from window' and 'don't destroy when too far from window'

I found that the hard way a while back, lol.

 
191 / 9999 * 7 + 191 * 7

Xhunterko



Registered
  07/05/2003
Points
  1015

VIP MemberHas Donated, Thank You!Hasslevania 2!Pokemon Ball!
20th March, 2008 at 00:35:14 -

say hello to the dumb noob here then, lol.

 
All platforming problems can be mostly solved here:

http://www.clickteam.com/mbfiles2/277308-engine.zip
http://www.angelfire.com/games5/psywakd/platform.gam
www.zephni.com

These are very excellent examples by other people and are very informative.
Image

I work at the speed of "maybe".

Coming Soon: Diary Of An Indie Developer
http://www.youtube.com/watch?v=XaF6H9MrgH8

Twitter:
http://twitter.com/xhunterko
   

Post Reply



 



Advertisement

Worth A Click