It is currently 16 Apr 2024, 11:49
   
Text Size

How to get started?

Post MTG Forge Related Programming Questions Here

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

How to get started?

Postby TimGradwell » 19 Apr 2009, 19:38

Would somebody mind telling me the bare minimum I'd need to compile the game?

Thanks

Tim
TimGradwell
 
Posts: 4
Joined: 29 Oct 2008, 23:38
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

Postby DennisBergkamp » 19 Apr 2009, 20:27

Eclipse with java 1.5 or 1.6 should do the trick :)
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

Postby TimGradwell » 19 Apr 2009, 21:36

I've installed eclpise. I've downloaded the source from svn.

I'm trying to open the project? Workspace? I'm not sure what it is I can actually open.

Pointer please? :)
TimGradwell
 
Posts: 4
Joined: 29 Oct 2008, 23:38
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

Postby DennisBergkamp » 19 Apr 2009, 22:26

I don't think it matters what directory you set your workspace, but be sure you follow these steps:

Start up Eclipse (just click ok when it asks for the location of the workspace to use)
File -> New Java Project -> Create Project from Existing Source (point this to the directory where the MTGForge source is), just name the project whatever, and click finish.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

Postby Rob Cashwalker » 20 Apr 2009, 19:50

I've downloaded the source from svn.
I don't think the SVN source is up-to-date.... Try the source file that's included with the 4/19 beta release.
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 mtgrares » 20 Apr 2009, 21:54

The SVN is not up to date, you have to use the source from the zipfile.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: How to get started?

Postby TimGradwell » 20 Apr 2009, 22:26

Ok, thanks.
TimGradwell
 
Posts: 4
Joined: 29 Oct 2008, 23:38
Has thanked: 0 time
Been thanked: 0 time

Re: How to get started?

Postby mtgrares » 17 Aug 2009, 15:46

Just unzip the source code into a directory and using Java 1.6 you can compile everything. Also see "Readme-Compile.htm" since MTG Forge needs some files in order to run like cards.txt, up.gif, down.gif, etc...
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: How to get started?

Postby Chris H. » 17 Aug 2009, 22:10

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: http://www.eclipse.org/

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:

Workbench User Guide

Java Development User Guide

Additional documentation can be found at: http://www.eclipse.org/documentation/
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 Chris H. » 18 Aug 2009, 12:22

You can find some java tutorials on the Sun web site:

The Java Tutorials

There appears to be a printed form which can be purchased from Amazon.com.

There are a number of Online Courses at:

Online Training and Tutorials

And these Online Courses can be downloaded for you to use offline with your web browser:

Sun Download Center
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 Chris H. » 18 Aug 2009, 12:26

In Message:

http://www.slightlymagic.net/forum/viewtopic.php?f=52&t=1315#p18348

DennisBergkamp wrote:
Yeah, I can see that I still need to gain a lot of experience with Eclipse. I still have not figured out how to combine all of these multiple java class files into one large jar file. :(
File -> Export -> Java -> Runnable Jar File -> next. Then set your "Launch configuration" to GUI_NewGame and click finish. You do have to empty (copy them somewhere else temporarily) your pics folder and refresh your project, otherwise your JAR will be really big.
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 silly freak » 19 Aug 2009, 19:42

in my opinion, the very key features of eclipse are these (they will save you the most time):

  • hovering over an element, such as a class/method etc, shows its javadoc in a popup. however, if there's an error on the hovered piece of code, you get suggestions and automatic fixes for the error.
  • hovering over an element with ctrl pressed allows you to hyperlink-like navigate to the declaration (if the source code is available)
  • pressing ctrl+space displays code completions. you can limit the hits by typing something. also "camel case" is found:
    Arr -> ArrayList
    AL -> ArrayList
    ArLi -> ArrayList
    You can also define your own code templates. for example, sysout is by default defined for "System.out.println();"
  • I make a lot of use of the folding feature. you should make a key binding for the "fold all" action, so you can easily fold all the content in your classes, and show only the methods you're working at.
  • I prefer using the save operations to format my source code. for one, you always have nice code, and the second: you save more often ;)
  • the "toggle comment" action is very useful. just select some lines (you don't have to select the full lines, just a part) to temporarily disable a piece of code
  • last but not least, also make a key binding for the "run java application" action ;)

PS: in the class body, code completion shows options for generating getters/setters, a default constructor, and overriding/implementing methods from the superclass

PPS: if you speak german, you can view http://proggers-diary.blogspot.com. I have posted there some techniques I use in java
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: How to get started?

Postby Chris H. » 20 Aug 2009, 20:58

silly freak wrote:[*]hovering over an element, such as a class/method etc, shows its javadoc in a popup.
I spent a little time experimenting with javadoc. It appears that we need to be connected to the internet for javadoc to provide any information. As laptops and netbooks become more popular, the chances that we may not be connected may increase.

I looked for a javadoc download containing all of this info, I had hopped that having this stored locally on our computer would make it easier to access this javadoc info.

I have not had any success finding a javadoc download, does one exist?
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 silly freak » 20 Aug 2009, 21:26

of course ;) however, it's easier to use the src.zip contained in the JDK.
in the preferences, go to Java/Installed JREs. Click Edit... for your JRE and go through all the jars: Click Source Attachment... and Externale File... to point it to src.zip
Eclipse should then be able to figure out the javadoc directly from the source. at the same time, you can now also access the source by ctrl+click

so that's enough to have it in eclipse. i know it's crucial to be able to view it in the browser. for this, you won't come around the download from sun. (and I totally agree that the javadocs are hard to find)
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: How to get started?

Postby Chris H. » 20 Aug 2009, 23:33

When I downloaded eclipse, I chose to download the smallest of the development packages, the Eclipse IDE for Java Developers version. I can't find a "src.zip" in the eclipse folder.

At the very bottom of the Eclipse Downloads web page there is a
Eclipse Classic 3.5.0 (161 MB) download link.

This link states: The classic Eclipse download: the Eclipse Platform, Java Development Tools, and Plug-in Development Environment, including source and both user and programmer documentation.

I am wondering if I should have downloaded this larger version instead?
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

Next

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 45 guests

cron

Who is online

In total there are 45 users online :: 0 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: No registered users and 45 guests

Login Form