abstract: "<em>lkn</em> is an Elixir framework to implement actor-based game
server. It makes a heavy use of the Elixir macro system to implement
a homegrown Entity-Component-System (ECS) whose purpose of
(eventually) getting ride of as much boilerplate as possible."
credit: "The <em>lkn</em> logo, originally created by <a href=\"https://www.artstation.com/redily\">Redily</a>"
* A Bit of History
/lkn/ comes with a long history of ambitious and unfinished hobbyist projects
that aimed to create a Multiplayer Online Role Playing Game in line with [[https://slayersonline.net][Slayers
Online]], a French game I was playing back in 2007. I started to write a first
prototype in C++ in 2014. The project was called /FrostEngine/ in honor of
the creator of Slayers Online, Frostfall. However, I quickly decided to start
over in order to use the new cool kid in town: Rust. Between December 2014 and
April 2015, I implemented (with the help of a friend) [[https://hub.darcs.net/lthms/lycand][/lycan/]] (later renamed
/lycand/, with the d means dropped) an actor-based game server capable of
dynamically spawning and killing map instances as players come and leave. Each
actor had its own (native) thread, which led to an increasing complexity to keep
the whole thing consistent. This led to the decision to [[https://github.com/GreenPix/lycan][try another approach,
based on a more classical event loop]] using this cool new thing called [[https://carllerche.github.io/mio/mio/index.html][mio]]
(remember, we are in early 2015, and [[https://tokio.rs][tokio]] is not yet a thing!). This new lycan
went pretty far, but eventually our motivation faded away.
As time passes, the idea of an actor-based game server remains stuck in my head,
for better or worse ; until a colleague mentioned Elixir during a lunch
break. It was all I needed to get back on track. For the record, /lkn/ was
initially versioned using [[https://pijul.org][pijul]] and was, for a time, the second larger project
in this case (after pijul itself!). It was my way to contribute to this project,
by finding and reporting bugs and feature requests. When pijul changed its patch
format, I decided to switch to git as I had become a regular contributor and was
able to help the project otherwise.