Guida [How-To] Metin2 & Cython

Stato
Discussione chiusa ad ulteriori risposte.

martysama0134

Utente Platinum
9 Gennaio 2009
3,446
80
1,703
1,107
Ultima modifica da un moderatore:
Avviso: Lascerò il contenuto di questa mia guida in inglese per semplicità!

Intro
This release will explain how to "convert" your root .py files to .c ones.
Actually, Cython only converts those files to pure CPython code.

Download
NOTE: ALL THE FILES HAVE BEEN MOVED TO HOW-TO-CYTHON-MT2.

EDIT:
As requested by many people, you can download the compatible and clean official cn root dated 20131228-0034 without further edits:

Is Cython really worth it?
  • Pros
    • All the modules are compiled, and they can't be "extracted as .py" anymore.
      We can always disassemble the launcher with IDA, but the result will be pseudo-c code after waiting 6-8h of analyzing.
    • Since we're not using .pyx files but directly .py ones, there's no "so much optimization".
      At least, 10% of performance increasing is guaranteed.
  • Cons
    • For testing purposes, it's heavy to maintain. Everytime you try to re-compile your root files, you should wait 5-10 minutes.
      You can always use the uncythonized root (.py files) when you perform tests, and compile cython whenever you will make an update in your live server.
    • The launcher's size will increase ~10mb. You can actually pack it to save space.
      If you directly use a .pyd (still 10mb), the launcher's size won't increase.

VideoTutorial





Credits
  1. Me (lollo_9_1/martysama0134)
  2. Night (OST suggestion)
  3. Random Testers

What's New:

  • v2.0
    • The module's name check is now case-insensitive (colorInfo == colorinfo)
    • Added a new function rootlib/uiscriptlib.getList() to retrieve a tuple of all the available cythonized modules.
    • Now you can compile a uiscriptlib library from the uiscript\*.py files! (implemented as __USE_EXTRA_CYTHON__)
    • Added a sample ui.py containing the code to run uiscriptlib.
 
#UPDATED
s9btqJA.png

(nb: la root dovrebbe workare senza problemi anche col client r40999)
 
  • Mi piace
Reazioni: A s t e r i x
Stato
Discussione chiusa ad ulteriori risposte.