Ludii Forum
Remote custom scripts - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Suggestions (https://ludii.games/forums/forumdisplay.php?fid=10)
+--- Forum: Ludii Features / Services (https://ludii.games/forums/forumdisplay.php?fid=11)
+--- Thread: Remote custom scripts (/showthread.php?tid=419)



Remote custom scripts - slimy_asparagus - 02-04-2021

We would like to be able to play custom .lud scripts remotely.

How difficult would this be to achieve? I guess this depends how much your server needs to know about the code. Maybe for custom scripts the server would pass the code from the source player to all the other players. Or perhaps all players would have to have the same code and theĀ  server would only verify that all players were using the same code.


RE: Remote custom scripts - MatthewStephenson - 02-04-2021

Hi,

The easiest way to accomplish this would be to add your own custom .lud file into the jar for both users.

You can do this by following these instructions:

- Download the same version of Ludii (e.g. Ludii-1.1.13.jar) on both computers.
- Create a new folder in the same directory as the downloaded Ludii jar file, and call it "lud"
- Copy your custom .lud file into this folder, make sure to call it something different from any existing game in Ludii.
- Open a terminal in the same location at the Ludii jar file, and type the following command "jar uf Ludii-1.1.13.jar lud"
- Press Enter to run this command.
- Open the Ludii-1.1.13.jar file and you should now be able to load your custom .lud file, just like loading any normal game included in Ludii.

I have only tested this on my own machine, so if you have problems I can try to help.

Cheers,
Matthew


RE: Remote custom scripts - slimy_asparagus - 02-04-2021

Matthew,

Some BGG hackers have already figured that out. I am asking if it could be supported without repacking the jar file.


RE: Remote custom scripts - MatthewStephenson - 02-04-2021

Hi,

No we don't support this right now. We might in the future.

Cheers,
Matthew


RE: Remote custom scripts - slimy_asparagus - 02-04-2021

(02-04-2021, 05:03 PM)MatthewStephenson Wrote: Hi,

No we don't support this right now. We might in the future.

Cheers,
Matthew
How much harder would doing the repacking "on the fly" be than loading custom svg files?
And wouldn't this be good for Ludii as a platform?


RE: Remote custom scripts - slimy_asparagus - 02-05-2021

(02-04-2021, 04:30 PM)MatthewStephenson Wrote: Hi,

The easiest way to accomplish this would be to add your own custom .lud file into the jar for both users.

You can do this by following these instructions:

- Download the same version of Ludii (e.g. Ludii-1.1.13.jar) on both computers.
- Create a new folder in the same directory as the downloaded Ludii jar file, and call it "lud"
- Copy your custom .lud file into this folder, make sure to call it something different from any existing game in Ludii.
- Open a terminal in the same location at the Ludii jar file, and type the following command "jar uf Ludii-1.1.13.jar lud"
- Press Enter to run this command.
- Open the Ludii-1.1.13.jar file and you should now be able to load your custom .lud file, just like loading any normal game included in Ludii.

I have only tested this on my own machine, so if you have problems I can try to help.

Cheers,
Matthew
So we tried this. When someone won, they had to restart Ludii completely. If they tried to leave the game it threatened to mark it as a loss.


RE: Remote custom scripts - MatthewStephenson - 02-05-2021

Hi,

This is probably due to the fact that the server cannot find the corresponding game in the Ludii database to record the result on for our leaderboards.

I suggest both players just leave the game when it is over. We don't display the results of custom games, so this loss won't matter.

I should again reiterate that this approach of using your own custom luds for online play is not yet officially supported, and we cannot guarantee that everything will work 100% correctly.

Thanks for letting us know though Smile

Cheers,
Matthew