CAS-ual-TY / YgoDuelingMod

The Ygo Dueling Mod for Minecraft aims to reflect the real life TCG experience in a 3D open world game by not only adding the cards but also the packs and their pull ratios to the game.
GNU General Public License v3.0
5 stars 9 forks source link

Possibilities for interating with YGOPro server? #2

Open purerosefallen opened 4 years ago

purerosefallen commented 4 years ago

I'm not sure cards could be handled by reading lua scripts, but if a ygopro client could be implemented in this mod, it could also be a choice to launch ygopro server instances for hosting the duel. https://github.com/mycard/ygopro/tree/server The above one is the server of ygopro. It launches by command args and hosts 1 room listening on a specific port optioned with args. A possible design could be, to launch an instance of ygopro server when any duel starts, and send duel data with ygopro protocol to the server, and refresh the field with the returned info. You may also refer to the client code of ygopro on the master branch for the protocol and client implementation of ygopro. I hope automatic dueling mod would come out soon.

CAS-ual-TY commented 4 years ago

Whats the point of connecting to a ygppro server? Why not just create the interface for the LUA files in the mod directly?

purerosefallen commented 4 years ago

@CAS-ual-TY Then you don't have to care about parsing Lua scripts and remake a whole yu-gi-oh server. You just need to do the client part, and intracting with YGOPro server. It would be less work. YGOPro only works with Lua scripts on the server side only. The client almost does nothing but handles data from server and makes responses.

IMJoyJ commented 4 years ago

It doesn't make sense to code hundreds LUA functions again, for there is already a implement. And it may be a cool idea to duel with someone out of Minecraft - or with someone in ANOTHER MINECRAFT WORLD. These are also benefits if we use a existing server. Focus on the UI only and there is muuuuuuuch less work to do.

CAS-ual-TY commented 4 years ago

I would not code any LUA scripts, I would make an interface which reads them. But the above solution seems easier. Thanks for letting me know about this. I will stay with the manual implementation for now, but might look further into this in the future.