Main > Main Forum

HI-SCORE: worldwide sharing & public competitions (easy way)

<< < (17/22) > >>

severdhed:
i tried with drivehq.com last night, set up an account and mapped the drives, it worked fine until rebooted. then it shows up as a disconnected network drive and makes me re-enter the password.  i couldn't get it to automatically remap the drive upon reboot, although i didn't mess with it very long last night.  i tried mapping the drive via batch file, but without explorer loading none of the startup processes run.  i'm not sure if i can use srvany to create a custom service to run the batch file to map the drive or not. 

how would I go about using the hitotext utility to eliminate the problem with two people running the same game at the same time?

upprc04:
I think you can use the net use command to have network drives be persistent.

http://technet.microsoft.com/en-us/library/bb490717.aspx

Not sure how it works with explorer not loading.

torino:

--- Quote from: severdhed on June 15, 2011, 01:06:08 pm ---i tried with drivehq.com last night, set up an account and mapped the drives, it worked fine until rebooted. then it shows up as a disconnected network drive and makes me re-enter the password.  i couldn't get it to automatically remap the drive upon reboot, although i didn't mess with it very long last night.  i tried mapping the drive via batch file, but without explorer loading none of the startup processes run.

--- End quote ---

net use DRIVE: WEB_ADDRESS /user:USERNAME PASSWORD


For example to map my web-folder to Z: drive type this:

net use z: http://www.drivehq.com/webdav/OnlineMAME /user:OnlineMAME letmeplay


If you do not have "net" command I attached .zip file, also containing .BAT script and HiToText utility.



--- Quote ---i'm not sure if i can use srvany to create a custom service to run the batch file to map the drive or not. 

--- End quote ---

I don't know what you call "service" but all you have to do is instead of starting up MaLa directly you start your .BAT file which first does all the initialization and then at the end calls MaLa and everything goes as usual from there.

Maybe you're talking about "when" and "how often" the scores will be synced with the server? I would not use any background process to make updates at some time intervals, rather you should be able to execute "SYNC.BAT" script from within your front-end, say triggered by starting and/'or exiting a game.

By the way, don't know about MaLa, but they say HyperSpin has ability to show hi-scores outside of the game, in the front-end itself, which is actually the original purpose for HiToText utility. 



--- Quote ---how would I go about using the hitotext utility to eliminate the problem with two people running the same game at the same time?

--- End quote ---

HiToText have "-r" command to read (parse), and "-w" command to write (merge) scores, so when you execute something like this:


FOR /f "skip=1 tokens=1,2,3 delims=|" %%A IN ('HiToText -r ../hi/galaga') do (
   SET /a IsDuplicate=0
   FOR /f "skip=1 tokens=1,2,3 delims=|" %%E IN ('HiToText -r ./hi/galaga') do (
      if %%B==%%F (IF %%C==%%G SET /a IsDuplicate=1) )
   IF !IsDuplicate!==0 HiToText -w ./hi/galaga %%A %%B "%%C"
)

...it reads client scores, one by one, compares them to server scores and if the entry does not already exist it inserts (merges) that client score with the rest of the server scores. In my original script file I do this both ways (step 3 and 5), which is unnecessary, but if you are ready to try it out I will write a better script, probably without locking of the server file during the syncing which is most likely not necessary either. There also are some quirks with file paths when using HiToText, so the directory structure is important, which I will explain once you are ready to try it out.

severdhed:
i tried mapping the z: drive to my drivehq account, which works fine either manually (right-click, map drive) or via command line. (net use...both with and without the /persistent:yes switch) and no matter what, though when i reboot, it shows up as a disconnected drive and asks for a password when i double click on it.

i used the mala launcher plugin which will launch additional programs after mala loads, to launch a batch file with the net use command in, but it still doesn't seem to work.


as for what i call a "service" i mean a windows system service.  you can use srvany to create custom services, if you need an application to run as a service...this does not seem to work with batch files.

i then tried going back to drop box, and using the mala plugin to launch it, but it still doesn't seem to work consistently.  it seems to be an issue with dropbox and keeping multiple versions of files. (for instance, i have a client with two computers in two different buildings. monthly, they need to transfer 17 small files from one computer to the other for accounting purposes.  we used a batch file on each end to copy the 17 files from the original folder to the drop box, and one at the other end to copy from dropbox folder to the destination.  however there seemed to be a problem because when we copied the files into the drop box on pc1, you can see the files and the date and time they are created.  however if we do it again to overwrite them, it copies the files correctly, but the created time doesn't change.  even if we delete the files out of the drop box first, and then copy them in, it still doesn't change.  unless we delete them, wait about 30 seconds, then copy them...then they work.  i think the same thing is going on with the mame hi files.  they are being overwritten, but aren't changing properly.

i'm about to just give up on this...

as for that batch file to merge the hi scores, that looks complicated and coded for just galaga, would there be an easy way to have this work with every game, or would each game have to be hard coded in?

torino:

--- Quote from: severdhed on June 16, 2011, 12:44:20 pm ---i tried mapping the z: drive to my drivehq account, which works fine either manually (right-click, map drive) or via command line. (net use...both with and without the /persistent:yes switch) and no matter what, though when i reboot, it shows up as a disconnected drive and asks for a password when i double click on it.

--- End quote ---

Did you make some "INIT.BAT" script that contains a line like this: "net use z: http://www.drivehq.com/webdav/OnlineMAME /user:USERNAME PASSWORD", and placed it in your "Startup" folder so it executes upon Windows boot?

If that does not work it's because internet connection is not ready yet, but that's not a problem as we do not need to map that drive until we actually need to access files on the server with our "SYNC.BAT" script, so we can put "net" command there together with everything else.



--- Quote ---i used the mala launcher plugin which will launch additional programs after mala loads, to launch a batch file with the net use command in, but it still doesn't seem to work.

--- End quote ---

Do you start MaLa by placing its shortcut in "Startup" folder so it launches upon boot? If so than again it's most likely too early for Windows to do it at the very beginning when network drivers are not yet fully initialized. This would affect dropbox just the same.



--- Quote ---i'm about to just give up on this...

--- End quote ---

Hold on, we have not even started yet. All you need to do is find out if MaLa can run .BAT scripts either triggered by selecting, starting or exiting some game. That's it. If you can do that, then you have everything ready to go, and I'll do the rest.



--- Quote ---as for that batch file to merge the hi scores, that looks complicated and coded for just galaga, would there be an easy way to have this work with every game, or would each game have to be hard coded in?

--- End quote ---

Code is ugly, but its meaning is simple, it's the easiest way to do it properly. The script can be extended to also work with every other game supported by HiToText, and I'll do that if you conclude you're happy with initial tests and how the system generally works.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version