It is currently 13 Nov 2025, 20:52
   
Text Size

Help offer

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

Help offer

Postby erlmania » 02 Nov 2010, 09:16

Moin,

I would like to help coding Forge.

I'm a software engineer from germany and working for a company programming java for more than two years now.
So some of the code i have seen so far is screaming for a refactoring ;)

I would like to begin with a 'simple' task and refactor the handling of mana to make it easier to read and more solid. What are your opinions?

Greetings, erlmania
erlmania
 
Posts: 4
Joined: 24 Oct 2010, 17:13
Has thanked: 0 time
Been thanked: 0 time

Re: Help offer

Postby Sloth » 02 Nov 2010, 09:39

We can always use another hand. So you are welcome.

You need a google mail account and send the adress to DennisBergkamp by private message. He will give you the commiter status in the SVN.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Help offer

Postby friarsol » 02 Nov 2010, 14:06

I'd just say be careful with the Mana stuff as it affects everything. I had attempted to rewrite it about a month ago and had to stop halfway through because it wasn't working the way I thought it should. But if you are just cleaning up the code, then that should be fine. There are plenty of places that need a good scrubbing so it's easier to work with in teh future.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Help offer

Postby erlmania » 02 Nov 2010, 18:06

I have had a good look into he mana pool code by now and got it working with some smaller changes to the code.

I would like to move the mana pool code from package forge to package forge.table.mana. Later the rest of the code could be moved to distinct packages too. That way you can find the right code much faster.

The biggest change i would suggest, is to remove the inheritance of ManaPool from Card. The Card object is already really big and it should be divided at least at this place to make the mana pool more simple and distinct.
erlmania
 
Posts: 4
Joined: 24 Oct 2010, 17:13
Has thanked: 0 time
Been thanked: 0 time

Re: Help offer

Postby silly freak » 02 Nov 2010, 21:57

Hi erlmania! Gereetings from Austria ;)

I'm glad you want to put your efforts into forge, and wish you all the best. And please don't misunderstand me, I don't at all want to drag you away from forge. However, if you're interested, maybe you could get some inspiration or even reuse some of my code (see my signature). you seem like a guy that appreciates a well-structured architecture, just don't miss it ;)

that said, I'm not currently developing Laterna Magica; too much work at school... I should get some time in a few months

best regards
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: Help offer

Postby erlmania » 04 Nov 2010, 06:27

Hey Forge-team,

i stopped refactoring the source code of the mana pool. I think everything i can do is not good for the already chaotic source code.
Before you develop Forge any further, you should stop and do a programm wide refactoring of the current souce code architecture.

If you are interested i can give you the (yet unfinished but running) changes to the mana pool i did.

Greets erlmania.
erlmania
 
Posts: 4
Joined: 24 Oct 2010, 17:13
Has thanked: 0 time
Been thanked: 0 time

Re: Help offer

Postby Chris H. » 04 Nov 2010, 14:16

Thank you erlmania. Have you asked Dennis for SVN access? Your unfinished but running changes to the mana pool will be a welcome addition. :D

The project moves forward one small step at a time, but things are getting better. All of the CardFactory code was originally in one class and Dennis succeeded in splitting up the factories. At first, there were no packages, but then Silly Freak did a good job getting the initial work done.

Sol's recent phase work seems to be fairly stable at this time and this will allow additional improvements. Slapshot5 has created a Player class and this is helping to organize the code. Rob's idea of an ability factory is moving forward. Recently some of the messy string work was converted to StringBuilder.

It might be difficult for the dev team to stop all of the improvements that are being made at this time. And the user base has gotten used to seeing frequent beta releases and they might not stick with the project if we spent the next 6 to 12 months re-writing the code base.

What sort of refactoring ideas do you have in mind? We would like to discuss your ideas. It also might be easier on all of us if we approached this "one task at a time". :wink:
User avatar
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


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 25 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 25 users online :: 0 registered, 0 hidden and 25 guests (based on users active over the past 10 minutes)
Most users ever online was 9824 on 10 Nov 2025, 04:33

Users browsing this forum: No registered users and 25 guests

Login Form