The question is: do the Blueprint tutorials have the desired end result? If they do, then it’s a matter of writing equivalent C++ code. Converting Blueprint to C++ is simple for someone who knows C++.
I understand how you feel, but C++ with Unreal is just C++. If you are still learning the language, it may be easier to learn it directly first, then apply it to games. When it comes to C++, people usually assume you already know a lot. When you do, it’s just a matter of reading the documentation.
There is a great demo project available called ActionRPG. It seems they use a lot of C++, you may find it a good resource.
If you just want to make characters string animations together to compose a combo, you may achieve that by designing a specialized tree data structure, where each node is an attack. Come up with your own rules on how to proceed to the next attack in a chain, when to drop combos, what events to fire, etc. Trees work wonderfully for combos.
If you are serious about this kind of game, keep hitboxes in mind. It is common for beginners to use the weapon itself for the collision, but this has a lot of flaws. Don’t tie logic to cosmetics. Pretty much in all tutorials I’ve on Youtube they just add collision to the weapon and leave it at that. That is not how it works in a real game. You will want to use hitboxes instead.
When you say converting a blueprint to c++, do you mean manually or using the developer tool to do so?
TBH, i dont quite understand all the complexities of the unreal BP system as well. But then again, I just started. So manually probably wouldnt work,
read a guide that says using the developer tool to convert is a waste of time and messy?
Thanks for the tip on the setting up a tree, I am familiar with trees and I think I could come up with an implementation for that once I figure out how to
make c++ “communicate” with Unreal. Figuring out the setup with Unity was the biggest hurdle for me as well. Once I see a workflow,
and how these systems talk then i can get going. Understanding AActor, what it does, how to make things move etc.
Was also planning on using hitboxes, so no worries
I was referring to the ActionRPG demo game. Not really a tutorial, but you could dissect it and learn from it. Since it’s by Epic, I take it as their recommended approach on how to create such a game. That said, it’s not my approach, specially since they are using a relatively new skill/ability system. I prefer to write my own.
Based on the videos you sent, you will want to familiarize yourself with Animation Blueprints and Montages.
I mean converting the BP algorithms to C++ manually by writing equivalent C++ classes and functions. There are some pitfalls you could run into if you are not familiar with C++, but in general, Blueprint functions/nodes have almost exact C++ equivalents. Since you are familiar with C#, I will mention a few things to keep in mind in a bit.
One thing, the animation system is closely tied to Blueprint, in particular a special kind of Blueprint called an Animation Blueprint. This kind of game requires a lot of animation management, and if you try to fight the Blueprint framework you will end up reinventing the wheel at best, and getting stuck at worst. What I suggest is to manage logic in C++, then give results as parameters to Blueprint.
C++ has no built-in garbage collection nor reflection, as you probably know. Epic uses macros and their own set of tools to implement that, as usual. In a nutshell, you will use macros to let Unreal know what should be garbage collected, what should be exposed to Blueprint, etc. You may want to look up some of the most common macros, such as UPROPERTY, UFUNCTION, UCLASS, USTRUCT and UENUM.
That is how you talk to Blueprint. You can expose variables, functions and custom types, effectively extending Blueprint.
As for AActor, it represents anything that can exist in the game world. A controllable AActor is an APawn. Unreal also offers a default character class that extends APawn and implements basic movement functionality for biped pawns. You also have the movement components, which are used in combination with the classes to move characters.
Thanks Dante, I am following a “Unreal Engine C++ The Ultimate Game Developer Course” and it is covering all of this in detail, indeed the Uproperty macros are an essential piece i was missing.
I am starting to understand the work flow and the main classes and fucntions such as CreateDefaultSubOjbect<> etc etc.
Thanks for all your help.