It is currently 23 Apr 2024, 12:43
   
Text Size

How to get started?

Post MTG Forge Related Programming Questions Here

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

Re: How to get started?

Postby beryl » 12 Dec 2010, 04:29

jeffwadsworth wrote:
bladescape wrote:It doesn't like https.

RA layer request failed
svn: PROPFIND request failed on '/SVN'
svn: PROPFIND of '/SVN': 503 Service Unavailable (https://cardforge.googlecode.com)
Please check to make sure you are not behind a web proxy of any kind.
Hi

I just tried checking out the source code from
https://cardforge.googlecode.com/SVN
and had the same problem.

It's actually caused by the uppercase in 'SVN' in the URL
so try
https://cardforge.googlecode.com/svn
this should work (at least it did for me)
beryl
 
Posts: 5
Joined: 06 Dec 2010, 01:22
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

Postby Chris H. » 12 Dec 2010, 11:25

Thank you Beryl for the info. I will go back and edit the messages and will make the "svn" lowercase.
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

Re: How to get started?

Postby SoulStorm » 19 Dec 2010, 15:44

Chris H. wrote:I received a PM in reference to how do we download the source code from the SVN into our local copy of Eclipse. I decided to post my answer here where it can help other people to get started.

I am answering this early in the morning and I am still half asleep. :wink: I hope that I remembered to post all of the information. People should feel free to ask any questions if they need additional assistance.


You need to install a matching set of Subclipse and Subversion and this will allow you to access the SVN. At this point:

In project explorer do a File -> New -> Project and name it ForgeSVN.

Then do a File -> Import - Checkout Projects from SVN.

Use this for the repository location:

https://cardforge.googlecode.com/svn

At this point select the "src" folder and Eclipse will transfer the files to your local copy on your computer. Note that to merge your work into the SVN requires you to use "https" rather than the more common "http".
Ok, I just managed to checkout revision 4476 from the svn. I had to install 64 bit versions of everything before it worked properly on my 64 bit vista OS. Now I'm trying to figure out how to build a working copy of the game using this data. The supplied instructions mean nothing to me as this is my first exposure to Eclipse. I know where the src folder is located, but I have no idea how to use Eclipse to make a working copy from it.

Once I get past this step, I'd like to try adding cards to the game. I know nothing about programming in Java, but I've had success adding and modifying content in other games by just following and copying patterns from different sources. However, any guidance on where to start would be appreciate as well.

So anyway Chris, if you or someone else can help me get past my current hurdle, perhaps I can help by adding new cards to Forge.

Thanks!
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: How to get started?

Postby Sloth » 19 Dec 2010, 15:53

The best way to start is to try to add cards with just txt files. There should be at least a hundret unimplemented cards that don't need any additional code. Good luck, SoulStorm.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: How to get started?

Postby Chris H. » 19 Dec 2010, 16:29

SoulStorm wrote:Ok, I just managed to checkout revision 4476 from the svn. I had to install 64 bit versions of everything before it worked properly on my 64 bit vista OS. Now I'm trying to figure out how to build a working copy of the game using this data. The supplied instructions mean nothing to me as this is my first exposure to Eclipse. I know where the src folder is located, but I have no idea how to use Eclipse to make a working copy from it.

Once I get past this step, I'd like to try adding cards to the game. I know nothing about programming in Java, but I've had success adding and modifying content in other games by just following and copying patterns from different sources. However, any guidance on where to start would be appreciate as well.

So anyway Chris, if you or someone else can help me get past my current hurdle, perhaps I can help by adding new cards to Forge.

Thanks!
`
OK, if you followed the instructions you should have a project folder named "ForgeSVN" or something similar in your Eclipse workspace. While in Eclipse, you should select Window -> Show View -> Project Explorer. With the Project Explorer view active you can navigate the folders and find the individual contents of the ForgeSVN project.

While in Eclipse, you should then select Project -> Build Project or Build All. You can click on and highlight the ForgeSVN project folder. Right click and there should be a Run As -> Java Application choice. This will give you a list of java classes, choose the one named "Gui_NewGame - Forge". The forge New Game window should appear after a few seconds. Give it time.

At this point you can select File -> Export... -> Java -> Runable JAR file. Select the Launch configuration and Extract required libraries into generated JAR options. Use Browse to choose the Export destination. Click on finish. There may then appear several warnings which are not very important. You will then get the JAR file to launch the game. You can copy the necessary files from the forge project, the new JAR file, your previous pics folder, decks folder and questData file over (place the files into a separate folder and not into the forgeSVN project folder) and you should be up to date at that point.

At a later date you can got to the Eclipse Synchronize view and then click on the Synchronize SVN (Workspace) button and then select the options to merge all of the new work into your local copy of the SVN. Follow the instructions above to get a new updated version to play with. 8)
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

Re: How to get started?

Postby SoulStorm » 19 Dec 2010, 16:38

Thanks for the awesome tutorial Chris! I would have never figured all of that out by just pressing buttons and hoping for the best. :mrgreen: I have some other responsibilities to attend to currently, but when I have a chance I'll test those instructions and let you know how things went.

Sloth, thanks for the advice. I will just try messing with the txt files first.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: How to get started?

Postby SoulStorm » 19 Dec 2010, 20:42

Chris,

I did everything you wrote and was able to get the Jar file, but when I transferred everything over and attempted to run the program I received the following error:

Could not find the main class:forge.Gui_NewGame. Program will exit.

If memory serves, this is the same error I received when I tried using Snacko's script a few months ago.

Also, regarding adding cards...

I noticed that Psionic Entity is keyworded with AB$DealDamage and that slivers use stPumpAll. So the question is, can one embed (for lack of a better word) a keyword (such as AB$DealDamage) within the stPumpAll keyword in order to give an ability to all creatures? The card I was trying to add was Psionic Sliver. Is it possible to add this card at this time or does more work need to be done "under the hood" first?
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: How to get started?

Postby Chris H. » 19 Dec 2010, 21:18

SoulStorm wrote:I did everything you wrote and was able to get the Jar file, but when I transferred everything over and attempted to run the program I received the following error:

Could not find the main class:forge.Gui_NewGame. Program will exit.

If memory serves, this is the same error I received when I tried using Snacko's script a few months ago.
`
I have seen this problem reported before, I can not remember the solution. Someone will likely come up with a reasonable answer.


Also, regarding adding cards...

I noticed that Psionic Entity is keyworded with AB$DealDamage and that slivers use stPumpAll. So the question is, can one embed (for lack of a better word) a keyword (such as AB$DealDamage) within the stPumpAll keyword in order to give an ability to all creatures? The card I was trying to add was Psionic Sliver. Is it possible to add this card at this time or does more work need to be done "under the hood" first?
`
I am still studying the new AFs and I do not have a good answer at this time. :-k

As you study the card files in cardsfolder you will see that the non-scripted keywords can be added to another card. Take a peek at the auras. We were not able to assign scripted keywords though. The new AF system is better but it is not yet fully finished. Sol might have some info on what he plans to do in this area.
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

Re: How to get started?

Postby SoulStorm » 19 Dec 2010, 21:42

Ok Chris,

Thanks for all the help. I'll wait till someone has an answer concerning the SVN problem. In the meantime I'll play around with coding some more and read the keyword thread more thoroughly. :D
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: How to get started?

Postby friarsol » 20 Dec 2010, 02:12

SoulStorm, one of the main goals of the AF system was making it easier to provide abilities and eventually things like you suggest. Right now the infrastructure isn't in place to do that, but it is on the grand list of things to do.

Feel free to check out the API on the Wiki. It's not 100% up to date, but hopefully can give you some ideas of what's going on. The "New Structures" would be the place I would focus on the most, since that contains info on the new AF system Chris is referring too.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: How to get started?

Postby SoulStorm » 20 Dec 2010, 04:57

Thanks Sol, I've already started reading the API. Very well organized and the explanations are concise and clear.

Thanks!
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: How to get started?

Postby RedSypher » 23 Dec 2010, 10:24

IS there anywhere I can find out what AF's can be used/have been coded as Drawbacks? I was trying to use tapall as a drawback, but it seems that's not on the menu yet.
RedSypher
 
Posts: 25
Joined: 31 Oct 2010, 06:48
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

Postby slapshot5 » 23 Dec 2010, 17:10

RedSypher wrote:IS there anywhere I can find out what AF's can be used/have been coded as Drawbacks? I was trying to use tapall as a drawback, but it seems that's not on the menu yet.
TapAll was kind of there in code. I just added something that should work to SVN. If you're using SVN, give it a try with your card.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: How to get started?

Postby Fnoed » 10 Jan 2011, 03:58

In case anybody wants to use an alternative to Eclipse, IntelliJ IDEA is a really good Java IDE. The community edition is free and can be downloaded from http://www.jetbrains.com/idea/download/ . It has much better Java auto-completion and refactoring compared to Eclipse.

I've attached an IJ project skeleton to help anybody who wants to check it out. There is no need to download the sources using an SVN client (like Tortoise); IJ will do the check-out. To get up and running do the following:

  • Prerequisite: have a JDK installed.
  • Download the file and extract it somewhere.
  • Start IntelliJ, open the project (File -> Open Project) by pointing it to the folder you just extracted.
  • Select Version Control -> Update Project, confirm the dialog. The SVN path should already be set-up correctly.
  • Wait until the SVN update is complete.
  • Set the JDK: File -> Project Structure, Select Project from the list on the left, Now on the right under the heading Project SDK select New -> JSDK. Point it to the JDK on your system.

After this you should be set to go and you should be able to run cardforge (Run -> Run).
You will be asked to enter your SVN credentials on commit.
Attachments
forge-svn.zip
IntelliJ IDEA Project
(18.63 KiB) Downloaded 359 times
Fnoed
 
Posts: 84
Joined: 20 Dec 2010, 01:03
Has thanked: 0 time
Been thanked: 3 times

Re: How to get started?

Postby Masher8 » 06 Feb 2011, 15:23

Thanks Fnoed. I now have the svn compiling when I couldn't get Eclipse to behave for love nor money.
Masher8
 
Posts: 18
Joined: 05 Feb 2011, 13:57
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 51 guests


Who is online

In total there are 51 users online :: 0 registered, 0 hidden and 51 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 51 guests

Login Form