Вы находитесь на странице: 1из 3

~~~General~~~

Java Unlimited Strength policy is needed to encrypt/decrypt jam files. (Yes


for converting stuff. (.mid -> .jam))
This is the Jamlegend Server Emulator (Jamulator). It was coded all by myself
so i really hope you guys appreciate it.
Also note that this release is not stable and i think it will never really
be. The code is messed up at many places, but this is because i started this
project with little to none knowledge about java, plus im too lazy to rework it.
It works, but its not well coded. Any improvements are welcome.
Especially an implementation of SQL would be nice.
Also, the server probably cannot handle too many clients at once since i do
not know any effective way to handle lots of clients simoultaniously. I havent
tested it yet though so feel free to do so.
I cannot say how it behaves if more than 4 people connect, since thats the
maximum ive ever reached.
Feel free to alter the provided source code, but if you do so please give
credits to me. (Pinut, http://www.youtube.com/user/PinutXXL)

To start the Server just execute JavaServer.bat


I have not implemented support for Linux but it shouldnt be much work to do.

~~~Adding Songs~~~
To add a new song, place a folder containing the track (.jam), the song
(.mp3) and the information (.ini) file in the Showdown\Songs folder.
The folder name must only contain numbers 0-9 and should have a reasonable
length (didnt test but i guess it may bug if its too long or too short).
The chosen number will be used as the trackId of the song. If you dont want
to manually search for a number, you can execute renamer.jar to rename any non-
numeric folder name to a numeric one.
If you do not have the mp3 file, you must convert it to the mp3 file format.
Converters are provided for most common types(.ogg, .wav, e.g.) in the
Showdown\Converter folder.
Jamlegend uses .jam files instead of .mid files. .jam files are basically
encrypted .mid files, so you need to convert your .mid file to .jam.
Converters are available in Showdown\Cryptics\Java. Alternatively you can
just place the .mid file in the song folder and let the Http Server automatically
convert them when needed.
You could create a .bat file to get work around to not do everything
manually, i guess... .
The Song information file (ini) should contain following information:

------------------
name=*songname
artist=*artistname
difficulty=*difficulty
------------------
where *songname and *artistname should be clear. *difficulty, as the
name suggests, provides information about the difficulty about the song.

The format is:


------------------
difficulty=NSIL //N: normal, S: skilled, I: insane, L: Legendary
------------------
where the letters NSIL must be repaced by 0 or 1, depending if the
difficulty is available.
Example:
difficulty=0101 skilled legendary
difficulty=1101 normal skilled legendary
If you do not know which difficulty is covered by your track file, you
can simply run Difficulter.jar to analyze the mid or jam file and let it write the
difficulty into the .ini file. (this may take some time because it checks every
song)

note: Difficulter.jar and Renamer.jar only work for the current directory.
note2: This is fully compatible with mostly any FoF song.
note3: keep the .ini file clean and dont malform the content. Reading should
work fine anyway, but the emulator may bug out in certain cases.

Sources located in:


Difficulter: Showdown\Difficulter\src
Renamer: Showdown\Renamer\src

~~~Http Server~~~
The provided Http Server is probably pretty unsecure and not suitable for
public use. If you have the option of using a professional web server,
you should consider using that, as it greatly adds security and stability.
The only reason i didnt use it yet is that i have no clue how to configure them
correctly for my needs.
Contents available for the server must be placed in Showdown\Http. All
subfolders may be accessed publicly, so be careful what you place in it.
Additionally it uses the Showdown\Songs folder to access the mp3 and jam file
for the upload.
Logs are automatically created in Showdown\logs

Sources located in:


Http Server: Showdown\HttpListener\src

~~~Showdown~~~
The Showdown is the emulator and thus the most important part of this bundle.
It is basically diveded into 2 seperate server, which are run from the very same
.jar file.
The first one is The Rediction server:
It handles all new users and redirects them to the real Showdown
server.
Necessary configurations are located in Showdown\settings.dat.
By default it uses port 770 and ip localhost.
These are represented by port1 and ip1.
It redirects to ip2.
Logs are automatically created in Showdown\logs
The second one is the Showdown itself:
It is basiclly the core. It handles for example chatting, showdows,
users, accounts, lobbies. Yea that stuff.
Necessary configurations are located in Showdown\settings.dat.
By default it uses port 771 and ip localhost.
These are represented by port2 and ip2.
Logs are automatically created in Showdown\logs

Sources located in:


Showdown: Showdown\src

~~~Accounts~~~
Accounts are located in Showdown\accounts.
User names are represented by files (the file name) located in that folder.
Credentials are located inside that respective file.
Users should contain following information:

------------------
password=*password
avatar=*avatar
exp=*exp
roles=*roles
banned=*banned
banreason=*banreason
------------------
- *password is the users password, not encrypted, so i guess encryption
via sha-1 and maybe salt may be appropriate but, i dont need it.
- *avatar is the relative path to the users avatar. It uses the http
server as root, so if the avatar image was Showdown/http/img/avatar/user.jpg then
it should look like avatar=/img/avatar/user.jpg
- *exp is the experience of the user. It should be 0 at the beginning.
- *roles is an enumeration of the users roles. roles are: member,
moderator and founder.
- *banned boolean whether user is banned or not. true:yes false: no
- *banreason is the reason for the users ban.

~~~chat~~~
The chat is another important feature. Not only does the chat provide simple
communication between players, but it also adds a simple way to execute commands.
By default the server has quite a powerful set of commands to fulfill many
needs. All commands can be seen by typing "!help" in the chat. Any command starts
with "!".

~~~settings~~~
If you want to modify your settings, you can do so by clicking on options in
the top right corner of the website.
You have to enter your the desired name for which the settings should be
made.
The name with which you login matters, not the one displayed in