I've recently been working on an engine for a game I'm working on. I have chosen to make the layout the engine, in such a way that the engine is in an exe and the gamecode is in a DLL. The way it is now, is that the engine calls an entrypoint in the DLL. Problem is that if the entrypoint has a loop in it(Infinite or not), the engine will hang, waiting for the DLL's entrypoint to return. How can I avoid this ? I thought of creating a thread to run the DLL in, but I'm not sure if it going to work. Thanks in advance.
Btw. I'm using Delphi/Pascal