magefree / mage

Magic Another Game Engine
http://xmage.today
MIT License
1.86k stars 761 forks source link

[Proposal] Unity3D Recreation of XMage #7010

Open analytic-bias opened 4 years ago

analytic-bias commented 4 years ago

I would like to make something like MTGA with the codebase of XMage. The goal is to make it have the pros of both two games: friendly interface and good new-player experience (so that we can convert people to MTG, which is important) from MTGA and 10000+ cards and freedom (open sourced, no colletible function, no money invovled) from XMage.

Ideally, what I would expect is that it will be compatible with XMage codebase for all future versions (i.e. all future cards can be wrote once in Java and then usable to both XMage and the Unity3D recreation).

Here's some questions for the community:

analytic-bias commented 4 years ago

Possible techstack: Unity3D, IKVM

JayDi85 commented 4 years ago

Is there already a project similar to my proposal?

  1. Nope, but you can find more details in #5373

Is what I'm proposing allowed by you the developers?

  1. Yes, you can do anything you want. It's a MIT license.

How is the current XMage codebase in terms of compliace with the comprehensive rulebook?

  1. It support full rules with some exceptions like mutate cards or offline mechanics for un-sets. XMage uses server side logic and cards processing, client sends only commands and feedback from users.

Is there anyone wanting to join me developing this?

  1. There are a "littile" problem -- xmage uses JBoss network engine (binary protocol with java objects). It's incompatible with any third party clients (even JVM must be same major version for both client and server). So that engine must be reworked and replaced with text base protocol like json or another. Search issues for graphql for more details, discussions and examples.
theelk801 commented 4 years ago

Unity uses C#, right? would that present an issue?

analytic-bias commented 4 years ago

@theelk801 I don't think so. There's something called IKVM that allows such interoperation, and I'm going through the codes under Mage folder and it seems it's rather well-designed and decoupled.

analytic-bias commented 4 years ago

Hi developers.

If it's not too bothering, could you please write and publish a short document on the API of XMage codebase like "invoke this to setup a deck, that for starting the game, that to play a card, that to tap" etc.

JayDi85 commented 4 years ago
allentiak commented 4 years ago

@zhangyutong926

You might be interested in give Matag a look. (Disclaimer: I have done almost trivial contributions to it.)

MaTaG has a great UI (see below). Whereas its backend is quite limited, I think it could be possible to modify it to work as an XMage client. Just be aware that MaTaG's license is AGPL, so if it gets integrated into the XMage client, its license should be switched to AGPL...

MaTaG' UI

JayDi85 commented 4 years ago

Intergating project/service (bridge between xmage server/client and third party app) can be made at any license.

allentiak commented 4 years ago

It always depends on the definition of "integrating".

The advantage I see in such a licensing choice is that this would prevent any attempt to "privatize" the code by any third-party. This is the case for Magarena (GPL3), Forge (GPL3), and MaTaG (AGPL3-or-later). Whereas the current XMage licensing choice (MIT) does not protect against this potential problem, its license is fortunately compatible with the others I mentioned. This is, XMage's code can be integrated into the other projects'.

JayDi85 commented 4 years ago

It's not a code interaction. It's a separate apps.

I was working on this issue (integration with third party clients). And I came to the conclusion about the following architecture:

  1. XMage basic distribution must contains special library/service like "xmage api app" -- it's a simple client-server app on java, but with REST end points (or other open protocol);
  2. REST end point gives access to all basic xmage client features like connect to server, create new games, play it, etc;
  3. Third party clients can implements that api.

So no needs to rewrite network engine, no needs to change any licenses, all code compatible with any xmage servers. All must works from the box:

allentiak commented 4 years ago

@JayDi85 Both are aspects of the same thing. There is no contradiction between what you said and what I said. Please, read carefully what I wrote :-)

allentiak commented 4 years ago

@JayDi85 BTW: I updated my earlier comments. You may want to read them again :-)

JayDi85 commented 4 years ago

@allentiak can you explain potential problems with MIT license for XMage (by example)?

allentiak commented 4 years ago

Sure, @JayDi85 :-)

(Disclaimer: I am not a lawyer, and this is not legal advise - only my opinion.)

The main potential problem I see for XMage is simple: Loss of freedom by its users.

For a pragmatic rationale on how to choose a (libre software) license, I recommend this excellent article by Bruce Perens about Libre Software Licensing. It is the one I used when recommending the use of AGPL to the developer of MaTaG. (Yes, it was me :)

As a final reflection, it is clear to me that using the "open source" term helps preventing people from realizing these potential problems.

--Leandro

allentiak commented 3 years ago

@zhangyutong926 Still interested in implementing this?

allentiak commented 3 years ago

@cute-sayako Still interested in implementing this?