Tuesday, 5 April 2016

Class 27 - Random Drops

Post 110

(Post for April 4th)

Random Drops
So this blog is a little late but as you can see it was intended for April the 4th.
So Today (last night) I worked on random drops. This is kind of a simple thing to do as it turns out. This is a area of code that was made to make my enemies play a death sound, but only once. So instead of having multiple lines of code I just thew the creation of the random item in here. The whole idea is the same, the enemies dies, this happens once. This greatly reduces the size of the code in the game and overall is a handy trick. Another thing to note is the "randomchance" Variable. Basically what that does is when the character is created it "randomchance" picks a random number between -5 and 1, if the number turns out to be positive, the health pot will drop. This means not all enemies will drop health pots.
Having health pots rarely drop is a balancing choice, It makes the blocking mechanic so much more worth it. However something in the combat still seems extremely off. I think it might be because of the high damage output from the enemies, well and because they are very prone to miss you entirely, especially if your standing still. Tomorrow I will work on making the game feel better to play, so probably camera related stuff.

No comments:

Post a Comment