Replies: 4 comments
-
I already developed a platform that organizes & plays them using this plugin as well & would really like this feature for games that have a score. |
Beta Was this translation helpful? Give feedback.
-
MAME (and probably other cores too) have support for a file called HISCORE.DAT. This file describes how MAME should extract the high scores from games. I haven't tried it out yet (I plan on playing with it in the next month or so), but the containing web page should upload the HISCORE.DAT file into the EJS virtual file system in the correct place, and that should be it. MAME would then start outputting files containing the scores named for the ROM that was loaded (the MAME documentation has all this documented). The containing web page would periodically monitor the virtual file system for the presence of these files and download/act on them as needed. It'd need to be a poll since to my knowledge, there's no way to generate an event when these files are saved to the virtual file system. |
Beta Was this translation helpful? Give feedback.
-
If I understand correctly.. it puts the score & game file name (for identity) into memory & then I suppose one would have to use setInterval() to continuously check if those were set. At that point I can have it do the Ajax Post call to save the score server side. If something like this is possible it will be a great addition! Just some thoughts.. |
Beta Was this translation helpful? Give feedback.
-
In my mind, all of this is outside of the scope of the EJS project, and would be the responsibility of the containing app. At most, EJS could provide API endpoints that the containing page could call. For auto save, the containing page can call the save page function using a SetInterval to call a save state command and then pulling the state file out (I don’t yet know how to do this). For scores, it would be largely the same… upload the hiscores.dat file when starting the core, and then poll for the presence of output files. I believe you could also upload the last high score table for persistence. Again, I don’t have any further details as I haven’t looked into the details yet. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm trying to build a site using emulatorJS and I need to save the high scores for each game in my server. I'm using roms with the default arcade core. I guess I need to specify the path for the highscore.dat, probably with some core option, but I'm not sure how. Is it posible? Do I need to host the core files to achieve this? Do I need to deal with some Retroarch configuration?
I'm quite newbie, so sorry if I'm doing basic questions, but I didn't find any info regarding this 😅
Thanks and congratulations to the creators & contributors of this amazing project!
Toni
Beta Was this translation helpful? Give feedback.
All reactions