Advertisement

Roadmap for a 3d Top-Down RPG game

Started by June 21, 2015 07:44 PM
5 comments, last by Tom Sloper 7 years, 10 months ago

Hey guys,

I'm an experienced systems programmer and my hobby is game programming. As I love 3d Top Down Rpg action games, i would like to make my own world. so far i ve achieved this :

its just camera, click to move, and animations based on player state (moving, idle, attacking)

but i seriously dont have any ideas how to implement combat system with animations and effects. is there any resource explaning the algorithyms from scratch (like how to implement animations on hit and calculating combat stats) ? i ve found a lot of resources about FPS games but no luck on RPG games.

I dont mind code examples but i really need to know the basic ideas.

thanks for your time.

Don't think there are actual differences between an fps and an rpg when it comes to animations during combat.

At the basic level you have to check if A hits B (using skill values or simply if B is close enough to A when A blows the hit) and then, if true, play B's animation (change its state like you already do with the walk/idle)

EDIT:

By the way, what are you using? Unity? All from scracth?

Advertisement

hey thanks for your reply, im using unity

but my question was a complete rpg game with all the necessary mechanics, item trades, mounting etc. not just combat.

to your answer, i ve already managed to check the range and then change the state to attacking, i couldnt figure it out when to decrease health based on animation and also attack could be cancelled. this way it wont be a double click fest. what im trying to achieve is similar to LoL. its all based on skillshots and dodging them.


to your answer, i ve already managed to check the range and then change the state to attacking, i couldnt figure it out when to decrease health based on animation and also attack could be cancelled. this way it wont be a double click fest. what im trying to achieve is similar to LoL. its all based on skillshots and dodging them.

Your weapons could have colliders on them that you enable when they swing the weapon and disable if they cancel the attack so there is no collision. But I do think that is a bit overkill and will add quite a bit of physics overhead and design/setup on your part. What I've done in the past is when the animation is half done I do my distance check and then damage any enemies inside the attack arc. Gives the illusion of swinging a weapon and still the option of canceling if the player is fast enough. Since I think your game is point and click to attack you can take it one step further. Clicking will move your guy towards the enemy and when you are within the attack radius of the weapon then start the attack animation and all the rest.

@stupid_programmer

hey thanks for idea, that makes a lot of sense. i think im gonna go that way.

Hi,

I don't use Unity so I can only describe how I did it in Unreal Engine terms.

I attached the weapons to the hands of the model, and used the swipe and slash animations of the character to drive the attacks.

Each weapon had a collision mesh on it and overlap events, so that in the event it struck an enemy it could deal damage.

Each weapon derived from a base class where individual weapons had a hit event, a damage level and a multiplier for stationary or moving attacks (stationary attacks dealt more damage but put you at more risk as moving targets are easier to hit back).

Similarly on the other hand was a shield and animations for blocks would raise the shield. Both were mutually exclusive so blocking would lower the weapon.

All of this was driven by Unreals animation state machine:



You can see an example of it used in combat against an enemy NPC here:



Let me know if you need to know more :)
Advertisement
Please don't necro.

-- Tom Sloper -- sloperama.com

This topic is closed to new replies.

Advertisement