Page 5 of 18

Re: How to get started?

PostPosted: 06 Feb 2011, 18:35
by Chris H.
Which OS's are supported by IntelliJ IDEA? We have people using Windows, Mac OS and various *nix OS's.

Re: How to get started?

PostPosted: 06 Feb 2011, 19:08
by Fnoed
Everything. I personally use Linux; in my company IDEA is used on all three platforms with success.

Re: How to get started?

PostPosted: 13 Feb 2011, 03:02
by Jaedayr
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'
Is this the only thing causing it to fail? Or do all the other 'Exported with compile warnings:' also need to be addressed?

Re: How to get started?

PostPosted: 13 Feb 2011, 12:09
by Chris H.
Jaedayr wrote: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'
Is this the only thing causing it to fail? Or do all the other 'Exported with compile warnings:' also need to be addressed?
`
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. :) At some point someone will get tired of looking at them and will address this issue. It is not mission critical and everyone is busy working on other areas which takes a higher priority.

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

Re: How to get started?

PostPosted: 16 Feb 2011, 19:25
by Jaedayr
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.

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
In addition to this file I also have cultbrand_cinder.txt.mine, cultbrand_cinder.txt.r6447 and cultbrand_cinder.txt.r6475 . Is there a way to prevent this from happening, or if not, is there a way to fix it without going manually through and editing one of them and deleting the others?

*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?

PostPosted: 16 Feb 2011, 21:24
by Rob Cashwalker
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.

Re: How to get started?

PostPosted: 18 Feb 2011, 09:37
by Masher8
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?

Re: How to get started?

PostPosted: 18 Feb 2011, 11:08
by Sloth
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?
Your commit is using another path than the other commits:

Yours: /forge/src/forge/ComputerUtil_Attack2.java
Normal: /src/src/forge/ComputerUtil_Attack2.java

Re: How to get started?

PostPosted: 18 Feb 2011, 11:54
by Masher8
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
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.

EDIT: I think I've figured it out, and cleared up my mistake :oops:

On the plus side, the AI's creature handling when attacking should be a bit better.

Re: How to get started?

PostPosted: 18 Feb 2011, 12:57
by Chris H.
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. :)

Re: How to get started?

PostPosted: 18 Feb 2011, 14:14
by Masher8
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. :)
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.

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.

Re: How to get started?

PostPosted: 02 Jul 2011, 02:24
by Braids
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)

Re: How to get started?

PostPosted: 24 Jul 2011, 04:15
by Agetian
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!

Re: How to get started?

PostPosted: 24 Jul 2011, 06:18
by slapshot5
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!
Here's the guide that I used. Worked well:

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

Re: How to get started?

PostPosted: 24 Jul 2011, 10:29
by Agetian
@ slapshot5: Awesome, thanks man! That should get me started!