It's been a couple of weeks since the last update and I've managed to get quite a lot of good stuff done! I pretty much re-did the whole client-server code because I wasn't very happy with it, and I've also continued on with the work on the combat system, adding combat with mobs and introducing ranged weapons!
Main Additions:
- Mobs: I added the first mob into the game this week: an adorable rabbit! The server controls these mobs and randomly chooses a position for each rabbit to run to after a random amount of time has passed. The rabbits start running to this new position and then wait at the position when they get there. They will stay in the same place until the server chooses a new random position for them to go to. The bunnies also have 3 animations: an idol animation, a running animation and a dying animation.
- Combat against mobs: Mobs now have their own profile and health bar that show up whenever your player gets near to the mob. As well as this, attacks now work against mobs. At the moment, when a mob is killed it stays dead and never respawns...obviously something I will be changing in the future!
- Melee Combat Improvement: The server now tests more thoroughly to check whether a player is hit by an attack or not. You now need to be within a certain range of a player to hurt them, and you must also be facing them almost directly.
- Damage Count Calculations: The calculations for damage are now a bit more complex. Attacks now have their own "attack power" which is the base damage for the attack. The damage can be boosted by wearing and wielding equipment that has attack bonuses. If your opponent is wearing armour then the damage is decreased depending on the defence stats of the armour. The ‘volatility' stat of your weapon/armour determines how randomised the damage count is.
- Ranged Weapons: There are now bows in the game! You can't use them to attack quite yet, but I added the animation for one attack, "Shoot", which I will be implementing next week.
- Server-Client code Redo: Before this update it was only possible for the client to send messages about their own player, such as telling the server what clothes the player is equipping, what position they are at in the world and what direction they are travelling in, etc. Now I've made it possible for the client to send requests to the server, requesting to change the states of other entities in the world. For example, if the client wanted to cut down a tree they would send a request to the server asking permission to cut the tree. The server would check if this is possible (check if the player is close enough and if no-one else has already cut the tree down etc.) and then would update the tree on the server side while notifying the client that they were successful (or not).
So you can now check out all of this stuff in the video below! If you enjoy the video then feel free to subscribe to my youtube channel "ThinMatrix" for weekly development diary videos :)
Thanks for reading!
This comment is currently awaiting admin approval, join now to view.