It is currently 25 Apr 2024, 19:57
   
Text Size

Great job there! how about magarena in a web?

Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins

Great job there! how about magarena in a web?

Postby fesja » 19 Feb 2012, 01:37

I've just discovered this program while I was searching for the current state of MTG programs. Congrats to all the devs; I'm a developer myself and I am very impressed by the quality. I have 2 questions/topics to suggest:

Improve the way of adding cards

I believe the new approach is the correct one. It doesn't make sense to have a java class per card. You can have a sqlite/txt database, which each row is a card with a standarized way of adding the features of each card. I'm sure you will reduce the quantity and quality of the code by a lot. If you have doubts about the new approach, I'd be glad to share my opinions.

Make it a website

This one is more agressive, but it will make complete sense. Instead of having clients, it can be a website. There is a technology called Node.js (javascript over v8 engine) that suits perfectly for this user case. Duels would be like a chat, but instead of passing messages, we would be sending orders (attack, block, draw card). jQuery can take control of all the drag & drop of the cards. It would be easier to play against other people and against the machine, and also joining tournaments, having an online reputation on the platform, etc.

Despite it would be "just" rewriting the java code into javascript, I know it's too much effort specially of occupied developers. Let me add another reason to do it, if you learn node.js well; there are many companies in the Bay Area (SF) which are paying over $100k a year for Node.js developers. Not bad while you code for hobby :)

Of course, Wizards may not like it, so it would have to be on a outside server or reaching an agreement with Wizards to licence the brand and charge users per buying extra cards or playing tournaments.

Just some ideas I've thought ;)
fesja
 
Posts: 2
Joined: 19 Feb 2012, 01:13
Has thanked: 0 time
Been thanked: 0 time

Re: Great job there! how about magarena in a web?

Postby melvin » 19 Feb 2012, 03:39

fesja wrote:Improve the way of adding cards
Using card scripts definitely reduces the amount of code since we can express certain effects once in code and refer to it from the card script using its name. Ultimately we would need some sort of effects DSL or card language parser to have the flexibility needed to express all sorts of different effects. The way we are doing it now is with special phrases, basically an extension of ability keywords, but it is not as flexible as we would like.

However, designing a card effect language up front is difficult. So our process is as follows: 1) Create the card effect in Java. 2) Refactor the card/game engine to minimize the code. 3) Construct the implementation automatically by looking out for special phrases in the ability text.

fesja wrote:Make it a website
Putting the game on the web does make a lot of sense for popularizing the game and making it more accessible. Since our code base is in Java, I wonder if using something like GWT would help to reduce the effort. Still it would be a huge undertaking.

fesja wrote:Just some ideas I've thought ;)
Thanks for sharing your ideas. We are always on the lookout for more developers on the project. If you would like to help develop the project, you are most welcome to post any code contributions/patches to our developer discussion group at magarena@googlegroups.com
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Great job there! how about magarena in a web?

Postby fesja » 19 Feb 2012, 15:18

melvin wrote:However, designing a card effect language up front is difficult. So our process is as follows: 1) Create the card effect in Java. 2) Refactor the card/game engine to minimize the code. 3) Construct the implementation automatically by looking out for special phrases in the ability text.
The problem comes with 5% of the cards which have unique effects. But I believe it's the way to go if you want to have a maintainable code.

melvin wrote:Putting the game on the web does make a lot of sense for popularizing the game and making it more accessible. Since our code base is in Java, I wonder if using something like GWT would help to reduce the effort. Still it would be a huge undertaking.
I hadn't though about GWT, but you are right. It wouldn't be so hard to do it, as you can load any Java class/library.

Good luck! It's fun to play Magic again after 8 years :)
fesja
 
Posts: 2
Joined: 19 Feb 2012, 01:13
Has thanked: 0 time
Been thanked: 0 time


Return to Magarena

Who is online

Users browsing this forum: No registered users and 42 guests


Who is online

In total there are 42 users online :: 0 registered, 0 hidden and 42 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 42 guests

Login Form