GithubHelp home page GithubHelp logo

fobus1289 / l2c4 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ruk33/l2auth

0.0 0.0 0.0 22.67 MB

Lineage 2 C4 server written in C as a learning exercise

License: GNU General Public License v3.0

Shell 0.85% C 99.15%

l2c4's Introduction

L2 AUTH
    L2auth is a simple Lineage 2 Chronicle 4 (C4) server emulator written in 
    the C programming language as a learning exercise. The project's objective
    is not to be a 1:1 implementation with the official servers but rather, 
    just a fun experiment to see and explore what can be made with it.

COMMUNITY
    - Join our Discord at https://discord.gg/A62eUFfDp6
    - Watch the development of the project in:
        - Youtube: https://www.youtube.com/channel/UCmbdpFvxXfxk4KbmUgTAomw
        - Twitch: https://www.twitch.tv/franco_montenegro

QUICK START
    - Download a release from: https://github.com/Ruk33/l2auth/releases
    - Start the login server from a terminal with: bash ./loginserver
    - Start the game server from a terminal with: bash ./gameserver
    - Run the game (make sure your system or /etc/host file is set for localhost)
    The login server will listen for connections to localhost using port 2106.
    The game server will listen for connections to localhost using port 7777.

CONTRIBUTE
    Just open up an issue detailing what you will be working on, this way
    we can be more organized with the work. After that, just have 
    fun working on it.

    A few rules for contributors:
    - No dynamic memory allocation. Exceptions:
        - Third party libraries
        - Platform specific code (win32, linux, etc. layers)
    - All variables must be initialized
    - No NULL, use 0 (shorter to write)
    - OS related code must be inside of the os folder (ie, src/linux)
    - Storage related code, must be inside of storage/name.c (ie, storage/sqlite.c)
    - Only 1 thread is used to handle requests
    - The code should be robust enough to handle bad and good requests without crashing
    - Have fun

CREDITS
    - l2jserver: http://l2jserver.com/
    - http://fursoffers.narod.ru/Packets.htm
    - https://code.google.com/archive/p/l2adenalib/wikis/L2LoginServerProtocol.wiki

LICENSE
    GPL

PROJECT DOCUMENTATION
    The project is split between the login server (where the user can 
    authenticate with a username and password) from the game server.

    To make it portable to multiple operating systems (Windows, Linux, etc.),
    the project separates all that platform specific code from the game code.
    The game server produces a library/dll in order to provide hot code reload.
    With this, any change in the game server code can be reflected in a 
    running server without restarting or shutting it down.

    For storage, a similar approach is taken. To support multiple databases,
    the storage code is separated from the rest of the code. In order to provide 
    a new storage/database (ie, MySQL, PostgreSQL, etc.), you only need to 
    create a new file in the storage folder and provide the implementation for
    the functions declared in src/include/storage.h. After that, just update 
    gs_lib.c and ls_lib.c to include your implementation instead of sqlite.c.

DEPENDENCIES
    - openssl: https://www.openssl.org
    - sqlite3: https://www.sqlite.org
    - cglm: https://github.com/recp/cglm

COMPILE IN LINUX
    - Run: bash build.sh
    - Run migrations and seeds (see below for these two steps)

COMPILE IN WINDOWS
    Windows builds are not being updated for the moment since I don't have
    access to a Windows PC. If you would like to contribute on this end, 
    you are welcome to do so. Thanks!

    - Open a CMD terminal
    - Run: build.bat
    - Run migrations and seeds (see below for these two steps)

RUN MIGRATIONS
    Migrations contain all the schemes for the database (meaning, how should 
    the information be stored in the database)

    - Run: bash migrations/sqlite/run.sh build/db
    This will create a database in build/db (if required) and run the migration.

RUN SEEDS
    Seeds contain some initial data to upload into the database, such as,
    server information (ie, Bartz)

    - Run: bash seeds/sqlite/run.sh build/db
    This will create some initial entries in the database build/db.

START LOGIN SERVER
    - Run: build/login_server
    The login server will listen for connections to localhost using port 2106.

START GAME SERVER
    Run: build/game_server
    The game server will listen for connection to localhost using port 7777.

LINEAGE 2 PROTOCOL
    Lineage 2 uses TCP to send packets.

    All integers are little-endian and this project is MEANT to run on little
    endian machines.

    The first two bytes of the packet contain the packet size and the third one, 
    usually the packet type.

    Other than the first packet, all the login server packets are encrypted with 
    Blowfish using the following hardcoded key ;5.]94-31==-%xT!^[$\000

l2c4's People

Contributors

ruk33 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.