How to run multiple debug instances of a GM:S game - game-maker

I'm building a client/server application in Game Maker: Studio 1.4 and need to run two instances of the game for testing. Unfortunately, the IDE's run/debug buttons disable themselves after starting the first copy. Is there a way to configure the IDE to permit two instances to run concurrently?
Opening two complete copies of the IDE sort of works, but seems like a great way to break my game by saving things out of sync.
I'm currently exporting the game every time I make a tiny code change and only debugging on the host instance, which is less than ideal.
Is there a way to configure the IDE to allow multiple instances of the game to run via the run/debug buttons?

Allright, here's what I have;
When you compile a game from the IDE you'll see a line like this one somewhere in the compile log:
C:\Users\You\AppData\Roaming\GameMaker-Studio\Runner.exe -game "C:\Users\You\AppData\Local\gm_ttt_92729\gm_ttt_68071\GAME.win"
When you execute that script in a command line (START+R) you'll see the game runs just fine.
In order to automate this, I am using the working_directory variable (which returns C:\Users\You\AppData\Local\gm_ttt_92729\gm_ttt_68071.
As GM:S does not support executing shell scripts, I have added this free asset to my game:
https://marketplace.yoyogames.com/assets/575/execute-shell
In my game I have added a button which calls this code;
ExecuteShell('%appdata%\Roaming\GameMaker-Studio\Runner.exe -game ' + working_directory + "ShootMUp.win",0)
Please note that you'll have to manually edit the .win file name.
But, this works and lets me run multiple instances of the same game without exporting it to .exe or build it again.

Related

What Meson command(s) is Gnome Builder running?

Exactly what command(s) does Builder run internally when I press Run?
In the Builder (43.1 Flatpak) side pane there is this list of tasks:
To build my project I click (yes, with the mouse :/) on the last item, all the undone items are done in sequence, and I get thrown in a shell window where my build lives. And that's very nice, but:
For each of those steps, it would be even nicer if Builder would allow me to see (like in some sort of tooltip? But just in the output logs would be fine) exactly what it is that it's doing, or going to do.
So what I meant is: I really need to know the exact sequence of build command(s) that Builder is running to be able to build independently of the IDE / Editor ; like in a CI / CD pipeline.
It's clearly a combination of meson this and ninja that, but which one exactly? Is there a way to find out? I looked everywhere, also it's a Flatpak version so there are no command-line options or logs..?

Why does the download button behavior on local development depend on the build using `shadow-cljs watch app` or `shadow-cljs serve`?

I have been using Clojure, ClojureScript, lein, shadow-cljs, Emacs, and CIDER to work on a Clojure/ClojureScript dynamic web app project.
The UI has a download button. For the purpose of this SO question, let's abstract it as an interface with the database that gets data in the UI and put the data in an Excel Spreadsheet. Not sure if this is relevant, but the database is handled by Firebase.
It is important to highlight that this Download button works in production.
However, this Download button has a weird behavior in localhost depending on the build approach:
1 - If I build the project by executing the command cider-jack-in-cljs in Emacs, choosing shadow-cljs, then shadow for REPL type, and, finally, app for the building option the build is successful. Things work in general in localhost - except for the download button. The application hangs and the download is not executed.
2 - If I build the project with shadow-cljs watch app things work in general in localhost - except for the download button. The application hangs and the download is not executed.
3 - Lastly, but not least, if I build the project with $ shadow-cljs server. Things work in general in localhost, including the download button!
Thus, I would like to ask:
(i) - Why does the behavior of this feature depend on the build process?
(ii) - Why is $shadow-cljs server successful while other approaches are not?
(ii) - Approach 1 uses an interface with Emacs to build and 2 uses a raw terminal. I am not sure if they are exactly the same build process, but I believe they are equivalent. Are they?

Start a background process on Qt and load responsive shell environment

I am playing around with Qt to create a simple GUI for some more advanced analysis with the software called OpenFOAM. Right now, I want to start an application of the toolbox OpenFOAM usingQProcess::execute. It is working but for the application I need to load the environment in the shell.
Commonly, if I work in the terminal I first do have to source the environment file that loads all libraries and solvers one can use. However, in Qt, I am not aware how to achieve that.
Example. In the terminal I need to do the following:
source /path/to/environementFile
simpleFoam > logFile << application
I want to start the application simpleFoam in the background of my GUI after clicking on a button. Right now, I do have the following:
QProcess::execute(QString("/home/shorty/OpenFOAM/platforms/bin/simpleFoam"));
This works but the shared library that are needed by the application are not loaded (missing source of the environment file). Is there a way how to process more commands within one execution call?

QTCreator Memcheck performing analysis without letting me run the actual program?

I am attempting to use QTCreator's Memcheck tool to analyze the memory of a QT project, which is a dynamic library. It uses a QT Gui (QMainWindow) to allow the user to select a file, which is then processed, and then eventually returns to the mainwindow.
However, I cannot seem to use Memcheck properly.
When I select "Memcheck" and hit run, it instantly goes to "Analyzing memory" without ever letting the Gui pop up.
This is problematic. How can I get memcheck to work with this program?
I had two main issues:
1: Valgrind does not seem to play nice with QT Gui applications. It generates logs that are thousands of entries long for all the work QT is doing before it even gets to my application.
I had to make a separate, small non-GUI C++ program that would drive instead of the GUI application.
2: When trying to run from the command line, I needed to set an environment variable by using export. This needs to be the same as LD_LIBRARY_PATHS in QT Creator.
So I ran:
export LD_LIBRARY_PATH=X where X was the exact value I copied from LD_LIBRARY_PATHS in the variable from the QT Project.
Note: Running from the command line may have not be neccesary now that it isn't a GUI Application, memcheck might have passed just fine. Haven't tested since.

Raspberry Pi Custom SD Card Image

I have a project uses Qt GUI which works on raspberry-pi2; however I don't want users to interact with the operating system. I just want that the only application appears on the screen (from boot to shutdown) to be is my application. Actually the retropie project has done what I actually want. So I want to prepare an minimal SD Card image like that. Is there any tool or way to do that?
You can use openembedded http://www.openembedded.org/wiki/Main_Page for this.
Creat file that describe packages for your image, at your case base system + qt,
plus create description of package of your program, that include .service file for run you program at start with systemd. The command MACHINE=raspberry-something bitbake your-image
I'd just use the init scripts to run your application as soon as possible and make it handle all user inputs (keyboard and mouse) properly, without giving any way to the user to close it.

Resources