What to do in Level Blueprints and difificulty of transferring into Code

Hello,

I’m wondering what should go into the Level Blueprint and what should be in Class Blueprints?

Extra Bit: How difficult is it to transfer the Functionalities of the Blueprints into C++ Code and when should I do so , hence when I make a Big Game out of Blueprints I consider it is not useful to make everything work and then do the heavy work of doing all stuff into C++ Code.

Should I first Blueprint one thing, for example the behaviour of a Door and then Transfer it into Code and then expose it again into Bluepriint so that I have a performant Door Blueprint that I can place into the world and be sure it runs faster then the prototype I had done in Blueprint before?

I think there could be multiple and very different answers to your question on Level Blueprints. For me, I use the LevelScript/Level Blueprint to manage the low level load and save and as my manager for spawning dynamic objects throughout the level that would not be logical from any other class. There are also some things that have to be done in the Level Blueprint, Matinee comes to mind, but I might be wrong on that.

On difficulties of transferring to C++. If I have prototyped a BluePrint, and discovered I need C++, I create a C++ Class that is derived from the same parent as the Blueprint, and then reparent that Blueprint to the new C++ class. Then I transfer functionality a little at a time into C++ and remove it from the Blueprint, testing small changes as I go. It’s quite painless that way as initially, there is no change. The only caution is necessary with timing. For example, if you pull something from the Blueprint Eventgraph that is currently running off of BeginPlay, you have to make sure the execution order is maintained between the two BeginPlays (the BP event and the C++ function) if there is any dependency one upon the other.

An example of this was the WheeledVehicle class. My art guy put in the BP version to control the vehicles he was building. In order to maintain his functionality, but also integrate it in the bigger picture of the game, I did an Add Code to Project, selected the AWheeledVehicle class, and then went back to the Blueprint version and parented it to my new WheeledVehicle class. Then I started adding functionality needed to communicate from my customized Player Controller class.

1 question: Do you need template programming for games. I stopped C++ because of Templates…Pointer Arithmetic was hard enough for me back then and then Templates blew me just away…

How can you resolve this issue with the concurrency of the BP event and the triggering of the C++ function btw? Are there built in functions for that in the engine? Or how do you determine it?

Im very curious about C++ and BP at all…
Couldnt you just make a function in C++ and then import into the level Blueprint or so and then make a node from BeginPlay to the C++ function. Is there any performance Issue to make that? And how about the Trigger events do they trigger at the same time? How does the engine do this:for example I have 100 BP’s and they all lsiten to Beginplay…how is the speed of UE$ to go through them all how does it handle them

Man I know lots of questions…sorry that… but Im just 5 days into UE4 and so excited about it. Never did anything in 3D before also ^^
But this engine is so great and so easy to get started its jsut ridiculous allready

In Level Blueprint you should have code only that scripts that specific level, anything that is common to some level should be place in other classes. I see lot of people placing main game logic in to it, insted of AGameMode class where this kind of things should be. If you make one level game, i guess that might be forgiven :slight_smile:

With moving to C++ obviously main difficulty is that you need to rewrite everything, but the experience from blueprint design stays which makes this process a bit faster. Everything you do in blueprint is possible in C++ and even more, as most blueprint nodes are bindded C++ classes, so you will end up using same functions. I personally prefer making base classes in C++ with base code that can be used in blueprint and specific items in blueprints. It’s also beneficial for artists that most work exclusively with blueprints.

No. Pointer Arithmetic such as you would have done commonly in C, is seemingly discouraged now and I see no reason to tweak pointers with Unreal. I use templates that I have found here on answers, and they help tremendously, but there is nothing complex about just using them. I wouldn’t let that put you off.

I overstressed the concurrency issue just because I made a lot of mistakes, allowed BP code to be dependent on C++ settings and vice versa. Simple mistakes that shouldn’t have been made. I also was not careful where I would set the super::beginplay and was initially clueless about what was firing first. It’s not really a problem once you get used to it. Using BeginPlay as an example, I might spawn in C++ and then attach components in BP and don’t have timing issues now.

I don’t understand the third question. 's response below stressed the importance of not thinking in terms of the Level Blueprint being your game logic. Your question suggests you might be thinking that way, as if the Level Blueprint is the glue for all the rest of your objects. It could be, but I don’t think that was their intent. To think about how you’re going to use C++, you just have to derive some blueprints from a C++ class as I describe in the answer, and then do some experiments with doing things there rather than in the blueprint. C++ code won’t be a panacea to link your blueprints together or provide linkage via the Level Blueprint.

If you are just starting, I strongly suggest the wiki FPSShooter tutorial. It gives you a chance to build code and integrate that code with the blueprints. The way he set that tutorial up, it has logical use of C++ and logical use of BP, bringing out the strengths of both. It’s much easier to follow when starting out, than Shootergame.

Ok Im gonna look at it thx
At the moment I’m soaking in everything from their Tutorials Serieses on their Youtube Channel. I must say I’m so impressed by this engine. Neva eva would have thought that doing 3D games is so easy. Good God that I started at the right time where UE 4 is free and out

Hi Im imagininn me sitting there and writing every thing down out of my Blueprint classes( all settings positions and so) and then doing this in a C++ source code…am I right about this process?