Julia in a game engine, possibly in Unreal (or Godot, or CryEngine...)

For simple (2D) games GameZero.jl is available.

For AAA (3D) games, Unreal, written in C++ as almost all are, is likely the best game engine out there. And https://godotengine.org/ likely the best open source engine (far behind(?)). The former is also “free” as in beer (until “success”, meaning $1 million then 5%), while not free as in freedom.

I noticed you are seemingly allowed to add e.g. Julia to Unreal:

g. Distribution of Non-C++ Programming Language Integration - You may Distribute an integration of a programming language other than C++ for the Licensed Technology, but if you do, the integration must be Distributed free of charge to all Engine Licensees, must be available in source code form (including, but not limited to, any compiler, linker, toolchain, and runtime), and must permit Distribution free of charge, on all platforms, in any Product.

It’s just an intriguing possibility that you could (and are allowed). Actually since Unreal is proprietary, and Julia has few (one?) GPL component, then Julia’s licence disallows, until you strip out the sparse-matrix support. I believe the rest is LGPL (or dual-licensed), and all of it would be ok.

There might not strictly be a need to include Julia, since Unreal, and C++ game [engines] are doing fine. Most games engines do not handle the game logic with C++, meaning some other language is used, e.g. Python, more often Lua, by no mostly some drag-and-drop GUI language as in e.g. Unreal?

But since they open the door to add a language, anyone know which one is most used with e.g. that engine?

Anyone know which is the best engine, e.g. for the future, i.e. ray-tracing hardware?

Note also in the doc:

“Paid Plug-in” means any Paid Content which includes a C++ code plug-in.

In case people think Julia is actually disallowed because of C++ dependency, e.g. LLVM. Then LLVM is now optional as of Julia 1.8. There’s not a lot of other C++code? Can anyone give a partial or full list?

With two new Vulkan backends (Clustered and Mobile), Godot has never been so advanced in rendering.

Please let me know of any of the 3D games already made, or you plan in Julia…

1 Like

Why do you want to use Julia in a game engine? While I suppose some of the linear algebra may be convenient in Julia, working around the garbage collector to get consistent low latency is going to be a major challenge. You’d probably need to write everything to be allocation-free.

If you don’t want to use C++, I’d look at using something like Rust.

Isn’t Unity extended in garbage-collected C# ?

  • fast AI/ML prototyping; Simulation Intelligence; Simulation-based games ; OpenAI Gym;
  • and Julia is better AI/ML language than Python/R

IMHO: this is very important topic for the Julia community!

example for the academic world:
arxiv: “Simulation Intelligence: Towards a New Generation of Scientific Methods”
Submitted on 6 Dec 2021; 108 pages

abstract:
"The original “Seven Motifs” set forth a roadmap of essential methods for the field of scientific computing, where a motif is an algorithmic method that captures a pattern of computation and data movement. We present the “Nine Motifs of Simulation Intelligence”, a roadmap for the development and integration of the essential algorithms necessary for a merger of scientific computing, scientific simulation, and artificial intelligence. We call this merger simulation intelligence (SI), for short. We argue the motifs of simulation intelligence are interconnected and interdependent, much like the components within the layers of an operating system. Using this metaphor, we explore the nature of each layer of the simulation intelligence operating system stack (SI-stack) and the motifs therein:

  • (1) Multi-physics and multi-scale modeling;
  • (2) Surrogate modeling and emulation;
  • (3) Simulation-based inference;
  • (4) Causal modeling and inference;
  • (5) Agent-based modeling;
  • (6) Probabilistic programming;
  • (7) Differentiable programming;
  • (8) Open-ended optimization;
  • (9) Machine programming.

We believe coordinated efforts between motifs offers immense opportunity to accelerate scientific discovery, from solving inverse problems in synthetic biology and climate science, to directing nuclear energy experiments and predicting emergent behavior in socioeconomic settings. We elaborate on each layer of the SI-stack, detailing the state-of-art methods, presenting examples to highlight challenges and opportunities, and advocating for specific ways to advance the motifs and the synergies from their combinations. Advancing and integrating these technologies can enable a robust and efficient hypothesis-simulation-analysis type of scientific method, which we introduce with several use-cases for human-machine teaming and automated science."


And this paper mentions JULIA multiple times!

Julia δP : differentiable programming as a scientific ML lingua franca Dynamic programming languages such as Python, R, and Julia are common in both scientific computing and AI/ML for their implementation efficiency, enabling fast code development and experimentation.”

“In practice, simulators for complex environments are typically built on game engines [220] that do not necessarily suffice for causal reasoning, including the simulation testbeds for AI agents such as Unity AI [221] and OpenAI Gym [222].”

2 Likes

This post was temporarily hidden by the community for possibly being off-topic, inappropriate, or spammy.