From 3c1708575542f07f6330c09a6ee05af1e1bdd93f Mon Sep 17 00:00:00 2001 From: Mads Boddum Date: Sun, 25 Feb 2018 20:49:47 +0100 Subject: [PATCH] Updated readme file --- README.md | 122 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 94 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 3389fef94..8a27b259e 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,62 @@ +![License](https://img.shields.io/badge/license-GPLv3-blue.svg?longCache=true&style=flat) +![JDK](https://img.shields.io/badge/JDK-9-blue.svg?longCache=true&style=flat) +![Discord](https://img.shields.io/discord/373548910225915905.svg) +![Bitbucket open pull requests](https://img.shields.io/bitbucket/pr/projectswg/holocore.svg) + +![Banner](https://imgur.com/V14kDE5.png) + # Introduction # -This is a Star Wars Galaxies server emulator for the Java Virtual Machine. The vision for this software is: +This is *the* Star Wars Galaxies server emulator for the Java Virtual Machine. The vision for this software is: * Providing an experience that's reasonably close to the original game servers -* Easily expandable with new functionalities +* Easily expandable with new functionality * Good amount of configuration options for in-game features * *Highly* efficient use of system resources and solid performance The way we perform code reviews should reflect these points. +## Configuration ## + +Holocore can be configured in different ways. When the application has run at least once, the`/cfg/` folder will be +populated with config files. + +## Logging ## + +When Holocore runs, it logs various events. These are output to locations, such as `log/log.txt` and `System.out` +(console). There are different `LogLevel`s: + +1. Verbose (v) +2. Debug (d) +3. Info (i) +4. Warn (w) +5. Error (e) +6. Assert (a) + +The highest level is Verbose and the lowest is Assert. These determine how detailed the log is. You should generally +use the highest level that you find reasonable. If we don't, our logs will flood with unnecessary amounts of information. + +The used `LogLevel` can differ per log output destination. A text file could be more detailed than the console log by +setting the desired `LogLevel` on the `LogWrapper`. + +## Intents ## + +An `Intent` is an abstract class. These can be broadcasted anywhere in the code. They have no mutators (setters), +only accessors (getters). An `Intent` is *not* mutable! + +Any given `Intent` can be handled by any number of `Service` classes. + +## Services ## + +A `Service` is a class that can handle specific instances of `Intent`s. These classes hold the complex logic for the +emulator. + +## Managers ## + +`Manager` extends `Service`. The only difference is that a `Manager` can have `Service`s as children, creating a tree +structure of `Manager`s and `Service`s. If your new `Service` isn't added to the Service tree, then it won't be used for +anything. + # Setting up a development environment # Ready to help bring back an awesome MMORPG with your programming skills? @@ -20,35 +68,17 @@ The following assumes that you're familiar with: * VCSs, Git in particular * Programming in general -Support for any of these topics cannot be expected of the development team. - -## Java ## +## Java Development Kit ## In order to compile the source code, you need a JDK installation on your machine. The `JAVA_HOME` environment variable -should point to the directory of the JDK! It should be version 1.8 as minimum. You can see your installed Java version +should point to the directory of the JDK! It should be version 9 as minimum. You can see your installed Java version by running `java -version`. -## Gradle ## - -This project uses Gradle as its build tool of choice. You must install Gradle on your machine in order to build the -source code. - -Building an executable: Run `gradle shadowJar` in the root project folder - -Running the executable: Run `java -jar build/libs/holocore-all.jar` in the root project folder - -## Forwarder ## - -Holocore uses TCP for network communications, whereas SWG was programmed for UDP. This adds numerous efficiencies with -long distance communications, but requires that a little more work is done on the client side. If you are using the -launcher, you do not have to worry about this. If you are not using the launcher, follow the guide -[here](https://bitbucket.org/projectswg/forwarder). - ## Clientdata ## This application reads a lot of information from the original game files. An installation of the game is therefore -required. Create a folder called clientdata in the root project directory. Extract the following folders of every -sku#_client.toc file to the clientdata folder: +required. Create a folder called `clientdata` in the root project directory. Extract the following folders of every +sku#_client.toc file to the `clientdata` folder: * abstract * appearance @@ -67,6 +97,46 @@ sku#_client.toc file to the clientdata folder: Note that every TOC file won't necessarily have all of these folders! If they're present, extract them. A tool such as TRE Explorer is capable of opening the files and extracting their contents. +You should end up with a structure that looks something like this: +``` +holocore/ + clientdata/ + abstract/ + appearance/ + creation/ + customization/ + datatables/ + footprint/ + ... + gradle/ + res/ + serverdata/ + src/ + .gitignore + .gitmodules + LICENSE.txt + ... +``` + +## Gradle ## + +This project uses Gradle as its build tool of choice. You must install Gradle on your machine in order to build the +source code. + +Compile and run Holocores unit tests using Gradle: `gradle test --info` (Might fail if you haven't extracted clientdata yet) +Compile and run Holocores main code using Gradle: `gradle run` + +## Forwarder ## + +Holocore uses TCP for network communications, whereas SWG was programmed for UDP. This adds numerous efficiencies with +long distance communications, but requires that a little more work is done on the client side. If you are using the +launcher, you do not have to worry about this. If you are not using the launcher, follow the guide +[here](https://bitbucket.org/projectswg/forwarder). + +## Credentials ## + +Default credentials are currently created. Your username is `holocore` and your password is `password`. + ## Contributing ## 1. Fork this repository @@ -80,7 +150,3 @@ A tool such as TRE Explorer is capable of opening the files and extracting their 8. Your changes are reviewed and are merged, unless something is wrong 9. Once merged, your changes will be available in future builds 10. If you want to work on something else, go back to step 4 - -# Contact # - -We use HipChat for communication. Join [the public room](https://www.hipchat.com/g4xSy62ko) to get in touch!