Jump to content
  • Advertisement
  • entries
  • comments
  • views

combat system finished!

Sign in to follow this  


As you can see in the screen shot, (or if its to small, as you can't see) the top of the screen is cleared now and displays stats. The right side shows what is happening to your combat. As you can see, when the accuracy increased, (the mountain message) you were suddenly a lot more likely to hit where you where aiming. I haven't really explained how this aiming system works properly, so let me explain it again:

  • First, the monster (or player) decides on a target. The target is where it is trying to aim. This can be any square in the image I showed last time. Default is ribs (torso) and there is no way to change that yet. Off cource, some monsters will have different body parts, and scales between them, as well as weakness, so you need to count that. The target additionally needs to be in reach of shorter monsters.
  • Next the distance is calculated. The basic formula is random(0,1)[sup]2[/sup]x100/accuracy. The direction is simply a random number between 0 and 2 pi. I use sine and cosine to find the point, and check what zone is in there.
  • Damage is calculated using random(1,2) X level X weakness of the point. Armor and weapons will go into this calculation when I have a Item system.

    This system is pretty complicated for this type of game, but I think it can add a lot of fun to gameplay if you are a advanced player, and it dousn't really affect you if you are a newbie, since the default settings should be good.
    I also improved the AI of monsters to, at least, attack you when you are right next to them. Since they can't tell the difference between a player and each other, they will attack each other to if they happen to get close enough (witch never seems to happen) They are a very significant treat, since HP regeneration is very slow, and right now I usually die killing my second or third lizard. They will get easier if I implement weapons, as well as there size. (Right now they are considered humans with AI)
    Next up is a inventory system, witch I will need to implement weapon and armor. As you can see in the screen shot, I have drawn a simple potion witch will be my test object. Right now you can pick it up, witch places it in a list thats called inventory, and nothing more can be done. You can't even see that its there. If I finish the inventory system, I will work on a armor system, as well as rescaling the lizards.
Sign in to follow this  

1 Comment

Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!