No Game Run

Reporter: RobertBColton  |  Status: open  |  Last Modified: July 04, 2020, 04:21:22 PM

@fundies now how exactly is the CI supposed to run the game?
fundies  
Well you can either delete the -r flag and run ./emake ... && ./out.exe or you can implement opening the exe in emake as 1 liner system call I guess but I prefer no -r
RobertBColton  

After the conflicts I faced in #2070 with regards to handling processes, I am not sure if we want to consider moving this code and bettersystem to a new library. I mean if emake, RGM, and LGM plugin all need to duplicate similar process handling logic in a cross-platform way, why not have them all run the same code. I don't how much it will effect RGM, but it also seems that Qt Framework and wxWidgets don't provide very good control over process groups. As I've shown, process groups are a very useful abstraction for managing various aspects of the build phase.
fundies  

After the conflicts I faced in #2070 with regards to handling processes, I am not sure if we want to consider moving this code and bettersystem to a new library. I mean if emake, RGM, and LGM plugin all need to duplicate similar process handling logic in a cross-platform way, why not have them all run the same code. I don't how much it will effect RGM, but it also seems that Qt Framework and wxWidgets don't provide very good control over process groups. As I've shown, process groups are a very useful abstraction for managing various aspects of the build phase.

Qt has it's own stuff for launching exes and I think we should use that for RGM. I never wanted emake to launch games as you can just && game.exe . Honestly, I think "bettersystem" is pretty gross. I know it's needed to invoke gcc for jdi (but can we do this internally with some libgcc api instead)? And it's also used to launch make which I'm not sure we can avoid. I dislike that we can't edit / substitute the build commands without huge changes to the compiler. This makes it a pain to support multiple build systems. I would prefer we have more agency in the build process similar to geany:
image

RobertBColton  

There is not yet a standard process API fundies, but there is a proposal.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1750r1.pdf

Regardless, as I said I think Qt's and wxWidget's process abstractions are not necessarily as powerful enough. They lack process group management, which is what allowed me to easily send a CTRL+C to make and all of its children. That was important, because, while make subreaps its children, it does not forward SIGINT or deal with it as far as I could tell in the source.

Yes, we could certainly use more modularization in the build process, that is absolutely a good idea. A lot of what you're proposing is possible too, that UI could be added right now, just need more developers.

time-killer-games  

This is just a suggestion, and you don't have to do it if you don't like the idea. I think when running from the IDE there should be a setting to keep the game on top of the IDE window when the game isn't minimized. An alternative would be to hide the IDE all together like older versions of GameMaker did. I wrote a function that does this for Windows, Mac, and Linux. Windows and Linux are rather easy to do because they both have an official api for this purpose. Mac however does not, at least not for two separate application processes, so I wrote an api which uses a window subclass on mac to imitate this behavior the best the OS will allow with its unnecessary level of security measures. See my process information code under wid_set_pwid() which sets a parent window id for a given child window id. I'd like to add this myself if I could be shown what part of RGM handles running the game.
Please sign in to post comments, or you can view this issue on GitHub.