How to get started?
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: How to get started?
by Chris H. » 06 Feb 2011, 18:35
Which OS's are supported by IntelliJ IDEA? We have people using Windows, Mac OS and various *nix OS's.
-
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?
by Fnoed » 06 Feb 2011, 19:08
Everything. I personally use Linux; in my company IDEA is used on all three platforms with success.
Re: How to get started?
by Jaedayr » 13 Feb 2011, 03:02
I just tried to export a JAR using Eclipse and got the following, along with a bunch of compiler warnings.
- Code: Select all
Class files on classpath not found or not accessible for: 'ForgeSVN/src/forge/ComputerAI_Burn.java'
Re: How to get started?
by Chris H. » 13 Feb 2011, 12:09
`Jaedayr wrote:I just tried to export a JAR using Eclipse and got the following, along with a bunch of compiler warnings.Is this the only thing causing it to fail? Or do all the other 'Exported with compile warnings:' also need to be addressed?
- Code: Select all
Class files on classpath not found or not accessible for: 'ForgeSVN/src/forge/ComputerAI_Burn.java'
While it states that the export to JAR failed, the JAR in fact is created. So you should have the JAR file there to use. I get the same notice on my computer over the last several weeks and the JAR file is still created and it runs.
These types of warnings can be distracting and annoying.

So, the JAR should be there for you to use. The warnings are not that important. Now, errors in red, that is different matter.

-
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?
by Jaedayr » 16 Feb 2011, 19:25
Time for the noob question of the day. I am using Eclipse and sometimes when I sync with the SVN I get messages that there are conflicts with the txt files. When I compare them they look identical to me. It looks like the SVN has been updated with setinfo, which I also do locally every day. However, I usually get two to four txt files per conflict which show up in my project. Here is an example from today.
*edit* looking at the txt file, the part labeled mine has CR LF at the end of every line, the other part just has LF. Does this trigger the difference flag?
- Code: Select all
<<<<<<< .mine
Name:Cultbrand Cinder
ManaCost:4 BR
Types:Creature Elemental Shaman
Text:no text
PT:3/3
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPutCounter | TriggerDescription$ When CARDNAME enters the battlefield, put a -1/-1 counter on target creature.
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ M1M1 | CounterNum$ 1 | IsCurse$ True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/cultbrand_cinder.jpg
SetInfo:SHM|Common|http://magiccards.info/scans/en/shm/182.jpg
End=======
Name:Cultbrand Cinder
ManaCost:4 BR
Types:Creature Elemental Shaman
Text:no text
PT:3/3
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPutCounter | TriggerDescription$ When CARDNAME enters the battlefield, put a -1/-1 counter on target creature.
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ M1M1 | CounterNum$ 1 | IsCurse$ True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/cultbrand_cinder.jpg
SetInfo:SHM|Common|http://magiccards.info/scans/en/shm/182.jpg
End>>>>>>> .r6475
*edit* looking at the txt file, the part labeled mine has CR LF at the end of every line, the other part just has LF. Does this trigger the difference flag?
Re: How to get started?
by Rob Cashwalker » 16 Feb 2011, 21:24
yep, the CRLF is enough to make a difference for the SVN. Unless you're making the changes, you should let the SVN copy take priority.
Right-click the conflicting file, go to the Team menu, and then "Mark Resolved" (or something close to that, I don't have the same SVN environment at work). Tell it to accept the incoming changes.
Occasionally the SVN will also try to overwrite one of the prefrences file or something.. in which case you have to tell it that you want to accept your local copy instead.
Once you resolve the conflict, the extra copies of the file disappear.
Right-click the conflicting file, go to the Team menu, and then "Mark Resolved" (or something close to that, I don't have the same SVN environment at work). Tell it to accept the incoming changes.
Occasionally the SVN will also try to overwrite one of the prefrences file or something.. in which case you have to tell it that you want to accept your local copy instead.
Once you resolve the conflict, the extra copies of the file disappear.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: How to get started?
by Masher8 » 18 Feb 2011, 09:37
I made my first code commit today and it appeared to work, but when I browse the svn through my web browser or in eclipse it's still the old version.
The changes should be to computerUtil_Attack2.java. In my local file listing it now has a version number next to it, 6524, and the date and time of the commit. Is it there for anyone else?
The changes should be to computerUtil_Attack2.java. In my local file listing it now has a version number next to it, 6524, and the date and time of the commit. Is it there for anyone else?
- Masher8
- Posts: 18
- Joined: 05 Feb 2011, 13:57
- Has thanked: 0 time
- Been thanked: 0 time
Re: How to get started?
by Sloth » 18 Feb 2011, 11:08
Your commit is using another path than the other commits:Masher8 wrote:I made my first code commit today and it appeared to work, but when I browse the svn through my web browser or in eclipse it's still the old version.
The changes should be to computerUtil_Attack2.java. In my local file listing it now has a version number next to it, 6524, and the date and time of the commit. Is it there for anyone else?
Yours: /forge/src/forge/ComputerUtil_Attack2.java
Normal: /src/src/forge/ComputerUtil_Attack2.java
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: How to get started?
by Masher8 » 18 Feb 2011, 11:54
Thanks Sloth, I see it. Any idea what I can do about it? I can't see an obvious way to bring what I have into alignment.Sloth wrote:Your commit is using another path than the other commits:
Yours: /forge/src/forge/ComputerUtil_Attack2.java
Normal: /src/src/forge/ComputerUtil_Attack2.java
EDIT: I think I've figured it out, and cleared up my mistake

On the plus side, the AI's creature handling when attacking should be a bit better.
- Masher8
- Posts: 18
- Joined: 05 Feb 2011, 13:57
- Has thanked: 0 time
- Been thanked: 0 time
Re: How to get started?
by Chris H. » 18 Feb 2011, 12:57
It looks like your last series of commits modified the ComputerUtil_Attack2.java file rather than adding a second copy elsewhere. At a quick glane I think that eveything will be OK. Thanks for the help. 

-
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?
by Masher8 » 18 Feb 2011, 14:14
More than happy to lend a hand, and learn a bit in the process. The AI has handed my backside to me in short order on a number of occassions with the modifications so hopefully people will find it a bit more challenging. There's plenty of room for further improvement of course.Chris H. wrote:It looks like your last series of commits modified the ComputerUtil_Attack2.java file rather than adding a second copy elsewhere. At a quick glane I think that eveything will be OK. Thanks for the help.
It's not a minimax implementation (I'm not sure that the whole structure of what's already been written would allow it) but it does take a stab at estimating the future to make it's decisions.
- Masher8
- Posts: 18
- Joined: 05 Feb 2011, 13:57
- Has thanked: 0 time
- Been thanked: 0 time
Re: How to get started?
by Braids » 02 Jul 2011, 02:24
here are some urls to eclipse extensions. you can type them into Help/Install New Software/Work with:
- Code: Select all
http://subclipse.tigris.org/update_1.6.x (for Subclipse)
http://beust.com/eclipse (for TestNG)
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
Re: How to get started?
by Agetian » 24 Jul 2011, 04:15
Umm I noticed that Forge was switched to a git repo, I've been away from coding for a while but now that I'm planning to make a comeback, I'm desperately looking for some info on how to switch to git but I can't find it... do we have a post in here somewhere that describes how to make a switch from SVN to git when using Eclipse? Currently I'm running Eclipse+Subclipse for SVN, I'm not sure if Eclipse can be automated to sync with the git repo instead... and by the way, what's the address of the git repository? Thanks a lot in advance!
- Agetian
- Programmer
- Posts: 3486
- Joined: 14 Mar 2011, 05:58
- Has thanked: 683 times
- Been thanked: 569 times
Re: How to get started?
by slapshot5 » 24 Jul 2011, 06:18
Here's the guide that I used. Worked well:Agetian wrote:Umm I noticed that Forge was switched to a git repo, I've been away from coding for a while but now that I'm planning to make a comeback, I'm desperately looking for some info on how to switch to git but I can't find it... do we have a post in here somewhere that describes how to make a switch from SVN to git when using Eclipse? Currently I'm running Eclipse+Subclipse for SVN, I'm not sure if Eclipse can be automated to sync with the git repo instead... and by the way, what's the address of the git repository? Thanks a lot in advance!
http://www.slightlymagic.net/wiki/Forge:How_to_Get_Started_Developing_Forge
Git project URL:
https://www.gitorious.org/cardforge
There's been a ton of banter in this thread about the whole thing and problems encountered:
http://www.slightlymagic.net/forum/viewtopic.php?f=52&t=5006
-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?
by Agetian » 24 Jul 2011, 10:29
@ slapshot5: Awesome, thanks man! That should get me started!
- Agetian
- Programmer
- Posts: 3486
- Joined: 14 Mar 2011, 05:58
- Has thanked: 683 times
- Been thanked: 569 times
Who is online
Users browsing this forum: Baidu [Spider] and 17 guests