I have a background in game development (mostly graphics) in c++ for PC. As somebody who was exposed primarily to big engines written from scratch, I have a hard time adapting to some of Unreal’s concepts.
I will explain in detail.
When I just started with Unreal, the first question I asked myself was: “where is the entry point?”. I found it a bit weird that Unreal does not have a concept of “Load-time” and “Entry” for your code base. There is no place to start setting up things in a classical way, i.e., setting singletons, initializing managers, deserialize data, load data and so on. Therefore, I created one of the automatic construction classes (I believe it was AWorldSettings) that was constructed rather early, and used its constructor as “main” for my code. After that, I registered callbacks for asset load/unload for intrinsic Unreal deserializer to reflect on all assets that were loaded.
As a next step, I started writing an Item system. First thing that immediately caused confusion - there seems to be no generic Mesh class. You either work with AStaticMesh or ASkeletalMesh.
I want to have the following system in place:
- On load time:
---- create new instance of MyItem myObject;
---- Deserialize data file, ie “sword.dat”, write all contents in myObject, save Item as archetype in a storage container with some tag, ie “sword”.
---- Make the object container visible in Unreal editor (the same way the meshes are visible in a folder, for example, so that you could drag them directly in the world)
---- Once dropped, the item model will be visible. It can be either an animated model, or a static model. All the public variables should be visible as well.
-------- When the Drag n’ drop is performed, the object archetype is cloned, and a new game object instance is created and saved in the game object container. Archetypes are “const”, and the cloned object is “non-const”.
I would prefer to have as minimal exposure to blueprints as possible for core logic (storage, conditionals, data read/write, behaviors) and only leave them for designers to tweak things (like health 100 ->150).
I understand that what I’m asking may seem a little vague, but please, bear with me