Commands, attacking and blocking
|
I have this week, four or five weeks since the start of the course, among other things been making the players attacks and blocks. I also made the player attacks and blocks we had in the prototype. We had all of them sort of working in the prototype except the fire attack. We have now just hade Alpha and have pretty much everything at least almost implemented. The attacks and blocks are:
For the final game, each character class has their own specific attacks and blocks, but we as of now only have one player character, and all attack and blocks are always available to be able to always test them. Making the different character classes is up next to do. We had in the prototype made the attacks, blocks, and moving both for the player characters and for the enemy characters be ‘action’ behavior tree nodes so they could both be used in the planning stage for the AI, and be used when executing them. We have in the post-prototype version divided it up in behavior tree nodes and ‘commands’. The behavior tree nodes are used by the AI for planning, and the commands are used by all characters to do actions such as walking, attacking, and blocking. The commands are put in a list on the server specifying what they are to do that turn. The clients make the player’s commands and sends them to the server. The commands can be created and sent as command classes without any conversion, in difference to the prototype where we had instructions be sent to the server, and the server made ‘action’ nodes out of the instructions. I had begun making the command code last week, but hadn’t made almost all of the attacks and blocks. Something else I made this week is the status effects, which strongly relates to the attacks and blocks. Each character has a ‘StatusEffector’ which keeps a list of the different ‘StatusEffects’ that character currently has. The status effects we currently have in the game are ‘Stunned’, ‘StunBlocking’, and ‘DirBlocking’. The reason ‘StunBlocking’ and ‘DirBlocking’ are status effects even though their not usually thought of as status effects is because they remain and stay on the character unlike actions such as e.g. walking or horizontal slash which are used up immediately. We also had status effects in the prototype, and was then implemented directly in the ‘Entity’ class , and was implemented as an enum. We now have a ‘Character’ class inheriting from an ‘Entity’ class, unlike in the prototype where we didn’t have the character class. |