DesignOverview: Difference between revisions
Content deleted Content added
No edit summary |
imported>Hendrik Brummermann No edit summary |
||
| (85 intermediate revisions by 5 users not shown) | |||
Line 1:
{{Likely Outdated}}
!!!What is Arianne?▼
= Introduction =
{{AddMissing|towhat = text |toadd=network protocol TCP instead of UDP, Client no more in C}}
Arianne is a multi player online game framework and engine to develop turn based and real time games. It is designed so you can easily create your games on our portable, robust server architecture. The server is written in Java and Python is used for writing game rules. A mySQL backend powers the server and the server communicates with players using a UDP transport channel. Our reference clients are coded using Java and C in order to achieve maximum portability. Arianne's server is totally client agnostic making it very modifiable.
Line 9 ⟶ 11:
Arianne has always been an Open source project and always will be. Each version has been written and released as GNU GPL software. We believe the right way is to give you the power to change, edit and configure whatever you want, both on clients and the server. Arianne always welcomes your contributions and modifications to the code to make this the open source reference platform for game content providers.
Arianne is playable. Arianne now supports
* a TicTacToe game
* a multi player Gladiators fighting game
* a multi player Pacman game
* a multi player Zelda like game
You can read more about them on our main page http://arianne.sourceforge.net.<br>
Please note that the games are out of date at the moment and do not run. Please be patient until we can fix them.
!!!What is Marauroa?▼
Marauroa is our portable, robust, and multithreaded server architecture. The server is written in Java and uses Python for writing your games rules. A mySQL persistence engine powers the server and allows it to communicate with dozens of players using a UDP transport channel.
Line 24 ⟶ 28:
Marauroa is based on very simple principles:
* Clients communicate with the server and vice versa using a UDP portable network protocol. It has been designed with reliability in mind to allow a more stable experience in online games when lag occurs.
* You can develop an Arianne client on anything that is able to compile C code using the Arianne client framework.
* In order to play a game everyone needs an account on the server that is identified by a username and password.
* Players use their account to login to the server and choose a character to play the game with from one they have available in their accounts. The server checks the login information using the mySQL backend and loads the player into the game using the persistence engine.
* Players cast actions to the server in order to play. The action system is totally open and nothing is hard coded thus allowing one to fit it totally to ones game style. The server sends information at regular time intervals, called turns. Each turn a perception is sent to the clients to inform them of the state of the game and any relevant state modifications. Marauroa's perception system is based on Delta^2: an algorithm which simply sends whatever has changed.
* The server executes code each turn to move game status from one turn to the next. Using this hook it is simple to code triggers, time outs, conditions and whatever kind of behavior you need.
* The server transparently and automatically stores players and game status modifications on the persistence engine. Exactly what is stored is also configured by the game developer using the scripting language.
* Server side game rules can be written in Python to allow simple and rapid development of the game rules engine without recompiling or knowing anything about Marauroa internals. Game rules can also be coded in Java if desired.
* The server can be run with zero administration
* Another feature are statistics of usage. These are generated by the server and then stored on a mySQL database so you can later generate fancy statistics from the information. If you do not require them they can be disabled so you don't waste CPU time and disk space. Marauroa is built around modules that can be changed and disabled without affecting others.
* Both the server and the client are fully documented. The documentation includes specification and design and not just API documentation.
Marauroa server is
▲!!! Basic Design of Marauroa
▲Marauroa is a client/server application with an UDP transport.
▲Marauroa server is called marauroad, and it is built using threads. marauroad has the following set of threads:
* 1 thread to receive data from clients
* N threads to send data to clients
* 1 thread to handle the data into server actions
* 1 thread to handle RPG itself.
To denote the active behavior of the thread classes their names include the word Manager. So marauroad has:
*
*
* RPManager
The pseudo code behind
<pre>
forever
{
Line 65 ⟶ 64:
store in our queue
}
</
One level (conceptually) over
*Login
*Logout
*
*Actions
*Transfer Content
See
<pre>
forever
{
Line 95:
{
add action to game
}
if(Message is Transfer Request ACK)
{
send client the content requested
}
Line 102 ⟶ 107:
}
}
</
And finally RPManager is the active thread that keeps executing actions. Marauroa is, as you know, turn based, so actions when received are queued for the next turn, and when that turn is reached all the actions pending on that turn are executed.
The idea in RPManager is to split up complexity as much as possible: we have 2 entities to help it: Scheduler and
<pre>
forever
{
Line 121 ⟶ 126:
next turn
}
</
Scheduler handles the actions as they are sent by the
= Basic Design of ariannexp =
Ariannexp is arianne client. It doesn't matter if you use Java, C or Python, you have an interface for connecting to an Arianne server.
The basic interface allow you to create a client like:
<pre>
connect to Server
login with username and password
Show available characters
choose Character
while game keeps running
{
Get perception
apply perception to world
render world
get inputs
send actions
}
logout
</pre>
[[Category:Marauroa]]
| |||