It is currently 16 Apr 2024, 06:57
   
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 darknesscrysis » 16 Sep 2014, 16:10

Hello, I want to understand how Forge works and maybe help developing it in the future. I'm following the How_to_Get_Started_Developing_Forge instructions to put all the portable programs in an USB. I have put java and eclipse but I don't know if I have done the .bat file right.
set Path=\Java\bin;%Path%
.\Eclipse\eclipse.exe -vm ..\Java\bin -data .\workspace

I have read this in one of the first posts:
Chris H. wrote:For those people who may in the future decide that they are interested in learning Java and the Eclipse development system, they should visit the Eclipse web site at:

I think that I downloaded the Eclipse IDE for Java Developers some months ago, my version is version 3.4.

There are two long pdf files that will provide you with a basic tutorial:

Additional documentation can be found at:
I only had one semester of C++ in the college a few years ago. What do you recommend me to look for being able to develop forge?
darknesscrysis
 
Posts: 6
Joined: 14 Sep 2014, 10:17
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

Postby darknesscrysis » 23 Sep 2014, 14:42

I'm gonna take the course Object-oriented programming. Is that useful?
darknesscrysis
 
Posts: 6
Joined: 14 Sep 2014, 10:17
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

Postby Chris H. » 23 Sep 2014, 17:28

The basic tutorial and an Object-oriented programming course should be useful.
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 sionn » 13 May 2015, 16:00

Hello , I'm a java programmer of newcomers.
I have a few questions about Forge project.

1) Why not measured the coverage of JUnit?
May I commit the JUnit test code?

2) Does this project would not be possible to use the Github?
I feel that it is scary to directly commit code to SVN.
sionn
 
Posts: 2
Joined: 09 May 2015, 02:26
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

Postby KrazyTheFox » 13 May 2015, 16:53

sionn wrote:Hello , I'm a java programmer of newcomers.
I have a few questions about Forge project.
Welcome!

sionn wrote:1) Why not measured the coverage of JUnit?
May I commit the JUnit test code?
We don't have many unit tests and there's no real effort to improve code coverage, as far as I know. I don't think anyone would have objections to committing more tests.

sionn wrote:2) Does this project would not be possible to use the Github?
I feel that it is scary to directly commit code to SVN.
Most developers on this project prefer SVN. I asked a while back if anyone would want to switch to Git and the consensus was to stay with SVN.
User avatar
KrazyTheFox
Programmer
 
Posts: 725
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 226 times

Re: How to get started?

Postby timmermac » 14 May 2015, 01:27

We used git some time back, and there were some issues. SVN has been more reliable to this point.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
User avatar
timmermac
Tester
 
Posts: 1512
Joined: 17 May 2010, 20:36
Has thanked: 18 times
Been thanked: 95 times

Re: How to get started?

Postby sionn » 14 May 2015, 14:15

Thank you for answering my questions! :D
sionn
 
Posts: 2
Joined: 09 May 2015, 02:26
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

Postby sharkus » 15 May 2015, 04:45

One quick question...

I got everything working from Eclipse to debug the targeting arrow problem (see patch posted on bug thread). Anyhow, I want to play using my new .jar file, but get a path error ("FSkin > can't find skins directory!") when I export a run-able jar and run it from my main forge install location.

I'm guessing it is because it is trying to find the "res" directory by following "../forge-gui" instead of the current working directory. For the life of me I can't find where this include path is configured for exported jars. Am I missing a step somewhere?

Thanks,
Marcus
sharkus
 
Posts: 14
Joined: 19 Sep 2014, 18:18
Has thanked: 0 time
Been thanked: 3 times

Re: How to get started?

Postby friarsol » 15 May 2015, 12:53

sharkus wrote:I'm guessing it is because it is trying to find the "res" directory by following "../forge-gui" instead of the current working directory. For the life of me I can't find where this include path is configured for exported jars. Am I missing a step somewhere?
Is your working path set to <code>\forge\forge-gui-desktop and classpath set to forge-gui-desktop? I'm pretty sure that's a requirement. Also your main class should be: forge.view.Main

Although I haven't setup a new dev environment in forever (and stopped using Eclipse altogether), I think that should be the right info.
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 sharkus » 15 May 2015, 15:41

friarsol wrote:Is your working path set to <code>\forge\forge-gui-desktop and classpath set to forge-gui-desktop? I'm pretty sure that's a requirement. Also your main class should be: forge.view.Main

Although I haven't setup a new dev environment in forever (and stopped using Eclipse altogether), I think that should be the right info.
Looks like this is the code that is causing my issue. I'll browse around Eclipse and see if I can find the way to configure the build info version string when I get home from work tonight. I can't say I'm a huge fan of Eclipse. My preferred editor of choice is VIM. :)

Code: Select all
    public String getAssetsDir() {
        return StringUtils.containsIgnoreCase(BuildInfo.getVersionString(), "svn") ?
                "../forge-gui/" : "";
    }
sharkus
 
Posts: 14
Joined: 19 Sep 2014, 18:18
Has thanked: 0 time
Been thanked: 3 times

Re: How to get started?

Postby friarsol » 15 May 2015, 16:16

sharkus wrote:
friarsol wrote:Is your working path set to <code>\forge\forge-gui-desktop and classpath set to forge-gui-desktop? I'm pretty sure that's a requirement. Also your main class should be: forge.view.Main

Although I haven't setup a new dev environment in forever (and stopped using Eclipse altogether), I think that should be the right info.
Looks like this is the code that is causing my issue. I'll browse around Eclipse and see if I can find the way to configure the build info version string when I get home from work tonight. I can't say I'm a huge fan of Eclipse. My preferred editor of choice is VIM. :)

Code: Select all
    public String getAssetsDir() {
        return StringUtils.containsIgnoreCase(BuildInfo.getVersionString(), "svn") ?
                "../forge-gui/" : "";
    }
I've been using IntelliJ IDEA for the last few years and found it way easier to setup than Eclipse. But yea, if your project level working path isn't set to forge-gui-desktop, than that relative call won't work for you. That's what I was trying to say.
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 sharkus » 18 May 2015, 04:03

friarsol wrote:I've been using IntelliJ IDEA for the last few years and found it way easier to setup than Eclipse. But yea, if your project level working path isn't set to forge-gui-desktop, than that relative call won't work for you. That's what I was trying to say.
I eventually gave up trying to find the right settings in Eclipse and ran Maven from the command line. Everything works fine from there. I might give IntelliJ IDEA a shot at some point in the future.
sharkus
 
Posts: 14
Joined: 19 Sep 2014, 18:18
Has thanked: 0 time
Been thanked: 3 times

Re: How to get started?

Postby daemon-nio » 15 Jul 2015, 21:14

Great, thanks sharkus I got it right now.

I set it up in IntelliJ and it is super-easy
* svn checkout
* open IntelliJ and importing the pom.xml
* on the right panel click on "Maven Projects" and then on the refresh icon.
* create a new RunnableConfiguration with:
** Main class: forge.view.Main
** Classpath: /Your/Path/To/Svn/Folder/forge-gui-desktop (note by default forge-gui-desktop is not in the classpath. This gave me some trouble and I was modifying the source code and remove ../ from the line commented above).
daemon-nio
 
Posts: 5
Joined: 03 Jul 2015, 18:42
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

Postby damicore » 23 Nov 2015, 21:11

Hello, I've just checked out the svn repo and I can't run it as a java application in eclipse for some reason.
All the options under the "run as" dialog are Maven related ones (Maven build, Maven clean, etc).
Could somebody help me out here?
Also if anybody happens to know where is the pool of cards generation method for quest spell shop that'd be awesome.
damicore
 
Posts: 16
Joined: 24 Sep 2015, 03:40
Has thanked: 11 times
Been thanked: 0 time

Re: How to get started?

Postby ShivaFang » 25 Oct 2016, 01:06

cardforge.googlecode.com not found. Has the SVC moved?
ShivaFang
 
Posts: 101
Joined: 25 Jun 2016, 01:15
Has thanked: 26 times
Been thanked: 3 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: Jamesdit and 45 guests


Who is online

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

Login Form