UE4 blueprints compatibility with EV3 lego bots

Is the ue4 blueprint system compatible with lego EV3 bricks, so i can programme them? If so, how?

It might be possible, but I highly doubt it would be without very significant work (I would be very happy if someone can tell me otherwise though).

You’d need to create a plugin which is capable of interfacing with the EV3, and you’d also need to find a way of stripping out most of UE4 when it compiles, which undoubted would be too large & slow for the EV3.

If you’re intersted in learning to program using the EV3, maybe this would be useful: Alternative Programming Languages for LEGO MINDSTORMS – LEGO Engineering

What about the LE Extended Standard Library addon? Do you think that this could help, by any means?

Not really. That adds some nice functionality, but nothing that would really help with this (if anything it’d make it worse as it’s just more blueprints with more dependencies.

Blueprints scripting is not like writing normal code. It does a great job of making it easier to develop, but it does it specifically for Unreal. When the project compiles, it might compile these blueprints into ‘traditional’ code, but within it will be thousands of references to the unreal engine which make it large and will be extremely difficult to pull out - you’d basically end up re-writing everything.

Basically, Blueprints are for Unreal only.

If you want to learn to code C++ then using the EV3 would be a great project. It won’t be easy to get started but if you learn C++ then you can use the full power of Unreal for your other game projects (and a whole bunch of other things too!)

This is a totally “What if…” situation here, but, what if i could make an AI that could be transfered to C++ and then implemented into the EV3 blueprints, since that is what we mainly use (but thought of trying ue4 bp). Could that possibly work? Side Note: I’m asking all this cause we’re going on a competition for Lego Robotics.

Assuming you were able to write the necessary parts that would be used for the sensors and outputs of the EV3 (would require C++ knowledge), and you were able to output your AI logic as C++ then you would probably still struggle. The output C++ would almost certainly reference methods and utilities from within core engine code, which in turn would include further methods and utilities. You would need to strip all of these out and replace some of those parts with your own libraries that you’d need to write in C++ (or use some which are already out there).

Basically, purely theoretical it might be possible, but the work involved would be significantly more effort than learning to write it in C++ from scratch.

I’ve been playing around with this - the EV3 will respond to direct commands in a “byte stream” format (think “assembler for EV3”). So I think it is possible (using C++ in UE4) to:

  1. Connect to an EV3 (likely by WiFi or Bluetooth)

  2. Write some C++ functions (married up with the appropriate EV3 source libraries - I think you need to #include c_com.h which, in turn, includes a number of other EV3 libraries - these have been posted to git repositories on the web) that will send the EV3 direct commands one-by-one (doing all of the logic and looping on the UE4 system rather than on the EV3 - only the actions and sensor readings would go back and forth over the wireless connection)

  3. Expose these functions to blueprints so that they could be built into the scripts

I think the foregoing would be relatively straightforward.

What would be a more difficult undertaking would be to have the UE4 C++ code develop a series of commands and then batch-download them as a program and cause the UE4 to execute that program on the device on its own - though there appears to be sufficient documentation and source code available to figure out how to do this.