Skip to content

r4nn0/gmsOpenNewWindow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

gmsOpenNewWindow

Open two game windows at the same time in a GameMakerStudio2 project

NOTE:

This library works on Windows OS only

How to use

  1. Compile the cpp and the header file or you can also use the pre-compiled version of the library(skip second step in this case)

  2. After compiling you will have to look for a dll file

  3. Import the dll file to your project, drag the file and drop it in the IDE

  4. Here you will have to define the function in GameMaker so you can use it
    to do so you will write the following code in a create event of a persistent object
    preferably assign it to a global variable.

windowCreate=external_define( "gmsOpenWindow.dll",
                                "open_another_window",
                                dll_cdecl,
                                ty_real,
                                1,
                                ty_string);

the external_define function looks for the specified function (Second Parameter)
in the library included (First Parameter), the third parameter specifies what type of function call is it
the fourth parameter is the return type, the fifth parameter is how many parameters the function in the library takes in
and depending on how many parameters you will pass in the datatype for each parameter in the 5+nth parameter.

  1. Now you will make a function and call it what ever you want
    For example: Create_extra_window(), and give it a single parameter
    in this case its the title of the new window so we can call it "caption"
function create_extra_window(caption) {
    if(parameter_string(3)!=caption)
        return external_call(windowCreate, caption);
    window_set_caption(caption);
    return 0;
}

Please note that this function will not create two windows with the same caption/title
as it is an error handling method to avoid creating unlimited windows

And now you can enjoy creating multiple gamemaker windows to debug your multiplayer game.

License

The project is absolutly free to use, any feedback would be greetly appreciated
support us by subscribing to our youtube channel GrodRiket Security
you can contact us on our website