Lineage 2 C4 server emulator project in C

If something doesn't fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
ruke
Posts: 13
Joined: Wed May 05, 2010 8:30 pm

Lineage 2 C4 server emulator project in C

Post by ruke » Fri Sep 18, 2020 1:49 am

Hello guys, hope you are doing great. I just wanted to share with you the project I have been
working on for the last couple of years.

https://github.com/Ruk33/l2auth

This is just a learning project, I always wanted to work using the C programming language but
never found the right project until I thought, hey, what if I build a Lineage 2 server with it?

Initially, the goal was to just get a password error message, that was it. After several tries,
after bashing my head against the keyboard I managed to get it right and when I saw

Image

I just wanted to keep going, see how far I could make it and how bad could I break things, ie:

Image
(not a bug, clearly a feature)

So far I don't have a lot of functionality but I do have quite a bit of the foundation to keep on adding stuff.

Image

With this project I have learned a lot of things (one of those is being able to lively inject code changes into the
server without requiring to shut it down and restart it) and I thought maybe I can share it with someone else and
they will find it interesting. This is by no means a serious project, at least not for the moment, it's just
a project to learn and have fun.

Hope you like it and if you want to jump in the project you are more than welcome.

Thanks!

User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 6989
Joined: Tue Aug 11, 2009 3:36 am

Re: Lineage 2 C4 server emulator project in C

Post by Zoey76 » Tue Sep 22, 2020 10:33 pm

Looks good, have you used L2J or other projects as "sources of inspiration"? :+1:
Using Eclipse 4.16 - OpenJDK14 - MariaDB 10.4 - L2J Server 2.6.2.0

ruke
Posts: 13
Joined: Wed May 05, 2010 8:30 pm

Re: Lineage 2 C4 server emulator project in C

Post by ruke » Wed Sep 23, 2020 12:39 am

Hi Zoey76 thank you. Yes for sure, without documentation from l2jserver (C4 branch) and other projects I would have been completely lost so, big thank you to you guys!

User avatar
jurchiks
Advanced User
Advanced User
Posts: 6767
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Lineage 2 C4 server emulator project in C

Post by jurchiks » Fri Oct 02, 2020 8:04 pm

Why not C++? Also, github is not the best place to host the code because a while ago l2j and all its derivatives were DMCA'd from there for legal reasons. This might fit under the same blanket.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.

ruke
Posts: 13
Joined: Wed May 05, 2010 8:30 pm

Re: Lineage 2 C4 server emulator project in C

Post by ruke » Sun Oct 04, 2020 1:51 am

jurchiks wrote:
Fri Oct 02, 2020 8:04 pm
Why not C++? Also, github is not the best place to host the code because a while ago l2j and all its derivatives were DMCA'd from there for legal reasons. This might fit under the same blanket.
Hello jurchiks. I don't like C++, it's simply not my cup of tea.
Yes, I know l2jserver got taken down a while back but since this is a small project I don't think it will get noticed (not at the point where the repo will be taken down at least).

User avatar
jurchiks
Advanced User
Advanced User
Posts: 6767
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Lineage 2 C4 server emulator project in C

Post by jurchiks » Fri Oct 23, 2020 2:16 pm

Weird, C and C++ are so similar after all...
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.

ruke
Posts: 13
Joined: Wed May 05, 2010 8:30 pm

Re: Lineage 2 C4 server emulator project in C

Post by ruke » Mon Oct 26, 2020 5:43 pm

Well C++ has many features that I don't wanna deal with (oop, operator overloading, etc.). I like what C comes bundled with, functions, structs, variables and you are pretty much good to go.

Btw, sent a couple of updates, now you can see other players (even though they move in blocks haha)

Image

EDIT: Fixed, I was sending a movement multiplier = 0, which obviously screws the whole thing up.

Post Reply