Character Collision (AT APHRO)

8 replies [Last post]
Posts: 454
CP: 0

Hey,

So for topdown Collision is a MUST.

For Sidescrollers, it is quite likely that some games do want collision.
(you cant run through enemies in every sidescroller.
Some may have shields on their backs you can jump onto etc.)

My project is topdown,
and latest when you test topdown with the topdown AI,
its hell.
The enemies are shaking around wildly inside your body O_o

I post the most embarrising questions here Laughing out loud

Thanks for all your nice replies (I know I would be annoyed by myself slightly Laughing out loud)

Posts: 1647
CP: 26119

Collision detection already exists between any two entities. Its the same event no matter what the entity type is. Walls just have a special handling to "push away" any other DynamicEntity that tries to occupy their space. Same logic can be applied for any other types of entities.

Posts: 454
CP: 0

hmm is it only a bug in the Topdown AI then?
Because the enemies run "into" me...

I post the most embarrising questions here Laughing out loud

Thanks for all your nice replies (I know I would be annoyed by myself slightly Laughing out loud)

Posts: 180
CP: 0

Yeah in top down they basically are on top of you jittering like madmen.

Posts: 1647
CP: 26119

Gonna have to ask Aphro about that one - he made that AI.

Posts: 135
CP: 0

Even in the normal platformer mode, the mob AI does something similar. They crowd right on top of you to attack.

Posts: 1647
CP: 26119

Honestly, I have never even really tried the top-down more than once. I just make sure it builds... when I remember.

But I do know of the overlap issue. That is an easy enough thing to fix - just have them stop moving when they intersect their target's space.

Posts: 531
CP: 967

The AI is simple conditional to flock to your position and when close enough they attack. Hence the jittering on top of your player. It's an old algorithm in terms of the engine and i have yet to get round to creating something that is more efficient tht uses the pathfinding classes.

There are 10 types of people in this world - Those who understand Binary and those who don't.

Posts: 143
CP: 0

Im sure the Ai was intended as more of an example to be built upon than a final complete Ai solution.

Ohh yah and im back mwahahahaha. (quickly hides)

69th post ohhhh yah 69