Genisys is a Minecraft server written in PHP. It runs fine on Linux and forked from the Pocketmine codebase some time ago in the past. My attention came to Genisys after running Pocketmine for some time and constantly found myself in the situation, that after Minecraft Pocket Edition (which is my minecraft of choice) became updated Pocketmine did not allow the client to connect. Researching the topic in the Pocketmine forums revealed that there are a couple of people saying that Pocketmine is actually not further developed with enough manpower to keep on track with mcpe updates and that Genisys is more active developed. Since i did not know about Genisys and was not so happy with the disconnections I was facing I gave Genisys a try.
After installing Genisys and having ot up and running current clients could definetly connect to the server. That found out and beeing a developer on my own I want to do my part in sparing Genisys the fate of her „father“ project and at least start reading her source code so that maybe one day I can contribute to her development!
I share my experience here to easy the steps just in case someone is in the same situation like me: Here we go.
I just present some steps to get a private development environment.
Check out the source code
Genisys is available on Github under URL https://github.com/iTXTech/Genisys. So the first step is to clone the github repository:
$ git clone https://github.com/iTXTech/Genisys.git
The next step is get a php7 interpreter. Available here
To start the server cd into your genisys folder and execute the start script.
$ PHP_BINARY=/path/to/php7 ./start.sh
Php7 interpreters do not enjoy wide spread availability it seems. At least it is not available in the package repositories of my distribution of choice (Linux Mint Rosa). I managed to find a binary distribution but apparently lost the url… To see the server in action is quite fun since it works pretty nice. To proceed the development journey it’s a good idea to have some documentation at hand. Apparently the genisys github repository contains only a Doxygen file. This allows at least for creation of nice html formated source files.
Doxygen creates a set of files that present the source code. To get it you need doxygen installed (I am on Mint Linux and had it already installed).
Doxyfile resids in the Genisys root folder and hosts all the information necessary for doxygen to create a folder called „html“ filled with all the source-code in html format and more (like dependency trees for classes).
Start reading some source code
This is the tricky part and for me currently work in progress. Beeing a minecraft player i found it convincing to start with what i see when i play and find the classes that seem responsible/involved in the source code. So to stay i started my browsing the source-code journey with the namespaces:
My current impression goes like this: Block involves all the stuff that is not moving (Air, Dirt, Door, Fence, Wine, Water) normally. Entity on the other hand involves moving members of the world (Monsters, Rabbits, Humans, etc). And last the item namespace involves all the stuff that can be picked up and overlaps with the block namespace (for example there is a potato in both namespaces…).
I know there is not much to take with from here but as i noted it is work in progress!
There is an online version of the Genisys doxygen site: https://storage.googleapis.com/itx-technologies-141911.appspot.com/docs/genisys/index.html and since Genisys sourcecode is hosted on github there is a list of issues available: https://github.com/iTXTech/Genisys/issues