• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

 [SOLVED] get gamemaker version?

S

Sam (Deleted User)

Guest
I think there should be a way to get from a function or constant what exact version of GameMaker a game was compiled with.

GameMaker Studio 2, just like 1.4, has a ton of bugs, especially with HTML5. This would also be useful for people writing extensions because, if a certain update of GameMaker Studio 2 broke their extension, they could program a work-around that only applies to the versions of GameMaker that have the problem.

This could save extension developers a lot of headache, over users complaining about an extension not working, due to the version of GameMaker they are using.

Anyone else find this to be a good idea? I'll file a helpdesk ticket if enough people find this useful.
 
Last edited by a moderator:

rwkay

GameMaker Staff
GameMaker Dev.
That is a good idea and I have added it as a new compiler constant GM_runtime_version which is a string that has the current runtime version in it (on 1.x this will be the IDE version).

The current compiler constants then are

GM_build_date - the datetime of when the build was made (you can use the datetime functions on it)
GM_version - string with the version number of the executable
GM_runtime_version - string with the runtime that was used to compile the game.

Russell
 
S

Sam (Deleted User)

Guest
@rwkay Wow! I wish I saw this sooner! Thank you so much!! :D :D :D I don't mean to act high or anything, but I'm super duper happy knowing how quickly my suggestion was considered and accepted! YAY!! Again, thank you so very much Russell!! :) :) :)
 
Last edited by a moderator:

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
Nice!

Seems that GM_runtime_version hasn't been added to the 1.4 stable build yet, is that right?
If Russell said that he added the constant just now, and you are not seeing a new stable 1.4 build, then you can generally assume that it did not magically retroactively appear in the existing one.
 
S

Sam (Deleted User)

Guest
That is a good idea and I have added it as a new compiler constant GM_runtime_version which is a string that has the current runtime version in it (on 1.x this will be the IDE version).

The current compiler constants then are

GM_build_date - the datetime of when the build was made (you can use the datetime functions on it)
GM_version - string with the version number of the executable
GM_runtime_version - string with the runtime that was used to compile the game.

Russell
@rwkay I noticed you guys added GM_build_date and GM_version to both GMStudio 1.4 and GMStudio 2, and for that I can't thank you enough! :D

Question though - GM_runtime_version seems to only be present in GMStudio 2. Are there still any plans to add that constant to GMStudio 1.4?
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
Question though - GM_runtime_version seems to only be present in GMStudio 2. Are there still any plans to add that constant to GMStudio 1.4?
It is not highlighted by auto-completion, but doing
Code:
show_debug_message(GM_runtime_version);
in 1.4.1773 does display "1.4.1773.42006" as expected.
 
Top