top of page
Writer's picturebestfighter17

We have Gameplay! Blog #5

Updated: May 7


To Be The Hero finally has some gameplay! Yeah, we are way behind schedule and won't be able to implement most of the things that were decided in the beginning, but hey, it's just me, one programmer, with 3 designers and their amazing ideas, and a few of my own in the midst as well. And it took me some time to get the hang of Unreal's Multiplayer Framework. Okay, I'm done with my excuses now, let's proceed.


It's been a month since the last blog, where I showcased the very early prototype version with very basic gameplay(mostly to showcase multiplayer working on a dedicated server). Since then we've had another assignment for Machine Learning which was submitted on the 15th of April and if you wanna read about it, my friend, and teammate, made a wonderful blog about it. It was about using Deep Learning AI to generate random dungeon layouts that can be used in video games. It was fun.


So after that assignment, I got into our game here and got all the core mechanics working, along with 3 different types of characters, with different meshes, animations, and abilities, all syncing up in multiplayer(lots of RPCs) and added the feature of creating client servers too.


A small preview of part of the Trello Board : (it's very rough since I was the only one using it)


Myself and one of the designers decided to do something about the look of the game, to make it look more cartoonish. We definitely had to change the characters, as they were realistic primitive characters, and then we found this amazing free asset on itch, which had characters that suited our game, along with a lot of animations too.


Then we came across this great free shader asset on the Unreal Marketplace, which had a ton of effects, including one cartoonish Borderlands-style outline shader, which we used for our game.


With these assets combined, our game looked fresh with the type of style that we wanted.

Here's before:



And here's after:


We're still gonna add a few more assets to the world to make it look less bland, but we have almost everything working now(with almost no bugs) and that was the main priority. And I'm glad how everything turned out to be, so far at least.


We have a character selection screen now, and the player can choose to be a knight, rogue/peasant(we haven't finalized the name yet), or a wizard. They all have different playstyles, with all of them being able to melee/punch.


As of now, there are three types of items spawned in the world: swords, throwable stones, and spellbooks.


The stones can be picked up and thrown by the knight and the rogue, but the wizard cannot interact with them. The spellbooks are for the wizard, granting them a mana charge when picked up, which can be used to cast a freezing spell. This disables the input of the affected player, preventing movement for a while.



The knight can pick up swords, attack(melee) using them, and throw them as well, but the rogue can only throw them and not attack with them, while again, the wizards cannot pick them up. Getting hit by a sword or a stone will push you away.


Besides the implementation of these gameplay mechanics, I learned about Unreal's Multiplayer Architecture even more, and how communication of functions and variables is done among clients through the server. I made use of the Player State class, which lets you pass down variable values(among other things) when the player travels to another level(in our case from the lobby to the first level). When the player selects their character, they spawn as the selected character in the new level. This was done through these 2 functions of the Player State class.



The PSCharacterType is a Rep Notify custom C++ enum, and when it is set to Rep Notify, it runs whatever logic we define, when its value is changed, and updates on all clients.

This is an important feature which helps us communicate variables among the players.

This Compendium, which I mentioned in my last blog as well, has been very helpful and I keep going back to it to learn more. I created several base classes for PlayerController, GameMode, PlayerState, and the pickup items (in C++), and derived child classes as required, adding further logic to them.


Header file of the BaseItem class, from which I derived 3 child blueprints to create the 3 items


These were just some of the things I implemented since last time, and now with our submission date nearby, I'm trying to complete the game as much as possible, and the next blog will be the last one for this project(maybe, ..since I won't get marked for further ones).


Thank you for reading this far, it's 2:40 AM now and I don't think I will make much more sense if I continue typing, so I'm gonna call it a night, and I hope to see you in the final one!





51 views0 comments

Recent Posts

See All

Comments


bottom of page