Anyone used a fancy game engine inside a Juce app?

There are some posts on here that ask about using Juce functionality (mainly audio) inside games built with Unreal or Unity… but I am wondering about the opposite. I have a lot of experience with Juce, and I use it as the primary way to build my apps from scratch. For a new app I’m working on, I want there to be a separate 3D window that has some nice real-time rendering. I don’t have any experience working with Unreal or Unity but I was wondering if it’s even possible to use them “just” as the rendering engine, but use Juce for the bulk of the app (mainly a very complex 2D UI with several windows).

To say it another way, I want to link to Unreal or Unity from my Juce app, as opposed to linking to Juce from my Unreal or Unity app.

Anyone have any experience with this or could point me in a useful direction?

Not trivial at all, considering the multi-platform nature.

I think last year Unity released something that allowed an Android app to run a Unity session/surface on top of the native activity.

So that means what you are asking might actually be possible with Unity using that Android render surface technique, I just cannot remember where or how exactly.

The bindings would matter, might be specifically Android for that project.

As far as Unreal, I don’t have much experience trying to get Unreal on anything but it’s own exporter. Sure there has to be a way getting their renderer API to talk to some layer in JUCE you would render to.

Bottom line is, what you are asking is a large rabbit hole full of barbed wire. :wink:

Maybe using a lightweight native browser library and draw with webgl and 3D js libraries if you are going a wild route. :slight_smile: 3D is just a lot to lug around, even in JS you have to setup for the rendering somewhere either a framework or your own webgl code.

On a different note, there is the project;

This was something on the discord that has been made with it’s HTML5/React UI surface in JUCE.

Thanks, your reply is helpful, but just to clarify, I want to be able to do fancy 3D stuff like particle systems, etc. – not just draw basic primitives. That’s why I want a game engine, preferably with physics, etc.

I’m sure such a thing would require a native app. I’m not particularly interested in having it run in a web browser anyway.

Originally I read the post as 3D in app, but I see you did say in a window. You could also try to make the 3D app in Unity/Unreal and use inter-process communication or OSC to communicate with the 3D window.

Just simply make the JUCE app a client and the 3D app the server.

Ah that’s an interesting idea! Thanks.

1 Like

It seems it is only for mobile (no desktop support) but have you tried this Use Unity as a Library | Unity?

That is the link I was trying to remember originally.

Thanks, that’s exactly the kind of thing I was looking for. Seems like it also supports Windows, but not macOS, which is strange, but maybe will change in the future. Also seems like there are some limitations, such as “Unity as a Library supports full-screen rendering only; rendering on only a part of the screen is not supported”. I would want to have it in a window (not fullscreen) so that the rest of the Juce UI remains visible.

Here’s a post I found from several years ago. Not clear if things have changed since then.
Compile Entire Engine as a Library - Unreal Engine Forums

And another one. Is it possible to use the Unreal Engine as a big C++ library, without using the editor? - Game Development Stack Exchange

1 Like

Alright I know I am sounding repetitive here but this is why i said a rabbit hole, I have researched things like this and read it all the time. :slight_smile:

“While technically feasible and from what I am reading in compliance with the EULA, I would strongly advise not going down that road as “there be dragons”. IMO the two sweet spots are you staying with your current tech or going with ours; we’ve never seen the hybrid approach work out in practice”

:slight_smile:

Yes I saw that.

Looking at the Wikipedia page List of game engines - Wikipedia, the one called Ogre (https://www.ogre3d.org/) seems to check a lot of the boxes and appears to be a traditional C++ library. I like that it supports Metal and Direct3D since OpenGL seems to be on the way out.

I’ll try to do some testing and report back.

1 Like

Hi there! Any luck with Ogre so far?