Platformer and Attacking

TheGabfatherTheGabfather Member Posts: 633
edited May 2013 in Working with GS (Mac)
Just last night I've started trying my hand at platformers and have been thinking up ways to design the character in such a way that attacking with a variety of melee to mid-range weapons and attack moves would be easy to implement.

This is the current concept I have in mind, making use of 1 Actor for the Animations, 1 Actor for the Character's collision Rules, and 1 to X Actors for the Attack points.
image

With this there is no longer any need to have a separate Actor for the Weapon (no more Rotating, swinging, etc).
All the visual weapon swings and other attacks would be left to the Actor assigned for animations, and the hit boxes for attacks would just Activate/Deactivate accordingly.

I think this is a pretty simple concept that other developers have already come across and maybe even implemented, but what I want to know before I start implementing is if there are any drawbacks to this method, such as slowdowns, scene load times caused by the amount of images needed for animations, etc.

Critiques and suggestions for improvements would be fantastic :) would love to hear how other people implement platformer attacking in their own ways!

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    This is the method i used for our double dragon template when i 1st started it but decided to go without the hitboxes and used abs to check the distance between the hero and enemy so you could set it up to a distance for punch and kick (kick has a longer reach).

    In each of the enemies i added a constrain selfx to abs( game.HeroX - game.Enemy1X ) then when punch or kick is pressed check the distance is within a certain range you would also need to make sure the opponents are facing each other.

    In my template i also had to make sure there on a similar Y axis but you might not need that.

    Your way will work but i think theres a better way.

    http://www.deepblueapps.com/double-dragon-template/

    Darren.

  • TheGabfatherTheGabfather Member Posts: 633
    Darren, I think that is indeed a better solution! For enemies coming anywhere from the platform up, that's 180 different angles to consider -- I might have to tweak your method a bit so I'm not limited to measuring just X Coordinate distances, but I'm really leaning towards using absolute value now :)
Sign In or Register to comment.