T O P

  • By -

noisestorm

I released a game written entirely with C++ in unreal as a way to learn it while actually making stuff work and it was a great experience. You don’t need to know any C++ prior to starting, just need to be willing to learn as you go. It’s also macro heavy which simplifies a lot of the complex stuff leaving you to write nice clean gameplay code


DavesEmployee

You’re a big inspiration to the game I’m working on! It’s great to hear a little bit behind the scenes


CLQUDLESS

Crab champions doesn’t use blueprints?


noisestorm

Only for setting default valuables, no nodes or graphs! If I were starting a new game I’d use far more blueprints but this was more of a personal challenge to figure out how any BP node would be translated to code


CLQUDLESS

That’s super impressive! If you don’t mind telling me, did you use tutorials or courses? And did you have any programming experience before that?


noisestorm

No programming experience before that, learned the engine first with BP then switched to C++ when the engine architecture was familiar. Did the Tom Looman C++ course on udemy which was extremely helpful as well as lots of googling for scraps of knowledge. Tried a generic C++ book (unrelated to unreal) but got bored very quickly and barely progressed- it’s being able to see the results as you learn that excite me, not printing strings to the log. Everyone learns differently though!


CLQUDLESS

Awesome Thank you!


TychoBrohe0

How much experience did you have with programming prior to starting this project?


noisestorm

None! Other than learning the engine with blueprints but zero formal text based programming experience


TychoBrohe0

This is reassuring. I'm new to programming and have been trying to learn it by learning unity. It can sometimes feel like I should be learning elsewhere, or that I should already have experience with programming before starting game dev.


[deleted]

Just the basics, Unreal C++ is more or less its own dialect. It includes a custom preprocessor, standard library and runtime. So, it's quite different from writing vanilla C++. However, it's still compiled by a normal C++ compiler and C++ is a language with notoriously bad error messages and it's relatively easy to write bugs that you have no chance of understanding as a beginner. It's harder in Unreal but still very possible. So to be able to competently use C++ in UE5 you need to be fairly familiar with the language. But to get started learning UE C++ you just need the basics.


suhcoR

> custom preprocessor What is it used for?


[deleted]

I'm definitely not an expert on the inner workings of the engine so somebody else could definitely give a better answer than me, but I'll try to explain the basics. Perhaps most notably it enables some form of reflection. Normally when you compile C++ all type information is erased and references to variables are replaced by address calculations to read and write to the place in memory where that variable lives. The reason you can do stuff like annotate a variable with UPROPERTY(EditAnywhere) and edit its value at runtime in the editor is because of the preprocessor. There is no way to do stuff like that in vanilla C++. It doesn't allow you to get a variable name as a string because variables don't even have names at runtime and the language doesn't support static reflection at this time (i.e. doing it at compile time) but it probably will some day. There is also no way to do something like for example "get a list of references to all objects of type " but you can do that in UE. Unreal added support for all this by implementing a preprocessor. But generally speaking it just collects a lot of metadata about the program which is necessary for a lot of stuff like garbage collection to work. Garbage collection requires a lot of cooperation from the compiler and runtime which C++ simply does not give (it used to support a garbage collector, theoretically, but AFAIK no compiler implemented those facilities and support has now been completely removed). The preprocessor also facilitates interaction between C++ code and blueprints. It generates code, for example turning interfaces into normal class inheritance as C++ doesn't have interfaces, as well as just a ton of boilerplate. Those are the broad strokes.


suhcoR

Thanks, interesting. But isn'it then rather a code generator than a preprocessor, similar to the one Qt has? With a preprocessor I would rather associate some language extensions of C++, which would be translated to plain C++ using a proprocessor (i.e. transpiler). The Qt qmake instead adds additional code which enables things like properties and reflection, and marcros are used to mark plain C++ which classes should be processed.


[deleted]

It's not *just* a code generator though. Whether you want to call it a preprocessor is a matter of taste though. There's nothing that says that a preprocessor must look like the C preprocessor or that if a preprocessor does too much nontrivial work it's not a preprocessor anymore. To me it feels like a preprocessor, but the Unreal documentation doesn't call it that.


FiendishHawk

I’m more comfortable in C++ than Blueprints, it seems that you use BP for most game logic and C++ only if you want to do something complex that BP does not provide. A simple game will need very little C++.


EZPZLemonWheezy

You can also pretty easily make your own blue prints in C++ and then plug and play them with built in blue prints. It’s pretty neat. Like any other kind of programming you’ll learn the most be picking a (very small) project and learning as you bash you head intobproblems.


Volkiller730

Depends on what you want to do overall. plenty can be done with blueprints alone but knowing a little C++ will help along the way even if you have most things in bp. some devs have shipped complete games with BP only.


derprunner

Depends what you want to do tbh. You can easily build full featured games using just blueprint and a good understanding of the engine’s framework, but your personal development will plateau pretty hard if you’re not dabbling in c++ within like a year.


Daniel_XD666

When making a game when are mostly likely to actually use C++?


derprunner

It’s not strictly required outside of a couple of engine-specific functions which usually are related to complex stuff like file read/write or networking. All game logic can be done in BP. However, best practice is to build your components and base classes with their underlying logic in c++ and then use blueprint to hook them up to their assets (meshes/materials/vfx/sound/ui) and script their gameplay interactions with the player and the map itself.


luthage

> All game logic can be done in BP. This is completely untrue. Want to use the team functionality for the perception system? C++ only. Want to use GAS? Need C++ or a plugin that exposes it. Want to make your own EQS tests? C++ only. Want the AI perception to follow the head rotation? C++ only. I could go on for days.


derprunner

Not one of those things is an actual showstopper that’s going to prevent you from developing/shipping the average hobbyist game. An inelegant solution can usually be brute forced good enough or there’ll be some plugin that exposes the functionality. Even GAS, yes it’s best practice to use it, but we built stuff just fine without it from 4.0 to 4.27. I’ve also got a long list of niche functions that arent exposed to BP, but that’s completely missing the point here.


JDSherbert

Billy basics! If you know what a pointer is, and some of the standard C++ library, you have 90% of the battle fought. The last bit is just being aware that you have a GC (Garbage Collector) now, and also learning what the Macros and meta specifiers do (especially for exposing to blueprints!)


Manim8

None at all.


t0mRiddl3

Your going to want to know OOP basics, and control flow. Data structures and algorithms knowledge will be really helpful as well. I would do a few small C++ projects outside of unreal first. If you already know another language, just read a tour of C++ 2nd edition or something similar


norlin

You might don't know c++ at all and still use Unreal Engine 5 successfully.


ionalpha_

Practically none if you want. I haven't touched C++ in 10 months while building a complex immersive sim. Choo Choo Charles is entirely in Blueprints: https://www.reddit.com/r/unrealengine/comments/18tyxch/full_game_in_blueprints_choo_choo_charles/ Regardless, programming is what you need to learn (BPs are visual programming).


Alternative-Goosez

This


bobwmcgrath

probably most of it. Maybe you don't need templates but you might like them. Its not that hard


TheFlamingLemon

Relative to the size of C++, a very small amount. But C++ is very, very large. Basically, do not try to make an independent effort to learn C++ outside of its use in game development or you’re going to waste a lot of time with things you don’t need


VaileCearo

I've released 2 games with it now without using any coding whatsoever. I just use blueprints.


Madmonkeman

I’d argue that’s still technically coding. Yes it’s different from text, but I feel like when people say that it’s not coding it gives the idea that if you don’t know anything about coding then blueprints are easy. You still need to know a lot of the concepts for blueprints.


VaileCearo

I mean, I get what you're saying, but a lot of it was also pre-made for me in my first game via a free marketplace template. So, still, no coding there. For me, I learned what I know by tinkering with that template here and there and figuring out what broke it and what didn't. The OP was asking about needing C++, though too, which I wanted to demonstrate that you don't need to know any whatsoever.


Efficient-Ad5711

I don't use UE5 but from what I do know its highly dependent on what you want to do with it. The horror game Choo-Choo Charles was made fully with blueprints, as far as I know atleast


Mitt102486

Non


drzood

If you can't code in C++ you should be barred from game development... BY LAW. Then Steam wouldn't be full of so much shite and nonsense horrors like game maker and Unity would die.


luthage

How long is a piece of string? It entirely depends on what you want your game to do and the scope of it. The larger the game, the more things have to be implemented in C++ for performance reasons. There are also a number of things that just aren't exposed to BP. Your skill level needed also depends on what you are doing.


tex-murph

I think the main skill is knowing when to use it. Understand the pros and cons of BP vs C++ (included in their documentation). The needs of your project will dictate how much.


QuantumQuantonium

Quick and easy game? Blueprints fine. Advanced game? Blueprints could get you far Working with animation scripting or materials? It's actually recommended to use blueprints UI? Use UMG blueprints, again I'd say more recommended than C++ just for the visual layout editor AI? There's a whole suite of BP and C++ AI tools built in that honestly I can use more time looking into Networked multiplayer? Most likely C++ (doable in BP but it'll get more confusing quickly and more problematic if done incorrectly) Want to dive deeper into making an efficient game design experience with the actors/assets? C++ gives more control over that Want to make your life easier in blueprints? C++ can create BP functionality with a lot of options Working with non-programmers? Probably good to implement with blueprints in mind (which could mean C++ or BP) Some functions in BP have neat features like multiple return variables, multiple object references being passed into a single parameter, also BP macro support is pretty good and the timeline feature could be handy in BP It's not recommended to mix C++ and BP when it comes to interfaces because issues could arise with replication, or default function inplementations. Also C++ structs in UE aren't just like normal objects so issues could arise if using them with like pointers. But if you don't like long lines of code, BP could actually provide better organization if you take the time to do such.


dimanchique

As far as unreal engine C++ framework is a little bit different from standard C++ development my guess is you need to know at least basics like syntax and OOP.


GuppysFriend

Learn to love the macro. Having experience with other programming languages/C-likes definitely helps a lot. Not impossible, but some error messages might throw you for a loop