• 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.

Question - Code Built-in High Score functions

jeff300

Member
I am working on multiple GMS2 projects and some of them have high score tables implemented using the GMS2 high score functions.

It seems that all games on my systems (Mac and Windows) that run within the IDE are sharing the same table and that all compiled games on my systems are sharing another table.

This is highly annoying and ridiculous. Do I have to do anything special to make each game have its own individual high score table? I would hope that GMS would create a high score file in the directory of each game. No?
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
While testing on Windows, each game should have a Local AppData folder with it's own unique hiscores.dat file, so you shouldn't see this issue. However, due to the way that GMS2 tests projects on the mac (using the same runner for all games) there is only one hiscore.dat file used for all tested games. However, created executables will not share this file and will work with individual files as you'd expect. Your best bet is to simply remove this file each time you change project (it can be found here, iirc: /Library/Application Support/com.yoyogames.macyoyorunner )
 

jeff300

Member
Thanks for the reply, Nocturne.

I do my main development on Mac and occasionally fire up Windows to test and do the final build. I hadn't done it on Windows for a while. I could have sworn I was seeing the same problem on Windows, but I just re-tested and as you say, it works correctly both when testing from the IDE and from executables.

As for Mac, I searched for the entire file system for com.yoyogames* and found nothing. And I am definitely seeing the same problem in both the IDE and compiled executables. :(

Is this a known Mac bug that's going to be fixed?
 

jeff300

Member
OK, I figured out what was going on with my Mac executables. The hiscore.dat file is stored in <userhome>/Library/Application Support/<App ID>.

1) I was looking in /Library... instead of ~/Library
2) I had not correctly set the App ID string in my second game to be different than the one in the first game. DOH!

Lesson learned.

Still sucks that within the IDE the games use the same container.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
OK, I figured out what was going on with my Mac executables. The hiscore.dat file is stored in <userhome>/Library/Application Support/<App ID>.
Great that you've solved it! :)

Still sucks that within the IDE the games use the same container.
Feel free to file a bug report requesting that this be revised. Both platforms should probably have the same behaviour...
 
Top