Should I use functions provided by Unreal Engine or Create my Own

Hi, I am new to game programming but well versed in C++. I have been trying to learn game development and after some thoughts, I left the blueprint coding and instead started C++ coding because I reached out to few people in gaming industry and they recommended that using c++ for programming rather than visual scripting is essential. Even tho visual scripting does the job and everything, the game programmers i talked with mostly work with C++ programming as game programmer so I decided to learn programming in games through c++ instead.

Now i have another doubt. There are lot of preexisting functions in unreal engine such as getactorlocation(), setactorlocation(), etc to name a common few and these functions are really useful when coding but the question i wanted to ask is should i create these functions myself or use the pre-defined functions? As these functions are pre-defined by unreal engine, i dont think they would exist in other engines like Ubisoft Anvil or Snowdrop or any other engines. They might have their own set of pre-defined functions but if there’s a particular function i am using in unreal engine and have to use the same in Anvil and its not pre-defined in anvil and I have to create my own, will it not be better to create that function itself in unreal engine so i could learn it.

Would like an advice on this topic.

At some point when using a game engine API (since there is no standard) you have to call function that are specific to this engine, you have no choice.
If you want to build a custom universal API over several engine, you’ll have to write differents implementation. And even if they have concepts in common, I guess it’ll not be an easy job.

An example of multi engine work could be “cesium” for geosptatial content display. But in this case, it’s a portability threw the 3D tiles data format rather than a universal coding API.

Of course you do. You can make your own function that achieves the same goal.

It will, but you will hit some limitations.

Unreal engine is a compromised starting point for many reasons. The least you rely on the engine, the more chanches your final result will work.

Developers (like one would assume your friends) choose the best version of an engine they like, pull the source and build from source.
This happens several thousand times while gutting/removing parts they don’t like or that simply aren’t required.
Once they start a proper project, they are obviously locked into that specific engine version and won’t update a project out of it.

Given that, and the amount of work it takes, most developers will then levarage the existing Kismeth library functions.
The ease of having those functions ready for you is why you use an engine really, so you don’t need to build the whole function from scratch.

Once the custom engine is established, you are in charge of the function code, so you can remove/omit the extra performance drag or things you dislike from nearly all parts of the engine - including kismeth functions.

When building your own version of things for X engine, you will of course eventually have to rely to whatever the engine uses to render on screen; Some engines give you direct d3d access for instance. Arguably even unreal does if you mess with it from source.
Others only allow their core functions to draw.

Lets take a quick example of a line trace.

You can easily call a pre-made function for it, flagged with debug and see the line rendered on screen.

Alternatively, you can build your own function, have it do the hit check, return a result, and then you somehow have to also display a debug by drawing a line.

The second path will obviously take way longer, reach you much more as you attempt it, and eventually you will find it is probably far less perfromant in its first 200 or so version than the engine’s built in function.

So…

Well, that depends.
If the goal is to learn, attempt to make your own.

If the goal is to have a working project, use the predefined ones that do what you need.

If the goal is to make something you can actually eventually release with AAA quality, build from source, modify the kismeth functions as needed. Use them as needed.

Either way, you are locked into the engine once you start coding up the gameplay. So if you want to try better engine, you should start with that. See what you like best for your needs.

I feel like using these pre-defined would be a better choice for now as these predefined functions can be explored later. For the choice of engine, only other engine to choose from is i think Unity. I am on mac so can’t use CryEngine.

I dont understand what you mean by build from source tho.

Currently the project i am working on to learn unreal engine is using third person template in c++. I am using VS code to edit the c++ classes that i am writing and coding and using the button on the bottom right of the unreal editor to compile the code that i have written. not sure if this is what you mean build from source as i havent explored the possibility of reading and writing source code of unreal engine using this method of making a game.

Correct me if i am wrong, I might be on the right path of your way to learn AAA production by building from source, modifying the functions and using them.

Let me know if I am correct and if i should change to Unity.

I can’t tell you what engine to use, You have to figure that out based on your project needs.

Build the engine from source.
Simply means that you pull the engine source code, let Visual studio build it, then use the exe it produces.
As opposed to using the exe you download of the release that Unreal gives you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.