Re: [Guide]Understanding Development of GameServer Files and Main.exe
Quote:
Originally Posted by
FeN$x
In fact i code on ASM and my progress is much superior than to mod kantru event, i also got MU S3 mixs, golden fenrir, new class, new wings options and custom events...
And? You can make this shits using only funcions implemented in GameServer (ItemSerialCreateSend, ChaosBoxInit), sniffer, decryptor and some packets. My Season3 mixes had only ~15 lines code in C++.
Quote:
Originally Posted by
FeN$x
ASM its much superior than C++ on speed
And it's the most bugless way to code something in mu. In C++ you have more advance mechanisms, like polymorphism, inheriting and predefine compile profiles. In ASM you have only procedural coding. In C++ your code is more clear than assembler and it's more receptive on changes, so you should learn C++. Now i know C++, ASM and some Delphi and coding in C++ is the most effective for me.
C++:
Code:
typedef int(*pItemSerialCreateSend)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD);
pItemSerialCreateSend ItemSerialCreateSend = (pItemSerialCreateSend)0x004036BB;
ItemSerialCreateSend(aIndex, 0xFF, gObj_GetInt(aIndex, gObj_POSX), gObj_GetInt(aIndex, gObj_POSY), WingsId, 0, 255, 0, 0, 0, -1, 0, 0);
ASM:
Code:
PUSH 0
PUSH 0
PUSH -1
PUSH 0
PUSH 0
PUSH 0
PUSH 255
...
...
...
...
(and more)
MOV EAX, 0x004036BB
CALL EAX
Show your code Kanturu Event in ASM and compare it with my Code in C++:
.: Coderz Factory Network :. .
Maybe some day I release my code for Illusion Temple Event and 3rd Level quest, of course in C++, so you can compare coding in ASM and C++ more in detail ;).
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Quote:
Originally Posted by
zimbred
And? You can make this shits using only funcions implemented in GameServer (ItemSerialCreateSend, ChaosBoxInit), sniffer, decryptor and some packets. My Season3 mixes had only ~15 lines code in C++.
And it's the most bugless way to code something in mu. In C++ you have more advance mechanisms, like polymorphism, inheriting and predefine compile profiles. In ASM you have only procedural coding. In C++ your code is more clear than assembler and it's more receptive on changes, so you should learn C++. Now i know C++, ASM and some Delphi and coding in C++ is the most effective for me.
C++:
Code:
typedef int(*pItemSerialCreateSend)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD);
pItemSerialCreateSend ItemSerialCreateSend = (pItemSerialCreateSend)0x004036BB;
ItemSerialCreateSend(aIndex, 0xFF, gObj_GetInt(aIndex, gObj_POSX), gObj_GetInt(aIndex, gObj_POSY), WingsId, 0, 255, 0, 0, 0, -1, 0, 0);
ASM:
Code:
PUSH 0
PUSH 0
PUSH -1
PUSH 0
PUSH 0
PUSH 0
PUSH 255
...
...
...
...
(and more)
MOV EAX, 0x004036BB
CALL EAX
Show your code Kanturu Event in ASM and compare it with my Code in C++:
.: Coderz Factory Network :. .
Its very easy to know ItemSerialSend but do you know the arguments how they work???... i believe coding its not just copy and paste:
Code:
Push 0
Push 0
Push - 1
Push 0
Push 0
Push 0
Push 0FFH
Push 0
Mov Eax, WingsID
Push Eax
Push 0
Push 0
Push 0FFH
Push Edx
Call CreateItemSend
Mov Eax, MixlpObj
Mov Edx, DWord Ptr Ds:[Eax]
Push Edx
Call InvCommit
Yeah you can some day end coding new class i mean 3 years more xD...
Compare the my wings source code:
Code:
MixRecv Proc
Local TypeMix:DWord
Mov Eax, DWord Ptr Ss:[Ebp + 0CH]
Mov TypeMix, Eax
Xor Eax, Eax
Switch TypeMix
Case 25H
Mov Edx, DWord Ptr Ss:[Ebp + 8]
Invoke NewWingsMix, Edx
Mov Eax, 1
Case 26H
Mov Edx, DWord Ptr Ss:[Ebp + 8]
Invoke FinalMixWings, Edx
Mov Eax, 1
EndSw
ret
14 lines caused first 2 dont count, and only source code, C++ compiler make 15 lines of you to 30 meaby xD.
Can i wonder whats Illusion temple type packet??? caused i got them all, but can you tell me just one?? xD
Quote:
In C++ your code is more clear than assembler and it's more receptive on changes, so you should learn C++. Now i know C++, ASM and some Delphi and coding in C++ is the most effective for me.
SCF team code on C++, they got much more than to code easy wings mixs, i can bet they tell you ASM is superior xD.
If not search on google the compilation, and polymorphism has nothing to do, meaby people think caused you say weird words you know more, but for be more sure, themida packer use polymorphism system on ASM and pholymorphism create much more lines on compilation and in source code, polymorph code it increase lag and speed, i wonder why you name it on MU?? meaby caused weird words make people think you know alot xD.
C++ Retard compilation has we see:
Code:
MOV EAX, 0x004036BB
CALL EAX
ASM Compilation:
(1 line less and no EAX regist used)
Code:
PS: Hey sobieh if you reading this laugh a little, polymorph on C++ make the compilation faster hahahaha xDDD
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Quote:
Originally Posted by
FeN$x
SCF team code on C++, they got much more than to code easy wings mixs, i can bet they tell you ASM is superior xD.
I agree with FeN$x this time, but no always ;), ASM its fast and superior, but a pain of ass if you made for example 6 events, simples can be, but harder, you dont have Objects but its really fast.
Re: [Guide]Understanding Development of GameServer Files and Main.exe
No, polymoprhism and others object oriented featues in C++ doesn't make C++ faster (in several cases) than ASM, but code is more regularized, besides code effectivity it's not only one point (see source of MANGoS emulator).
I saw some your source (example Fenrir mix) and it's very chaotic.
btw. Your source of season 3 miexes is incomplete, it's only protocol core hook ;). Show your mix functions...
Ym, now i must finish code ELF MP3Player for My siemens CX65@70. See you later :).
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Quote:
Originally Posted by
zimbred
No, polymoprhism and others object oriented featues in C++ doesn't make C++ faster (in several cases) than ASM, but code is more regularized, besides code effectivity it's not only one point (see source of MANGoS emulator).
I saw some your source (example Fenrir mix) and it's very chaotic.
btw. Your source of season 3 miexes is incomplete, it's only protocol core hook ;). Show your mix functions and then we can compare our codes...
LoL mix dont need protocol core hook hahahaha, they just need to be hook on looper of mixs proc, its not protocol core xD.
And fenrir mix source was public, my source publics are coded on minutes, mine there its working and for you can test new class and golden fenrir with all working including mixs and custom things enter to my server:
200.104.20.46
Anyone than want to enter allowed, use the account:
user test1
pass test1
New class workings, S3 mixs working, custom events working, golden fenrir full working with options, /Adds commands working, /Post and /ServerInfo, NPC Silent teleport working, S3 custom drops working also.
You can see DeathWay source code GS on C++, and you can still ask him if ASM its more faster and much more complete on compilation than C++.
Also ASM is more bug free, ASM also used for profecional packers like themida, armadillo, ASPack and others.
PS: I need to end coding polymorphic methamorph hiper super dual quantum bathroom (sounds very weird, but people think this way i am pro xD)
Re: [Guide]Understanding Development of GameServer Files and Main.exe
ProtocolCore call Mix Proc, so you can hook your MixFunctions from DLL into Mix proc or ProtocolCore. Hook in protocol core is more effective, because you can intercept mix packet earlier than mix call - when you intercept mix packet you can jump to end ProtocolCore function without requirements of interpreting packet by GameServer functions.
I don't must test new classes and others Season 3 features on your server, because i test it on my own server :).
Anyway - This logical, that ASM is faster than C++, because ASM is low-level language, BUT code Windows, Office or Mu Emulator in ASM - this is the point for me ;] ;).
Re: [Guide]Understanding Development of GameServer Files and Main.exe
C++ can be faster as ASM, it depend of your compiler
Code:
CMsg::CMs>/$ 55 PUSH EBP
10001017 |. 8BEC MOV EBP,ESP
10001019 |. 83EC 08 SUB ESP,8
1000101C |. C745 F8 CCCCC>MOV [LOCAL.2],CCCCCCCC
10001023 |. C745 FC CCCCC>MOV [LOCAL.1],CCCCCCCC
1000102A |. 894D F8 MOV [LOCAL.2],ECX
1000102D |. C745 FC 30B00>MOV [LOCAL.1],MuMsg.1001B030 ; ASCII "Msg error"
10001034 |. 6A 34 PUSH 34 ; /n = 34 (52.)
10001036 |. 6A 00 PUSH 0 ; |c = 00
10001038 |. 8B45 F8 MOV EAX,[LOCAL.2] ; |
1000103B |. 05 24000200 ADD EAX,20024 ; |
10001040 |. 50 PUSH EAX ; |s
10001041 |. E8 0A080000 CALL MuMsg.memset ; \memset
10001046 |. 83C4 0C ADD ESP,0C
10001049 |. 8B4D F8 MOV ECX,[LOCAL.2]
1000104C |. C701 00000000 MOV DWORD PTR DS:[ECX],0
10001052 |. 8B55 FC MOV EDX,[LOCAL.1]
10001055 |. 52 PUSH EDX ; /src
10001056 |. 8B45 F8 MOV EAX,[LOCAL.2] ; |
10001059 |. 05 24000200 ADD EAX,20024 ; |
1000105E |. 50 PUSH EAX ; |dest
1000105F |. E8 FC060000 CALL MuMsg.strcpy ; \strcpy
10001064 |. 83C4 08 ADD ESP,8
10001067 |. 8B45 F8 MOV EAX,[LOCAL.2]
1000106A |. 83C4 08 ADD ESP,8
1000106D |. 3BEC CMP EBP,ESP
1000106F |. E8 3C080000 CALL MuMsg._chkesp
10001074 |. 8BE5 MOV ESP,EBP
10001076 |. 5D POP EBP
10001077 \. C3 RETN
Now Optimized , note that there aren't calls
Code:
CMsg::CMs>/$ 8BD1 MOV EDX,ECX
10001022 |. 53 PUSH EBX
10001023 |. 56 PUSH ESI
10001024 |. 57 PUSH EDI
10001025 |. 8D9A 24000200 LEA EBX,DWORD PTR DS:[EDX+20024]
1000102B |. B9 0D000000 MOV ECX,0D
10001030 |. 33C0 XOR EAX,EAX
10001032 |. 8BFB MOV EDI,EBX
10001034 |. F3:AB REP STOS DWORD PTR ES:[EDI]
10001036 |. BF 30800010 MOV EDI,MuMsg.10008030 ; ASCII "Msg error"
1000103B |. 83C9 FF OR ECX,FFFFFFFF
1000103E |. 8902 MOV DWORD PTR DS:[EDX],EAX
10001040 |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
10001042 |. F7D1 NOT ECX
10001044 |. 2BF9 SUB EDI,ECX
10001046 |. 8BC1 MOV EAX,ECX
10001048 |. 8BF7 MOV ESI,EDI
1000104A |. 8BFB MOV EDI,EBX
1000104C |. C1E9 02 SHR ECX,2
1000104F |. F3:A5 REP MOVS DWORD PTR ES:[EDI],DWORD PTR DS>
10001051 |. 8BC8 MOV ECX,EAX
10001053 |. 8BC2 MOV EAX,EDX
10001055 |. 83E1 03 AND ECX,3
10001058 |. F3:A4 REP MOVS BYTE PTR ES:[EDI],BYTE PTR DS:[>
1000105A |. 5F POP EDI
1000105B |. 5E POP ESI
1000105C |. 5B POP EBX
1000105D \. C3 RETN
Original
Code:
CMsg::CMsg() // Correct
{
char * szMessageError ="Msg error";
memset(&this->m_szMuMsgError , 0, sizeof(this->m_szMuMsgError ) );
this->m_ListInit = 0;
strcpy(this->m_szMuMsgError , szMessageError);
}
Now i MUST remark that less lines don't means Better perfomance, Registers in ASM were made for increase the speed, thats why many c++ compilers use it on its routines, playing with code like INC DWORD PTR DS[XXXXXXX] is for reduce the code , playing with INC EAX is related with Speed, however ASM can be faster i think
PD: some new compilers also Add an special feature related with Calling procedures, they avoid the classic PUSH , instead of that they reserve a space for the stack, adding the ESP value, and then they use the MOV instruction , this also increase even more the speed, at first look, this should look more "heavy", but it is faster
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Quote:
Originally Posted by
Deathway
C++ can be faster as ASM, it depend of your compiler
Code:
CMsg::CMs>/$ 55 PUSH EBP
10001017 |. 8BEC MOV EBP,ESP
10001019 |. 83EC 08 SUB ESP,8
1000101C |. C745 F8 CCCCC>MOV [LOCAL.2],CCCCCCCC
10001023 |. C745 FC CCCCC>MOV [LOCAL.1],CCCCCCCC
1000102A |. 894D F8 MOV [LOCAL.2],ECX
1000102D |. C745 FC 30B00>MOV [LOCAL.1],MuMsg.1001B030 ; ASCII "Msg error"
10001034 |. 6A 34 PUSH 34 ; /n = 34 (52.)
10001036 |. 6A 00 PUSH 0 ; |c = 00
10001038 |. 8B45 F8 MOV EAX,[LOCAL.2] ; |
1000103B |. 05 24000200 ADD EAX,20024 ; |
10001040 |. 50 PUSH EAX ; |s
10001041 |. E8 0A080000 CALL MuMsg.memset ; \memset
10001046 |. 83C4 0C ADD ESP,0C
10001049 |. 8B4D F8 MOV ECX,[LOCAL.2]
1000104C |. C701 00000000 MOV DWORD PTR DS:[ECX],0
10001052 |. 8B55 FC MOV EDX,[LOCAL.1]
10001055 |. 52 PUSH EDX ; /src
10001056 |. 8B45 F8 MOV EAX,[LOCAL.2] ; |
10001059 |. 05 24000200 ADD EAX,20024 ; |
1000105E |. 50 PUSH EAX ; |dest
1000105F |. E8 FC060000 CALL MuMsg.strcpy ; \strcpy
10001064 |. 83C4 08 ADD ESP,8
10001067 |. 8B45 F8 MOV EAX,[LOCAL.2]
1000106A |. 83C4 08 ADD ESP,8
1000106D |. 3BEC CMP EBP,ESP
1000106F |. E8 3C080000 CALL MuMsg._chkesp
10001074 |. 8BE5 MOV ESP,EBP
10001076 |. 5D POP EBP
10001077 \. C3 RETN
Now Optimized , note that there aren't calls
Code:
CMsg::CMs>/$ 8BD1 MOV EDX,ECX
10001022 |. 53 PUSH EBX
10001023 |. 56 PUSH ESI
10001024 |. 57 PUSH EDI
10001025 |. 8D9A 24000200 LEA EBX,DWORD PTR DS:[EDX+20024]
1000102B |. B9 0D000000 MOV ECX,0D
10001030 |. 33C0 XOR EAX,EAX
10001032 |. 8BFB MOV EDI,EBX
10001034 |. F3:AB REP STOS DWORD PTR ES:[EDI]
10001036 |. BF 30800010 MOV EDI,MuMsg.10008030 ; ASCII "Msg error"
1000103B |. 83C9 FF OR ECX,FFFFFFFF
1000103E |. 8902 MOV DWORD PTR DS:[EDX],EAX
10001040 |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
10001042 |. F7D1 NOT ECX
10001044 |. 2BF9 SUB EDI,ECX
10001046 |. 8BC1 MOV EAX,ECX
10001048 |. 8BF7 MOV ESI,EDI
1000104A |. 8BFB MOV EDI,EBX
1000104C |. C1E9 02 SHR ECX,2
1000104F |. F3:A5 REP MOVS DWORD PTR ES:[EDI],DWORD PTR DS>
10001051 |. 8BC8 MOV ECX,EAX
10001053 |. 8BC2 MOV EAX,EDX
10001055 |. 83E1 03 AND ECX,3
10001058 |. F3:A4 REP MOVS BYTE PTR ES:[EDI],BYTE PTR DS:[>
1000105A |. 5F POP EDI
1000105B |. 5E POP ESI
1000105C |. 5B POP EBX
1000105D \. C3 RETN
Original
Code:
CMsg::CMsg() // Correct
{
char * szMessageError ="Msg error";
memset(&this->m_szMuMsgError , 0, sizeof(this->m_szMuMsgError ) );
this->m_ListInit = 0;
strcpy(this->m_szMuMsgError , szMessageError);
}
Now i MUST remark that less lines don't means Better perfomance, Registers in ASM were made for increase the speed, thats why many c++ compilers use it own its routines, playint with code like INC DWORD PTR DS[XXXXXXX] is for reduce the code , playing with INC EAX is with Speed,
C++ its not made for playing with regist, in fact its oriented to playing with structured coding, has you put there its a very good example of structured, it can be reduced with ASM much more.
This is SSE scalar definition on VC++ compared with ASM:
VC++ vs assembler code and how to write floating point code using scalar SSE
A good document to see, more if some people think VC++ its superior on scalar fuctions SSEs fuctions and also it explain about FPUs.
Re: [Guide]Understanding Development of GameServer Files and Main.exe
I really wanted to learn c++ before. But it gets frustrating :S
Re: [Guide]Understanding Development of GameServer Files and Main.exe
omg, i saw "[Guide]Understanding Development of GameServer Files and Main.exe"
where is the guide?
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Dude Chill out, You think a simple guide will teach you how to understand a c++ gameserver? Stuff like that doesn't happen over night. Even if he'd explain every detail I bet it wouldn't help.
I think his topic just says the simple truth. Wanna understand? Learn to read its language.
Re: [Guide]Understanding Development of GameServer Files and Main.exe
[QUOTE=Rmmntqo;2564202]omg, i saw "[Guide]Understanding Development of GameServer Files and Main.exe"
where is the guide?
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Quote:
Dude Chill out, You think a simple guide will teach you how to understand a c++ gameserver? Stuff like that doesn't happen over night. Even if he'd explain every detail I bet it wouldn't help.
I think his topic just says the simple truth. Wanna understand? Learn to read its language.
no, o dont think, i just think that is a stupid title, no one here want to help, want to teach anothers.
but if i see here something simple, i can make another things, this is for me and for a lot of peoples here.
Quote:
I never sell nothing, but thx for giving the idea :), now for every line of code of my work i will get one dollar ok?.
About adding commands, you don't need to be an advanced programer, its easy, you just need how to use the brain, for example, for a "new command": message.wtf have the commands right?, then how is called the string for get the command?, with a PUSH, then in Olly you search for this command PUSH 0BC3H, (/Stop battle), and then learn how this string is stored and all of that and you will learn how to add a command,
"competitors", i'm not here for a race, i'm here beacause i make this on my free time, in fact i never will learn something related with generic coding, nor programing, because this is not what i like for life. that's why i shouldn't "teach"
And please do NOT say that i don't show you how to deal with programs, i have done 4 tuts relating with GS and Connecservers (specially related with WzAG.dll and how to decompile it), i make a guide for decripting packets sended by Launchers of WZ, i make guides for Get the passwords used in the FTP , specially for get in VTM FTPs, i make a tut on how to trace Packets from mains, i make guide on how to inject code to dump PAckets and then store it on a file, , i make a tut on how to activate the GG with NPGG Checksums, i make a Dev on how to rebuild a DB from applications (specially from MUManager and JoinServer) coz the DB was imcomplete when we got the 0.99.60T, and i released lots of sources codes, as well as protocol documentations, so don't say that i never did something, now if you have never seen this, it's not my fault, ( its fault of RZ that deleted all the DEV thread some time ago)
good luck, you can take a lot of dollars makin that. look fen$x, perhaps now he is rich like bill gates.
about add commands or features, i tried to show how to make a guide.
now peace: when i said "Sobieh, Fen$x, Deathway, bet0x or any other, " i mean "the coders", i dont know you or your work, if a made a error, sorry please, but you know, they any time want money, look the "new" coder at RZ, luciano aibar, he made 24 "Betas" and now stop the releases, and are askin money to give the files, codes etc... like Fen$x did some days before, like Sobieh do.
I'm not sain that "they cant ask by money", or sain that they arent "good guys", im just sain. this is a stupid topic, with a stupid title, nothing or no one here are sain how to understand development, this topic just say "stop ask about that!"
about the "race", perhaps you not, but they are, you know, "who have the best files, with the pest features", i remember a lot of shits, CZF x Codeus x FMG x MX x Anything, Fen$x x L3ser x MG-Stat x DukeGr x the earth.
the fact is: no one here will put anything for the public without return.
the pleoples here show the things only when need something, like luciano needed testers.
again, if i did some error, or injustice, sorry, im sain what i see and what i know.
this is a stupid quarrel.
Re: [Guide]Understanding Development of GameServer Files and Main.exe
There is no point of this topic open.
Can a mod delete it?