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
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.
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.
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.
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:
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?)
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.
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.
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:
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.
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:
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'