Working out the multi-module maven setup
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Working out the multi-module maven setup
by drdev » 17 Dec 2013, 22:22
I've spent some time on the idea of a mobile version of Forge for Android, and I actually think I can design a UI that will be playable on phones in addition to tablets. Given there is not currently a phone app out there that lets you play Magic (Duels of the Planeswalkers only runs on tablets), it would be very cool for Forge to be the first.
I've done some research, and I want to use a 2D Android game engine to create the UI rather than just creating a more static application UI using XML, which should make card rendering and animation perform better. I'm specifically looking at AndEngine, which is a free open source engine coded in Java that has an active forum community.
How does that plan sound?
I've done some research, and I want to use a 2D Android game engine to create the UI rather than just creating a more static application UI using XML, which should make card rendering and animation perform better. I'm specifically looking at AndEngine, which is a free open source engine coded in Java that has an active forum community.
How does that plan sound?
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Working out the multi-module maven setup
by moomarc » 19 Dec 2013, 09:00
My only concern would be that releasing an app sounds a lot like we'd be stepping on a sleeping dragon's toes as it risks becoming too public and visible. Aside from that it sounds great... except for the fact that my iPhone is somewhat allergic to android apps 

-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Working out the multi-module maven setup
by Max mtg » 19 Dec 2013, 12:25
Sounds great!
This is the reason why all those multiple modules were introduces (although the sepearation is far from being complete)
Marc, you could buy a 7" android tablet for that - they aren't expensive these days.
This is the reason why all those multiple modules were introduces (although the sepearation is far from being complete)
Marc, you could buy a 7" android tablet for that - they aren't expensive these days.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Working out the multi-module maven setup
by drdev » 19 Dec 2013, 16:46
I am definitely curious if having an app on the Google Play store is even an option without waking the sleeping dragon. Could somebody with more understanding on the legal stuff please comment?moomarc wrote:My only concern would be that releasing an app sounds a lot like we'd be stepping on a sleeping dragon's toes as it risks becoming too public and visible. Aside from that it sounds great... except for the fact that my iPhone is somewhat allergic to android apps
Yeah, we'd need to finish the module separation before I can get too far with this, though I should already be able to include references to forge-ai, forge-core, and forge-game. I just can't reference any dll that uses Swing, since Android doesn't support Swing. What kind of timeline do you think is possible to finish this separation? (particularly if I stop slowing things down by breaking the rules with new development of mineMax mtg wrote:Sounds great!
This is the reason why all those multiple modules were introduces (although the separation is far from being complete)

Meanwhile, I'm going to start working on some mockups of the different screens and game states so that we can have a design ready to implement after the refactoring makes some more progress. Once the mockups are ready, I'll to create a new stickied thread for further discussion of this topic.
I'm glad others are getting excited about this idea too.
Thanks.
-Dan
Last edited by drdev on 19 Dec 2013, 16:59, edited 1 time in total.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Working out the multi-module maven setup
by friarsol » 19 Dec 2013, 16:58
Considering Wizards sent nasty-grams to mtg apps that mostly focused on deck building when they released their own Android app (which was pretty atrocious according to everyone), I can't see a way they would appreciate us posting on.drdev wrote:I am definitely curious if having an app on the Google Play store is even an option without waking the sleeping dragon. Could somebody with more understanding on the legal stuff please comment?moomarc wrote:My only concern would be that releasing an app sounds a lot like we'd be stepping on a sleeping dragon's toes as it risks becoming too public and visible. Aside from that it sounds great... except for the fact that my iPhone is somewhat allergic to android apps
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Working out the multi-module maven setup
by drdev » 19 Dec 2013, 17:14
Worst case, can't we still allow people to download and install our app without going through the Play Store, particularly since it will be free? I know Android is less strict about that than Apple.friarsol wrote:Considering Wizards sent nasty-grams to mtg apps that mostly focused on deck building when they released their own Android app (which was pretty atrocious according to everyone), I can't see a way they would appreciate us posting on.drdev wrote:I am definitely curious if having an app on the Google Play store is even an option without waking the sleeping dragon. Could somebody with more understanding on the legal stuff please comment?moomarc wrote:My only concern would be that releasing an app sounds a lot like we'd be stepping on a sleeping dragon's toes as it risks becoming too public and visible. Aside from that it sounds great... except for the fact that my iPhone is somewhat allergic to android apps
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Working out the multi-module maven setup
by friarsol » 19 Dec 2013, 18:16
Definitely, I have plenty of apps I've sideloaded into my SG3. We'd just need to make sure people understand how to do it, and enable installing from unknown sources.drdev wrote:Worst case, can't we still allow people to download and install our app without going through the Play Store, particularly since it will be free? I know Android is less strict about that than Apple.
FYI, the guys over at Wagic already have an Android mtg app, but I believe they are in C++. They may some pointers:
viewtopic.php?f=26&t=3603
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Working out the multi-module maven setup
by moomarc » 19 Dec 2013, 21:47
I live in South Africa... They still like to extort us when it comes to tablets and phones, and our currency's exchange rate doesn't help.Max mtg wrote:Marc, you could buy a 7" android tablet for that - they aren't expensive these days.

-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Working out the multi-module maven setup
by Max mtg » 19 Dec 2013, 21:56
For now only the forge-core module is fully independent from gui. Regretfully, one can build no more than a deck editor on top of that.drdev wrote:What kind of timeline do you think is possible to finish this separation? (particularly if I stop slowing things down by breaking the rules with new development of mine) I basically just need all game and card logic out of forge-gui, as I'll have to redesign the controllers and views for android using AndEngine.
Well, yes, if you don't change -core module any more, that might save me a couple of development sessions a month.
Still I cannot give a certain estimate (since no one works regularly on Forge, I think), but there is one criteria to see if the code is ready. (That is one criteria, but I am not sure if it is the only one).
- There will be no references to forge.gui.* (and swing of course) from forge.game.* classes. (that is all interaction with player is routed via PlayerController)
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Working out the multi-module maven setup
by Max mtg » 19 Dec 2013, 21:57
They - are those the customs officers of some street gangs?moomarc wrote:I live in South Africa... They still like to extort us when it comes to tablets and phones, and our currency's exchange rate doesn't help.Max mtg wrote:Marc, you could buy a 7" android tablet for that - they aren't expensive these days.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Working out the multi-module maven setup
by Max mtg » 17 Jan 2014, 09:04
These are the FIVE (5) GUI calls that still remain in game module
After that I'll try to detach the module and check what results out of it
After that I'll try to detach the module and check what results out of it
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Working out the multi-module maven setup
by Max mtg » 09 Feb 2014, 22:08
Just unlinked AI. Not sure if it reached the destination in one peace (something might get broken, will fix where i understand it, in other parts will need help from Sol or Sloth who understand how it works). The advantage of isolating it from game code is very valuable in my opinion.
Game simulation tests are broken and I'm unable to recover those. Won't fix.
Yet, I'm proud to have finally removed that doTrigger methods from abilities. The purpose of separaon of api effect classes and api ai classes I introduced a year ago or even earlier is finally fulfilled.
Ai can be tuned and refactored further (eg to have spellabilityai instances hold references to aicontoller and require less parameters). So if someone comes now with a desire to improve AI, they will find it all in a single place.
Next steps:
Work on interaction between modules. Move some crucial parts that had been delegated to gui/ai back into game (add spell to stack)
Extract lobby and network interaction from gui.
Game simulation tests are broken and I'm unable to recover those. Won't fix.
Yet, I'm proud to have finally removed that doTrigger methods from abilities. The purpose of separaon of api effect classes and api ai classes I introduced a year ago or even earlier is finally fulfilled.
Ai can be tuned and refactored further (eg to have spellabilityai instances hold references to aicontoller and require less parameters). So if someone comes now with a desire to improve AI, they will find it all in a single place.
Next steps:
Work on interaction between modules. Move some crucial parts that had been delegated to gui/ai back into game (add spell to stack)
Extract lobby and network interaction from gui.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Working out the multi-module maven setup
by teferi » 14 Feb 2014, 14:22
Hello all,
This is my first post on this forum. I would like to contribute to the project.
I have some ideas to improve the maven structure of the project:
Dependency management
This allows to define and manage the properties of dependencies of all modules in a centralized location. This will help us ensure dependency convergence a.o.
Enforcer checks
Adding some checks to the build will help us ensure and maintain build reproducibility.
Extraction of all bundle related files from the forge-gui module to a new forge-bundle module
Currently all resources and configuration to build the various bundles of the application are located in the forge-gui module. We should move these to a specific modules whose responsibility is to build the application bundles.
This is my first post on this forum. I would like to contribute to the project.
I have some ideas to improve the maven structure of the project:
- Dependency management
- Enforcer Checks
- Extraction of all bundle related files from the forge-gui module to a new forge-bundle module
Dependency management
This allows to define and manage the properties of dependencies of all modules in a centralized location. This will help us ensure dependency convergence a.o.
Enforcer checks
Adding some checks to the build will help us ensure and maintain build reproducibility.
Extraction of all bundle related files from the forge-gui module to a new forge-bundle module
Currently all resources and configuration to build the various bundles of the application are located in the forge-gui module. We should move these to a specific modules whose responsibility is to build the application bundles.
- Attachments
-
forge-patches-20140214.zip
- (28.63 MiB) Downloaded 303 times
Re: Working out the multi-module maven setup
by Chris H. » 16 Feb 2014, 14:02
Hi teferi,
Dave is our Maven expert and I sent him a pm with your message.
Dave is our Maven expert and I sent him a pm with your message.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Working out the multi-module maven setup
by Chris H. » 18 Feb 2014, 18:53
teferi wrote:Hello all,
This is my first post on this forum. I would like to contribute to the project.
I have some ideas to improve the maven structure of the project:
- Dependency management
- Enforcer Checks
- Extraction of all bundle related files from the forge-gui module to a new forge-bundle module
Dependency management
This allows to define and manage the properties of dependencies of all modules in a centralized location. This will help us ensure dependency convergence a.o.
Enforcer checks
Adding some checks to the build will help us ensure and maintain build reproducibility.
Extraction of all bundle related files from the forge-gui module to a new forge-bundle module
Currently all resources and configuration to build the various bundles of the application are located in the forge-gui module. We should move these to a specific modules whose responsibility is to build the application bundles.
Hi Teferi,
Dave sent me a short pm stating
Dave wrote:Hi Chris,
These are all great ideas especially since Forge is now split into modules. I wish I had had the time to implement them, but it sounds like Teferi would be very capable. I recommend giving him access and he can take over the Maven stuff from me. I will still check up on stuff but I am afraid that I have not had the time to help.
Thanks!
Dave
It may take a day or two before your commit prigs are finalized. You can check this url
memberlist.php?mode=group&g=71
to see if they have gone through.

-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Who is online
Users browsing this forum: No registered users and 46 guests