SMOCaml Code
Brought to you by:
latcarfe
| File | Date | Author | Commit |
|---|---|---|---|
| etc | 2010-10-10 | latcarfe | [r25] typo |
| src | 2010-10-10 | latcarfe | [r24] adding esperanto |
| COPYING | 2010-06-05 | latcarfe | [r2] COPYING and README added |
| Makefile | 2010-06-17 | latcarfe | [r12] Player 2 support and internationalisation, not ... |
| README | 2010-10-10 | latcarfe | [r24] adding esperanto |
| SMLanProtocol.txt | 2010-10-10 | latcarfe | [r24] adding esperanto |
| TODO | 2010-10-05 | latcarfe | [r22] 'welcome' and 'about' messages |
* * * * * * * *
* * * * * * * * *
* * SMOCaml * *
* * * * * * * * *
* * * * * * * *
Description
===========
SMOCaml is a server for StepmaniaOnline written from scratch in OCaml.
It is fully compatible with SMOnline and Stepmania 4 so it can be used to
replace the old SMOnline server.
Compilation
===========
You will need OCaml to compile the server.
Un-tar the archive and type 'make' in the directory, an executable called
'smocaml' will be created.
Usage
=====
Run 'smocaml', it will listen for inbound connections at TCP/8765 (or the
port specified in the 'config.ini' file). Then every player can run
stepmania and enter the IP or DNS address of the computer where 'smocaml' is
running (every username with any password will be accepted)
Configuration
=============
All config files are in the same directory, specified at the beginning of
the 'main.ml' source file.
* 'config.ini' : main config file, you *will* want to customize the 'name'
field, and may want to change other things (for example
the language of the server)
* 'rooms.conf' : default static rooms, you *will* want to configure this
* 'messages.lang' : welcome and about messages, you *will* want to configure
this
* '$lang.lang' (where $lang is the value of the field 'lang' in 'config.ini')
: all other messages of the server, you will probably not
need to modify those files unless you are planning to add
a new language
Development
===========
SMOCaml is young but almost fully usable. It works just fine with two
players but has never been tested with more. But normaly it should work as
well.
Features
========
* Rooms should be fully supported
* The song selection system is completely different than the one of SMOnline :
every player in a room can propose a song, then every other player
(including the first one) can confirm and start this song, then the song does
not start immediately but after a countdown of 3 seconds, and every player
can cancel the song during the countdown
* In the chat, the server is much more colorful than the original SMOnline
server
* One can change the color of his name in the chatbox with the command /color
:D
* Available in french, esperanto and english, and other languages can be
easily added
Known bugs and limitations
==========================
* No login system, any username with any password is accepted
* No stats
* Not very well tested, so there could be others bugs
Licence
=======
SMOCaml is released under an MIT license, see the file 'COPYING'.
Contact
=======
You can contact me by mail at guillaume.brunerie@[gmail.com|ens.fr], and you
will find the SourceForge.net project page of SMOCaml at
https://sourceforge.net/projects/smocaml/
Structure of the source code
============================
src/ contains the source code and etc/ the config files
types.mli:
Definition of the basic types used, like a 'song', a 'player', a 'room',
and so on
common.ml:
A few useful definitions
rooms_config.mll:
Parser for the 'rooms.conf' config file, describing the default rooms
lang_config.mll:
Parser for the '*.lang' config files
config.mll:
Parser for the 'config.ini' file
C2S.ml:
Type of Client-Server packets and function translating raw data into
packets
S2C.ml:
Type of Server-Client packets and function translating packets into raw
data
network.ml:
Functions for accepting connections, listening for C2S packets and sending
S2C packets
functions.ml:
Chat and updating functions
lang.ml:
Functions handling the escape sequences in '*.lang'
player.ml: (most important file)
Function reacting to the received packets
rooms.ml:
Function sending the scoreboard updates
main.ml:
Loading of config and starting of main threads