Advanced ARPG battle system

I’m trying too make a game.
Nothing fancy just a prototype, a level some critters and a boss fight.

But i’m stuck on how i should do the collision detection for the fighting.

Should i do it Through messages, collision detection of materials, properties, python?

Whatever makes this work!

How do i detect: when the player hits/blocks an enemy?
How do I detect an enemy attack or block.
So that the player or enemy takes damage when attacked, doesn’t take damage when blocked or dodged!

Any suggestions would be welcome. Links too blend files or tutorials are good too.

What is an advanced ARPG battle?

(I never heard about such a system)

You questions are good. They should lead you to a working system. But we can’t take the design decisions from your shoulders. All of that is up to you. We only can tell what is possible, what is not and what might be possible.

What is possible:

  • detecting collision
  • filter collision detection by existing property on the colliding object
  • filter collision detection by material on the colliding object at the contact points
  • ray detection
  • filter ray detection by property
  • near/radar detection
  • filter near/radar detection by property


  • messages for 1:n communication with loose coupling
  • direct state manipulation via Python for tight coupling (usually at 1:1 relations)

Business logic:

  • damage dealer -> calculating the final damage of an attack
  • health processor -> calculating the health change from various sources (damage, heal)

These are just short notes. Maybe they let bubble up some ideas in your mind :D.

My best guess is that it’s an ARPG (action RPG, think games like Diablo or even Zelda where you have stats, weapons, items, etc etc but the combat system isn’t tactical or turn-based), but with a more advanced fighting system (like Dark Souls, or Smash Bros 4 to an extent).

As far as how to do it, I’m personally a fan of raycasting for combat systems. If there’s something caught in a ray while the attack animation is in its few “hit” frames, use a Python script to assign damage to that thing.

For example, say an enemy is in front of my player character and inside the Ray it casts. When I hit the attack button, my character’s attack animation will play from frames, let’s say, 30 to 37, where frames 34 and 35 are where the attack would “strike”. I’d set up a Python script to detect which frame the animation is currently at, and if it’s a “strike” frame, that script would detect the enemy that’s inside my Ray and apply damage to it, taking away some of its health based on whatever numbers you have set up for attack values and playing a “hit” animation.

Same goes for enemies attacking the player.

Thx Michelle Sea and Monster!

This is indeed what i meant with ARPG.

I’ve come up with a way myself too. it’s probably not the best but I think it could work.
When the player attacks create an object roughly where the weapon is in the animation and detect collision between the enemy and the newly cretaed object. Then delete object after n-frames.

Also I could maybe go through the finished projects section and look how they do it if there’s an example that fit my needs.

Other people using other systems? Please Tell me all about them!

Well, I’m using the system I described above. Using a Python script with a Ray sensor on it, I detect any attackable object within the ray and apply damage, activate hit animations, etc. when the attack animation is at the strike frame.