Hello there,
I am a programmer, I would like to develop a game with the Unreal Engine and have been looking around trying to figure out how this engine works for a few days now…
What I have discovered so far is that this engine is definitely not made for programmers, from what I understand it is more designed toward users/developers who want to make a game with the already existing framework, a game that I would describe as “just as any other game”.
Let me explain how I came up to that “conclusion” and how maybe you could help me see it otherwise if I’m wrong…
Take for example the FoliageType “class”:
There is, in the engine, a class called ProceduralFoliageSpawner that can take multiple “Foliage Types” as parameter and basically just randomly spreads these Foliage Types around a given surface area, to simulate a “random” environment filled with various plants or whatever Foliage you give it.
In the FoliageType class, there is a property that controls the “Culling Distance” of the instances of this FoliageType, making the plants disappear at a given distance and re-appear when the camera (player) gets closer.
So let’s say you wanted to make a dozen different FoliageType plant types and rock types to put in your level, randomly spread out, using the ProceduralFoliageSpawner… it’s fine if you are okay with going and changing this “Culling Distance” property in each of your FoliageTypes manually, having to change it over and over again until you find what is suitable for you or when something during the development forces you to adjust your culling distance (ie. performance?)… but that’s just not the way developing works.
It would be way wiser to get some kind of “default” value to give to all of these FoliageTypes or even better, a wrapper to divide all of those FoliageTypes into categories.
What I’m talking about here is subtypes.
Ideally, you’d want to make a subtype of FoliageType and call it “SmallPlantFoliageType” with a lower culling distance and maybe a “BiggerRockFoliageType” with a bigger culling distance so the big rocks are still visible from afar while the small plants don’t eat processing power by being rendered even if not visible from so far away.
But no, you can’t do that.
If you extend that FoliageType class and dig into writting some C++ code for it you’ll get the infamous “Unresolved External Symbols” errors that occurs because the FoliageType is declared somewhere in the Engine source files but the whole definition of the class is not exposed because they removed it from the project (from what I understand) so it makes the compiling/building shorter, the FoliageType.cpp file doesn’t even exist, it is all pre-compiled and given to us as binary so there’s not even any copy/pasting of the original definition of FoliageType and making a new class out of it either, the code is missing…
Basically with this error Unreal Engine is telling you: “Hey, I don’t want you to extend this class”.
Fact is that if you can’t extend the classes that you want, if you can’t modify the “framework”, then there’s just little you can do.
I have downloaded the Engine source code from github and tried finding that FoliageType.cpp file in the Engine source project to no avail…
From what I understand from posts like these: https://answers.unrealengine.com/que…captureco.html it’s that it’s possible to have access to the complete source code and modify it however I want… but I am struggling with how I would be supposed to do that…
Even if the FoliageType definition C++ code existed in a file in the Engine source project, what would I do with it? Would I need to copy/paste it in my game project and make my custom “MyFoliageType” class and use that definition instead of the default Engine one?
I’ve also tried inserting my game project inside of the Unreal Engine source solution in Visual Studio… but that didn’t work out quite well… just made me lose another 40 minutes of building the whole engine again for nothing, getting the same errors at the end.
Please help me… is there something I’m missing here?
After reading this: https://answers.unrealengine.com/que…ape-class.html you come to think and ask yourself how you would even do a procedurally generated landscape if you can’t extend the basic Landscape class… would you need to re-write everything? make a new class MyLandscape that has completely nothing to do with the Unreal Landscape class and simply ignore the Engine functionalities managing the landscape? might as well just stop using the engine right now and code my own.
Thank you for your time,
WX