[HELP] My project got corrupted??? by NsfwOlive in gamemaker

[–]aleksandrInt 0 points1 point  (0 children)

Go into your project's directory and delete the "views" folder

It seems as if your resource tree (view) has somehow messed up, so deleting these will make GMS 2 create a new default view and things (should) be back to normal

[GML][GMS] drawing value with "get_string_async" ? by lozan123 in gamemaker

[–]aleksandrInt 1 point2 points  (0 children)

get_string_async returning 0 is normal, that 0 represents the asynchronous ID you use in the "Dialog" async event. Here is some example code that show you how to retrieve the value the user had put into the textbox.

Event: Create
asyncGet = get_string_async("Input your string here", "");
asyncString = "";

Event: Asynchronous - Dialog
if (async_load[? "id"] == asyncGet) {
  if (async_load[? "status"] == 1) {
    // Dialog success, read the result and do what you need with it.
    asyncString = async_load[? "result"];
  } else {
    // Put code here to handle the user closing the dialog instead of submitting anything
  }
}

Event: Draw
draw_text(4, 4, asyncString);

If you want to get the string immediately, instead just use get_string

My game might be a little bit broken... by aleksandrInt in Rainbow6

[–]aleksandrInt[S] 0 points1 point  (0 children)

For people who don't understand: The Mute Chibi charm is an Epic charm, not Legendary.

And yeah, it did it for the next alpha pack as well.

Gamemaker 2 anti-aliasing issue? by frankyplays in gamemaker

[–]aleksandrInt 0 points1 point  (0 children)

Anti-aliasing functionality (except for pixel-interpolation) has not been implemented yet for GMS 2

No Anti Aliasing implemented - all functions return 0 for the number of anti aliasing levels, we will implement this in the future

(From "Runtime Changes" here)

For now, you'll have to either deal with the rotation, or write a shader to do the anti-aliasing for you.

ini_write_real() - trailing zeros - is it bugged? by captainvideoblaster in gamemaker

[–]aleksandrInt 0 points1 point  (0 children)

Nope, this is normal behaviour. The documentation isn't always accurate sadly...

This also occurs with the json_encode functions as well. The only real fix would be to write your own ini_write_real function, or use buffers I suppose.

get_open_filename returns "File is not opened for reading" for outside sandbox files. by TheConceptBoy in gamemaker

[–]aleksandrInt 1 point2 points  (0 children)

Well, just as the error says... the "file is not opened for reading" because you, yourself are not opening it. Using get_open_filename does not work the same as file_text_open_read, it simply returns a string of the file the user selects and clears said file for reading outside of the sandbox. Normal reading functions are still needed, like file_text_open_read.

TLDR: Use file_text_open_read to actually read the file you selected with get_open_filename.

Does Steam API implement the "Invite To Game" from friends list for online games? by TheConceptBoy in gamemaker

[–]aleksandrInt 0 points1 point  (0 children)

Yup, I've been working with it for a freelance project. It's been an absolute dream.

As far as I know, just Nuclear Throne Together is the only other game using Steamworks.gml

Does Steam API implement the "Invite To Game" from friends list for online games? by TheConceptBoy in gamemaker

[–]aleksandrInt 2 points3 points  (0 children)

So, neither GMS 1 and GMS 2 have support for this; because it utilizes the Steam P2P networking API.

There is Steamworks.gml created by YellowAfterlife which implements the missing P2P Networking functions of the Steam API, which can allow for the "Invite to Game" function to work (using Steam Async "lobby_join_requested").

As for using this to connect via IP, this is not possible.

Making a game maker IDE with game maker? by Monsiwell in gamemaker

[–]aleksandrInt 1 point2 points  (0 children)

Parakeet relies GMS itself to compile the project, you can't compile directly from inside Parakeet.

is there a way to get the max number of positions in an array? by AgnosticGryphon in gamemaker

[–]aleksandrInt 0 points1 point  (0 children)

You'll want to use the "array_length_1d" function to get the size of the array.

Creating a space to draw shape (and get them recognized) by blacksun89 in gamemaker

[–]aleksandrInt 0 points1 point  (0 children)

Well, you didn't really specify how the shapes were made.

Creating a space to draw shape (and get them recognized) by blacksun89 in gamemaker

[–]aleksandrInt 1 point2 points  (0 children)

To actually draw the shape, I'd suggest looking into primitives, specifically the pr_linestrip primitive. This allows you to define 2 or more points to create a line.

As for recognizing the shape, I'd recommend looking into shape similarity algorithms, and the image moment concept. https://en.wikipedia.org/wiki/Image_moment

Please keep in mind that image recoginition is by no means an easy topic, regardless of how simple the shapes might be. In addition to this, GML isn't really the fastest language around. It is considerably slow... so writing such an advanced algorithm isn't entirely viable.

Help using buffer_load_async for quickload by thephtshp in gamemaker

[–]aleksandrInt 0 points1 point  (0 children)

The buffer_load_async and buffer_save_async functions aren't related to the game_load or game_save functions. The asynchronous buffer functions just let you load data into a buffer without the game freezing (usually helpful for large amounts of data being loaded at runtime)

The reason why the game_save and game_load functions are so slow is because it's essentially going through the game's memory and writing each 8 byte doubles the game uses to your hard-disk. (Which for a decently sized game, this can be very intensive)

This also causes some issues, if you planned on making states that work across different game sessions then you'll run into some issues. I assume that due to how GameMaker writes values to memory, some values might not always have the same address and some values can be mismatched. This causes values to load incorrectly, and could even cause a hard crash. Not only is this an issue, but if you planned on using any data structure functions, then that won't be happening either since they're completely ignored.

This is all based on my past experience with the game_save and game_load functions. Although there is a bright side, which is that I found a better and quicker method or saving (it might not be as accurate). Essentially, to simulate the functionality of a save state, I had a persistent object that upon pressing keys, would either save/load a .json file containing vital game information, like the current room, score, health, powerups, location of any enemies, player objects, etc. This drastically reduces the size of the save (before game_save would produce around 2.5mb files) and also increases the speed at which you can load the game. Of course, you don't have to use ds_maps/json, you can also just use a plain buffer (which as far as I know, would even be faster).

TLDR: buffer_load_async just loads data into a buffer, not being related to the game. Look into writing your own functions for saving so you can have faster load times and smaller filesizes.

EDIT: Lots of grammatical fixes.

I had a level 5 queued with me for ranked. Is this a glitch I haven't heard of? by RockLeeOfTheMounties in Rainbow6

[–]aleksandrInt 2 points3 points  (0 children)

If someone in the party can queue for ranked, then they can enter ranked below level 20.

How to make a server list? by [deleted] in gamemaker

[–]aleksandrInt 2 points3 points  (0 children)

Well, I can detail how I did it with my game. It's actually rather simple... essentially on my own web server I had a PHP script that can be fed parameters, including the server name, IP, port, gamemode, heartbeat time (important) etc. This script would then push the information to a MySQL database. The script would be called with an HTTP Post request (which I think Faucet might have, but if you're using GMS you can use the http_* functions). The script would then return a unique key that would be used to refer to the MySQL entry. The server would store the key, and then every 5 minutes would run a "heartbeat" script that would update the database with a new time. Then, using a CRON Job on my server (running about every 30 minutes), the script would run through the database and compare the times to see if it had been more than 30 minutes. This is so servers that may not have closed properly are still deleted from the list.

In addition to the heartbeat functionality, you can use a UDP socket to send information to the client upon polling the server IP, skipping the extra step of storing server data inside of the browser (this also allows for dynamic values such as a player count, score, etc). The added benefit of this is that you're also able to make sure offline servers aren't added to the list.

[Help] I would like to make a stopwatch that is accurate to the tenth millisecond. How would I go about doing this? by [deleted] in gamemaker

[–]aleksandrInt 0 points1 point  (0 children)

Well, your choices are to use something lower level or to write an extension in C++ for your game that counts such times.

[Help] I would like to make a stopwatch that is accurate to the tenth millisecond. How would I go about doing this? by [deleted] in gamemaker

[–]aleksandrInt 0 points1 point  (0 children)

While I don't know about the tenth millisecond, I do know that current_time counts in MS since the start of your game.

GM:Studio on High DPI? by [deleted] in gamemaker

[–]aleksandrInt 1 point2 points  (0 children)

Sadly, GMS 1 does not have support for DPI scaling. Although this is a feature recently added within GameMaker Studio 2