ArenaEngine development is on hold.


 

ArenaEngine is a server platform for massively multiplayer games.

It is designed to abstract away complexity of concurrency and horizontal scalability- so that you can focus on implementing game logic instead.

At the core ArenaEngine is using Erlang, language used for over two decades in telecommunication industry as well as more recently allowing many software companies overcome difficult scalability design problems.

Game objects (called also arena objects) are isolated, in-memory objects (technically, Erlang's lightweight processes) which communicate using built in event system. There can be millions of processes on one server acting as NPCs or handling game logic for players. The limit on one server is the memory and CPU available and it depends on how the game logic is implemented. Game objects can move around ArenaEngine platform, moving between servers without disrupting game experience.

Using such scalability it is possible to add and remove servers on the fly, not to mention that it immediately utilizes all CPU cores available on any server it runs on. Clients connected to server that is to be removed will be asked to reconnect to other server and continue on without player noticing.

What stage of development is it at?

Currently ArenaEngine is in Alpha testing (technology preview) stage. You can download the server and try it out. Over time the available documentation and features will improve. The main goal of releasing it so early is to gather feedback on what is actually important to you and be sure that the development is driven by what is important to future customers. 

What's next?

At this time, developing game logic for game objects requires using either Erlang, Efene or Elixir. A domain specific language that will compile to Erlang binary will be available as well as a visual tool (similar to Kismet in Unreal Engine) later on.

A suite of libraries are also on the roadmap. Interest management, AI, terrain and collision detection to name a few. Prioritizing of what will be developed is the point of releasing early, minimum viability product.

Also in the works is SDK for Unity3D, UDK, Adobe Flash, iOS, Android as well in form of C++ library. These SDKs will implement all the network code needed to use ArenaEngine. This includes encryption, serialization, lag compensation, authentication, etc.

Getting started.

1. Download the server binaries, make sure Riak is also installed and running, start server and create new game by executing following commands from shell:

$ bin/arenaengine start
$ bin/arenaengine game new MyGame

Which will return ID of a new game. Copy it somewhere handy. You can always get a list of games by executing

$ bin/arenaengine game list

If you want to see what is happening you can start it using 'console' rather than 'start' but if the server is already running you can always attach to the console by executing

$ bin/arenaengine attach

2. Create mygame_startup.erl file inside scripts/ folder and add following

-module (mygame_startup).
-behaviour (arena_object).
-export([ init/0, stop/0, handle_event/3 ]).

init() -> ok.
stop() -> ok.
handle_event(_Event, _Data, _Sender) -> ok.

Above is an empty template for arena_object - basic entity that can represent anything in game and that can perform variety of functions. Every game starts a bootup script that can do something when a game starts, for example populate world with NPCs. In this example we don't need it to do anything.

3. To make our game use above script at startup execute following from command line:

$ bin/arenaengine script boot GAMEID mygame_startup

Replace GAMEID with the ID you've got at step 1.

4. Next, we need script that will handle connection and data from player. Create mygame_connection_telnet.erl inside the scripts/ folder.

-module (mygame_connection_telnet).
-behaviour (arena_object).
-export([ init/0, stop/0, handle_event/3 ]).

% This is called when someone connects 
init() ->
io:format("Hey! I'm connected!~n").

% This is called when someone disconnects
stop() ->
io:format("Disconnected!~n").

% Handle some data sent from client
handle_event(received, Data, _Sender) ->
ResponseString = io_lib:format("Thanks for the ~p stuff\r\n", [Data]),
Response = list_to_binary(ResponseString),
arena_object:client_send(Response);

5. And once more, we need to configure ArenaEngine to make it use this script. From command line execute following:

$ bin/arenaengine script protocol GAMEID TelnetProtocol mygame_connection_telnet

6. Now start the game

$ bin/arenaengine game start GAMEID

7. Now the game is running and is ready to accept new connections using the TelnetProtocol on port 8356. The TelnetProtocol requires that the very first data sent to the server must be the GAMEID.

8. To stop the game execute following

$ bin/arenaengine game stop GAMEID