DevelopersGuide
From EternalRealms
Contents |
Get the source
If you would like a copy of the source code to help develop ER or to use in your own projects, download the latest source from our cvs repository. Alternatively, you may wait for a source code release and download a zip archive containing the source from one of the official releases.
To help develop Eternal Realms, we suggest you download Eclipse, if you don't have it already. We can walk you through the use of Eclipse to download our code. (see: Using Eclipse).
Using SVN
Our code is in the subversion repository at:
https://eternalrealms.svn.sourceforge.net/svnroot/eternalrealms
For more details, see http://sourceforge.net/svn/?group_id=143243
Using Eclipse
The developers of Eternal Realms use the Eclipse IDE. Eclipse is a program that developers use to write code more quickly and efficiently. You don't need to use this program and may use whatever developer environment you'd like. However, Eclipse makes many things much easier, so we recommend it.
Installing Eclipse
You can learn about Eclipse from their home page You can download the latest version from their webpage. Our client and server is written in Java, so you will need to download a Java Developer's Kit from somewhere on Sun's web page. You want the J2SE (Standard Edition), JDK. Any real computer already has the JRE (Java runtime environment), which is used to run java code. You need more stuff to develop java code. Don't bother with any of that netbeans stuff.
Configuration
Eclipse has a bazillion settings. You can basically configure it however you want. But in order to save time, you should get ahold of Andy's Eclipse prefs and Import them. This way, you can have Eclipse auto-format your code, and it will fall in line with the coding style already used in the project.
<A HREF="AndyEclipsePrefs.epf">Download Andy's Eclipse Prefs</A>.
You can adjust your settings to your liking once you get familiar with your new environment.
Using CVS in Eclipse (to download the code)
Using CVS is much easier in Eclipse than using the command line version. The first thing you'll want to do is download the code from cvs. To do this, create a new Project and choose "Checkout Project From CVS". You'll need to fill in the following information:
Repository Host: eternalrealms.cvs.sourceforge.net Repository Path: /cvsroot/eternalrealms Connection type: extssh
You will need to create a sourceforge account and join the project if you want to contribute changes. I believe that using eclipse's built in cvs client will not work unless you are a developer.
We have four modules, "Server", "Builder, "Core", and "Client". The Core module contains common code for, and thus is required for Server and Builder to work. This eliminates duplicate code and enforces proper package dependency concepts.
Perspectives
Eclipse has several perspectives. One is "Java", used for developing applications in Java (yay). By default, this will give you a console screen (for program output), a package explorer (like windows explorer, it displays the files in the project), an outline, and your code. There's also a debug perspective that has tools for debugging a running program. In all likelyhood, you'll want to be in Java mode most of the time. Things might look strange if you are in a file/resource browser.
Current Version of Java
Eternals Realms is a cutting edge code base and utilizes many features provided by Java 5.0. If you are having problems compiling make sure that you are using Java 5.0 and not an earlier version i.e. Java 1.4, 1.3 etc.

