Download

Before I learn this engine, i just have to know...

Hi! Heres my exact situation and i wish to know if I’m on the right track. The unreal engine has so many features and i have to go slow and learn one thing at a time but its hard while I’m saying to myself “yes, but can i do …X?”. So here it is:

I wrote some pure c++ code that will generate mazes of whatever sizes and how many levels you wish. The end result is each element of the maze has an integer that describes the contents of that space and which directions are passable from that element.

I wish to have the unreal engine be able to use my c++ code to generate the maze (and its random of course) and then create the playing environment from that. I envision each of those integers being used to use a set piece (blueprint?) and those set pieces build the world.

Is that a reasonable plan? Am I barking up the right tree?

Thanks for any insight!

Sure. If you are using std::vector<int> to store your maze information I would recommend you to change it to TArray<int32> and expose it to your blueprint. Then you can read it and make all the spawn logic using blueprints =)

Thank you very much! There seems to be quite a lot of documentation, which is a good thing, but a little overwhelming for me at this point – but because of your response i know it’ll all be worthwhile :slight_smile:

If you’re like me and are too impatient to start reading/listening to tutorials that aren’t directly pertinent to your situation, just start coding. Break your problem down to manageable units, and bookmark anything relevant to each of them as you come across them because you only want to be working on one thing at a time. Knock concepts up in blueprint before doing the same in c++, and accept the fact that the final product may have been rewritten 10 times over, safe in the knowledge that the uphill battle has thoroughly imprinted in your mind everything you’ve tackled. Oh god I think I turned that into a rant.

This is working for me too. It’s entirely doable and not TOO painful. I’m only just learning C++ now so for someone familiar with the language it should be a breeze.