Skip to content
/ L2py Public
forked from Yurzs/L2py

Lineage2 server emulator written in Python3

License

Notifications You must be signed in to change notification settings

wotori/L2py

 
 

Repository files navigation

L2py

Code style: black Imports: isort chat on Discord

Lineage2 Interlude+ server emulator written in python3

Stage: Alpha

What currently works

  • Login Server
  • Game Server

Contribute

Feel free to join developing our server:

How to start developing

  • Copy .env.example to .env.
  • Set environment variables as you need in .env

Using docker-compose

  • Build docker images make docker-create
  • Start containers docker-compose up -d
  • Register game server in database make compose-exec-login register_game_server <GAME_SERVER_HOST> <GAME_SERVER_PORT> <GAME_SERVER_ID>.

Without docker-compose

  • Install poetry using make install
  • Run poetry install
  • Start mongodb in container or using other methods.
  • Activate virtual environment . .venv/bin/activate
  • Register game server in database login/bin/register_game_server <GAME_SERVER_HOST> <GAME_SERVER_PORT> <GAME_SERVER_ID>
  • Start login server python login/login/runner.py
  • Start game server python game/game/runner.py

Emulator server architecture

Project is split to 2 components:

  • Login Server - L2 login service + basic HTTP API
  • Game Server - L2 game service + basic HTTP API

All those services have own instances of common.application.Application with specific modules (for example game server have TCPServerModule, HTTPServerModule, ScheduleModule).

ApplicationModules

Each ApplicationModule adds functionality to main application process. All modules are running in one asyncio loop.

  • TCPServerModule: L2 protocol requests handler
  • HTTPServerModule: HTTP JSON requests handler
  • ScheduleModule: CRON tasks runner

TCPServerModule Middlewares

Middlewares are used in L2 protocol handler for convenient way for not caring about all those complicated protocol specific encryption.

Data types

Most of the custom data types derive from ctypes (At least numeric ones.)

About

Lineage2 server emulator written in Python3

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.5%
  • Other 1.5%