# Acausal modeling and Unreal Engine

**URL:** <https://discourse.julialang.org/t/acausal-modeling-and-unreal-engine/111016>\
**Category:** Modelling & Simulations\
**Tags:** modelingtoolkit, modelling, games\
**Created:** [March 1, 2024, 2:12pm UTC](https://discourse.julialang.org/t/acausal-modeling-and-unreal-engine/111016 "2024-03-01T14:12:40Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [March 3, 2024, 4:06pm UTC](https://discourse.julialang.org/t/acausal-modeling-and-unreal-engine/111016/14 "2024-03-03T16:06:50Z")

</div>

You can do that, add C++ code (and thus Julia) to Unreal, and (I assume to) get it called somehow, not sure where from, i.e. how, where to plug it in, you do it exactly.

No other language is officially supported, but that doesn’t mean you can call any language from C++. C is close enough, an (almost strict, though not quite) subset of C++, so you can call Julia’s C embedding API, though more likely you would want to use Jluna:

> [@Jluna: a new Julia \<-\> C++ wrapper](https://discourse.julialang.org/t/jluna-a-new-julia-c-wrapper/77486):
>
> Available here: [https://github.com/Clemapfel/jluna](https://github.com/Clemapfel/jluna) (Edit: the license of the library has been changed to MIT, making it freely available without restrictions) I have spend the last few months, full-time, writing a Julia ⭤ wrapper completely from scratch. It aims to fully replace the C-API in usage in C++ projects, and offers a possible alternative to Cxx.jl. I aim for jluna to be… modern: uses the most modern C++20 features, the newest compiler versions and Julia 1.7+ generic: all std:: …

E.g. C#/:net is not officially supported, still people have done this, somehting you would learn from:

> **[GitHub - nxrighthere/UnrealCLR: Unreal Engine .NET 6 integration](https://github.com/nxrighthere/UnrealCLR)**
>
> Unreal Engine .NET 6 integration

> **[C# in UE](https://forums.unrealengine.com/t/c-in-ue/574058)**
>
> i really wanted to start programing in UE, idk which language to use, ik C++ is the default one, my friend said to that C# is without comparison the best one how i use C# in UE? and which is the best?

> **[What Coding Language Does Unreal Engine Use | Robots.net](https://robots.net/tech/what-coding-language-does-unreal-engine-use/)**
>
> Unreal Engine, a powerful game development platform, primarily utilizes C++ as its coding language, offering developers endless possibilities in creating immersive and realistic virtual experiences.

Your project will be large because of a) Unreal, but also b) Julia (is large, can be stripped down), you can compile the Julia code and use still large Julia runtime, with PackageCompiler.jl, or if you’re lucky could use StaticCompiler.jl then the Julia part could be a rather small library.

Since you’re only after the visualization part, then maybe you might as well go with Makie.jl, i.e. GLMakie (one game has been made with it… and it’s at least very good as a non-game engine). It should be fast enough. Unreal might be overkill if you just want visualisation, or to start with if you just want a demo, unless you really need and want awesome graphics. There are pretty good game engines like Godot, free/no-cost, that are pretty good to also explore, and free Julia game engines, e.g. B+ most recently in 3D, not yet registered.

About other Julia game engines, e.g. Starlight.jl (current best for 3D?), see my longer post on it:

> [@Gamedev with GLMakie (the path less taken). Is it possible?](https://discourse.julialang.org/t/gamedev-with-glmakie-the-path-less-taken-is-it-possible/110733/8):
>
> It’s an option, as shown by (the currently marked solution, though I dare say it’s the wrong option, and better available even in Julia for games; for plots, maybe nothing as good in any language), and I see in the docs: Add one or more of the Makie backend packages GLMakie.jl (OpenGL), CairoMakie.jl (Cairo), or WGLMakie.jl (WebGL), RPRMakie (RadeonProRender) [All of those support 3D, even CairoMakie, and RPRMakie ray-tracing. You may want that and OpenGL possibly, or its successor Vulkan.] …

---

_[View the full topic](https://discourse.julialang.org/t/acausal-modeling-and-unreal-engine/111016)._
