Jump to content
Sign in to follow this  
x3w0r

Regarding source codes....

Recommended Posts

So, I literally spent over 2 months (not full time/student) trying to fix the source codes, each error that gets fixed makes apparition to another one, I don't believe that either IGG/Moliyo/XHDW would run a bugged game, neither be able to compile it.I believe that @jianjian is the one who sold the SRC to our community, would anyone explain why this is looking so much like been modified before being sold?There are many discontinued codes/non-existing ones.

Share this post


Link to post
Share on other sites
22 minutes ago, x3wor said:

So, I literally spent over 2 months (not full time/student) trying to fix the source codes, each error that gets fixed makes apparition to another one, I don't believe that either IGG/Moliyo/XHDW would run a bugged game, neither be able to compile it.I believe that @jianjian is the one who sold the SRC to our community, would anyone explain why this is looking so much like been modified before being sold?There are many discontinued codes/non-existing ones.

I believe the code has been recompiled to be run in vs 2015+, which probably caused a lot of issues. However, it seems to be possible to fix it, as pko currently runs on a compiled source and there is at least one more private server. Sorry if I'm mistaken or anything... I'm not quite sure.

Share this post


Link to post
Share on other sites

I've been attempting to fix the codes too, but I'm still stumped on 3 big ones, that's why I didn't release what I have so far. I guess I'll just release it as is then as soon as possible. I just need to make a compilation on all changes I made into commits. My files are based on the changed client/server files from 2.x.

 

Doesn't pko run the source based on 1.38 files?

  • Like 1

Share this post


Link to post
Share on other sites
18 hours ago, deguix said:

I've been attempting to fix the codes too, but I'm still stumped on 3 big ones, that's why I didn't release what I have so far. I guess I'll just release it as is then as soon as possible. I just need to make a compilation on all changes I made into commits. My files are based on the changed client/server files from 2.x.

 

Doesn't pko run the source based on 1.38 files?

It does actually run on that version, I guess a 1.38 version of src is floating elsewhere in the web.

Share this post


Link to post
Share on other sites

I am one of two that have 1.38 src codes (aside from pk.o), and no - it isnt floating on the web.

both was reversed through binary matching. The client is still on progress led by wrex. But enough about who have what

On 11/27/2017 at 3:22 PM, x3wor said:

would anyone explain why this is looking so much like been modified before being sold?There are many discontinued codes/non-existing ones.

If you have a repo, and u should always have before starting such project - then we can document what needs to be reverted to be able to see

what was changed in the first place.

On 11/27/2017 at 3:22 PM, x3wor said:

each error that gets fixed makes apparition to another one, I don't believe that either IGG/Moliyo/XHDW would run a bugged game, neither be able to compile it.

post errors here, our community have plenty of hungry developers, and are willing to help !

sure, dont go changing codes just because it compiles, we have sufficient resource to have it compile + make it work as intended.


kong.png

a2.png

Share this post


Link to post
Share on other sites

And a guide:

- use the compiler that it was intended for (upgrade later if needed)

- make sure it compiles first before doing anything.

- if possible, run it and see if it works

- dump structures using ur fav tool ida/pdbex/etc. 

- revert the struct in src, it will lead to showing what methods/function needs reverted (captain, amfitheatre, item lock, etc), then fix those

- diff ur compiled exe with existing & working releases.

- and a big help: some dates were commented by lark li. Use those as reference. 

 

Sorry for double post. 

 


kong.png

a2.png

Share this post


Link to post
Share on other sites
Quote

I am one of two that have 1.38 src codes (aside from pk.o), and no - it isnt floating on the web.

both was reversed through binary matching. The client is still on progress led by wrex. But enough about who have what

 

You mean, the source code that was released as the 1.x here (and on that file leak site), but then binary matched.

 

Quote

If you have a repo, and u should always have before starting such project - then we can document what needs to be reverted to be able to see what was changed in the first place.

 

I didn't put it at repo first because I was in doubt if I could fix the most grotesque bugs (ones that prevent playing the game). So far I couldn't find a good binary to do binary matching with.

Edited by deguix

Share this post


Link to post
Share on other sites

Thats true, finding client is super hard these days.
I've tried finding Client from PKO 1.3[3..8] era and still havent luck.
Though, I know that, zero, top2, and pk.o has enough to give a nice understanding of how the src is suppose to be. (with matching pdb)

For the errors that you've encounter, I can try to help. And it's nice to have a leader to lead a community to the
right path such as yourself.


kong.png

a2.png

Share this post


Link to post
Share on other sites

No not yet. For the issues: the skill effects are still missing, all models disappear on graphics system options change. The todo: Basically remove the bin/txt files and make them lua with ffi, develop the default mod more (which is disabled at the moment), complete the pt_BR translation, get some of the game systems into lua like the item type UI (which is hard coded still, but shouldn't), make src 64bits so as to compile on linux. There should be more but lack of time is really problematic.

  • Like 1

Share this post


Link to post
Share on other sites

I don't know, I am not sure neither, but imho I don't think that building a client in 64x version would make a difference on its flexibility, rather than this, probably should make TOP client adapted to CPU hyperthreading as well as reducing the amount of ram that it consumes the more time it is open.

Share this post


Link to post
Share on other sites

Making it 64bits will allow it to use more memory and won't clog the same memory other 32bits apps use. The problem at the moment is luajit having a 1gb max memory on 64 bits, which will cause issues, so it's not a high expectation.

 

Now for hyperthreading - I don't think I want to go that far for such an old game. If you think this game is too slow for you then you should buy a new computer - I did and I don't regret it. Now if someone else wants to patch it with it go ahead. Hyperthreading is not simple to do. The source is really big.

  • Like 1

Share this post


Link to post
Share on other sites

I was thinking of just using ffi. I just didn't do it yet because I was still trying to make the game work. Luabridge has some limits that don't work too well (ran out of time).

Share this post


Link to post
Share on other sites

Don't think Lua bridge would make any difference, it will just make this more difficult and complicated and I guess would have to recode many pieces of Lua codes, it's the same case for LuaJIT.

Spoiler

 

Share this post


Link to post
Share on other sites
2 hours ago, x3wor said:

Don't think Lua bridge would make any difference, it will just make this more difficult and complicated and I guess would have to recode many pieces of Lua codes, it's the same case for LuaJIT.

  Hide contents

 

* LuaJIT increases performance up to x150, so it does make a difference. (byte codes is trasformed into native machine codes on the fly)

* LuaJIT is easy to integrate, almost a drag-drop scenario. exchanging lua syntax is not hard. mainly (loops, (...) args)

* What dequix is saying is using FFI to call native C/C++ or even construct C/C++ structures/class into lua and retrieving them directly.
 


kong.png

a2.png

Share this post


Link to post
Share on other sites

Luajit is already implemented. The lua code was already adapted to luajit. Basically I converted pko2.7 mod and my client mod to use luajit.

 

EDIT: Fixed compile_src.bat, so now the project can be used.

Edited by deguix

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...