Using a game engine as a library

Started by
5 comments, last by Rob_I 5 years, 6 months ago

Greetings,

I have a specific need to launch a game from an existing app.  Has anyone come across a game engine that can be built in this way?  Any help would be appreciated.

Thank you!

Robert

Advertisement
8 minutes ago, fleabay said:

Does the existing app have an SDK or allow plugins? Can you say what the app is?

If you are saying the existing app is something you can compile, most languages allow you to issue system calls to start programs.

Hi, thanks for the reply.  There is a third party app that is interested in a project I have completed.  They want to try to incorporate the game into their app, I can certainly utilize .dll's and even create an SDK if the game engine allowed it.  I currently use Unity3D which doesn't support this (there are hacks but I would rather not hack it).

Hopefully that clears it up a bit.

Thanks again,

Rob

It is not possible this way as you need two things to at least embedd the game into the app, some kind of Render Canvas that is able to act as the render target for the game and the game must provide a possible way to define the render target except for making it's own window when launching.

Unity 3D is closed source so your only option is to use OS APIs to stick the UnityPlayer window to the app, listen to events of that window (Resize, FullScreen, Close) and react to always keep the window as child of the App-Window but that is tricky and hackish. Unity itself has a launcher and a player that will take everything from your game into their C++ code embedding Mono Runtime to run C# or whatever you used to make your game and don't let anything go to the outside. This is how any of the modern tools like Unity3D, Unreal Engine 4 or GameMaker works.

Another way is to have the App launch your game but it dosen't sound in your request that this is the goal

Thanks Shaarigan,

Your assessment is spot on.   I'm looking for an alternative engine to Unity3D and I will re-write my game.  I'm wondering if there is a game engine (Godot, Urho3D, Lumberyard) that anyone has used which would allow this time of linking?

Thanks again!

Rob

You might want to approach this the other way around:

- first find out which kind of (embedded in the other app) windowhandle/surface/whatever you can get access to in this project as a plugin/whatever

- then find some way to use what you got

5 minutes ago, wintertime said:

You might want to approach this the other way around:

- first find out which kind of (embedded in the other app) windowhandle/surface/whatever you can get access to in this project as a plugin/whatever

- then find some way to use what you got

Good suggestion, absolutely.  I'm approaching this from a few different angles. 

This topic is closed to new replies.

Advertisement