It is currently 27 Apr 2024, 03:56
   
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 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.
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 Fnoed » 06 Feb 2011, 19:08

Everything. I personally use Linux; in my company IDEA is used on all three platforms with success.
Fnoed
 
Posts: 84
Joined: 20 Dec 2010, 01:03
Has thanked: 0 time
Been thanked: 3 times

Re: How to get started?

Postby 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'
Is this the only thing causing it to fail? Or do all the other 'Exported with compile warnings:' also need to be addressed?
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: How to get started?

Postby 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.

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
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 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.

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?
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: How to get started?

Postby 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.
The Force will be with you, Always.
User avatar
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?

Postby 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?
Masher8
 
Posts: 18
Joined: 05 Feb 2011, 13:57
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

Postby Sloth » 18 Feb 2011, 11:08

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

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.
Masher8
 
Posts: 18
Joined: 05 Feb 2011, 13:57
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

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

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.
Masher8
 
Posts: 18
Joined: 05 Feb 2011, 13:57
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

Postby 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. ;)
User avatar
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?

Postby 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: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: How to get started?

Postby slapshot5 » 24 Jul 2011, 06:18

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
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 Agetian » 24 Jul 2011, 10:29

@ slapshot5: Awesome, thanks man! That should get me started!
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 77 guests


Who is online

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

Login Form