Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Lower cpu usage

Custom Title Activated
Member
Joined
Dec 5, 2009
Messages
2,657
Reaction score
1,178
I don't understand, please help if you know this

well idk what was the prob for you, it's 1 sec to find the right offset by searching Swap buffers or txt string - "Connection closed"

so for ur main it's 006703E4

now what u have to do i's call kernel sleep on 00670405 & nop useless line

sleep for ur main = CALL DWORD PTR DS:[6E8148]

so the final code shd lk like

Code:
00670405     6A 01          PUSH 1
00670407     FF15 48816E00  CALL DWORD PTR DS:[<&KERNEL32.Sleep>]    ;  kernel32.Sleep
0067040D     90             NOP
0067040E     90             NOP
0067040F     90             NOP
00670410     90             NOP
00670411     90             |NOP
00670412     90             NOP
00670413     90             NOP
00670414     90             NOP
00670415     90             NOP
00670416     90             NOP


HF ;)
 
Last edited:
Junior Spellweaver
Joined
Jun 13, 2012
Messages
160
Reaction score
26
thx man, but is lagged after loading main... it's stop move animation and nothing happened.

my code:
Code:
006703E4  |. FF15 74806E00  CALL DWORD PTR DS:[<&GDI32.SwapBuffers>] ; \SwapBuffers
006703EA  |> FF15 44816E00  CALL DWORD PTR DS:[<&KERNEL32.GetTickCou>; [GetTickCount
006703F0  |. 2B85 A0FEFFFF  SUB EAX,DWORD PTR SS:[EBP-160]
006703F6  |. 8985 98FEFFFF  MOV DWORD PTR SS:[EBP-168],EAX
006703FC  |> 83BD 98FEFFFF >/CMP DWORD PTR SS:[EBP-168],28
00670403  |. 7D 14          |JGE SHORT Main.00670419
00670405     6A 01          PUSH 1
00670407     FF15 48816E00  CALL DWORD PTR DS:[<&KERNEL32.Sleep>]    ;  kernel32.Sleep
0067040D     90             NOP
0067040E     90             NOP
0067040F     90             NOP
00670410     90             NOP
00670411     90             |NOP
00670412     90             NOP
00670413     90             NOP
00670414     90             NOP
00670415     90             NOP
00670416     90             NOP
00670417  |.^EB E3          \JMP SHORT Main.006703FC
any idees ?
 
Last edited:
Custom Title Activated
Member
Joined
Dec 5, 2009
Messages
2,657
Reaction score
1,178
thx, man, I love you ! it's work :laugh:

new, tell me please how i find sleep in this ?

np & same, by searching Swap buffers (CTRL+N) or txt string - "Connection closed"

anw offset of right sb for this main = 006B4A23

ps: also dont forget about jmp to gettickcount next to swapbuffers (006B4A29)
 
Junior Spellweaver
Joined
Jun 13, 2012
Messages
160
Reaction score
26
sorry, for this simple question(for you), this most helped me, thx ))

50 cpu usage -> 34
Gembrid - Lower cpu usage - RaGEZONE Forums
 
Junior Spellweaver
Joined
Jun 25, 2006
Messages
191
Reaction score
226
swap buffers allows u to set vsync state, opengl driver with vsync on will auto-sleep the fame to lock it in 60 fps max, so u dont have to use sleep.
vsync will try to reach 60 fps, it will cost 1%, 10%, 50% or 100% of main thread, depending on how many vertex/indexes the 60 render operations will need to draw (in one second).
 
Initiate Mage
Joined
Aug 27, 2008
Messages
27
Reaction score
5
First of all thanks for your guide. It really works! On my computer (CPU: Intel Dual Core 2.45GHz) before the change when I was running MU v0.97d in windows mode, it used 59% of CPU when the player was on idle mode and 73% when the player was killing a lot of mobs. Now that I followed your guide, when the player is on idle mode it uses only 17% of CPU and when he is killing mobs it uses 43%!!! :thrasher:
 
Member
Joined
Jan 10, 2007
Messages
530
Reaction score
12
Does 1.04.04 (S6Ep3) already include it? Because I can't find this issue.
 
Initiate Mage
Joined
Feb 7, 2013
Messages
33
Reaction score
1
my main

004DA391 . FF15 FC24D200 CALL DWORD PTR DS:[<&OPENGL32.glFlush>] ; OPENGL32.glFlush
004DA397 . 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8]
004DA39A . 52 PUSH EDX ; /hDC
004DA39B . FF15 3421D200 CALL DWORD PTR DS:[<&GDI32.SwapBuffers>] ; \SwapBuffers
004DA3A1 > A1 30CBE800 MOV EAX,DWORD PTR DS:[E8CB30]
004DA3A6 . 2B45 8C SUB EAX,DWORD PTR SS:[EBP-74]
004DA3A9 . 8945 98 MOV DWORD PTR SS:[EBP-68],EAX
004DA3AC . 837D 98 28 CMP DWORD PTR SS:[EBP-68],28
004DA3B0 . 7D 32 JGE SHORT main.004DA3E4
004DA3B2 . B9 28000000 MOV ECX,28
004DA3B7 . 2B4D 98 SUB ECX,DWORD PTR SS:[EBP-68]
004DA3BA . 898D 74FEFFFF MOV DWORD PTR SS:[EBP-18C],ECX
004DA3C0 . 8B95 74FEFFFF MOV EDX,DWORD PTR SS:[EBP-18C]
004DA3C6 . 52 PUSH EDX ; /Timeout
004DA3C7 . FF15 0C22D200 CALL DWORD PTR DS:[<&KERNEL32.Sleep>] ; \Sleep
004DA3CD . A1 30CBE800 MOV EAX,DWORD PTR DS:[E8CB30]
004DA3D2 . 0385 74FEFFFF ADD EAX,DWORD PTR SS:[EBP-18C]
004DA3D8 . A3 30CBE800 MOV DWORD PTR DS:[E8CB30],EAX
004DA3DD . C745 98 280000>MOV DWORD PTR SS:[EBP-68],28
004DA3E4 > 8B8D 88FEFFFF MOV ECX,DWORD PTR SS:[EBP-178]
004DA3EA . 034D 98 ADD ECX,DWORD PTR SS:[EBP-68]
004DA3ED . 894D 94 MOV DWORD PTR SS:[EBP-6C],ECX
004DA3F0 . 0FB615 1FCBE80>MOVZX EDX,BYTE PTR DS:[E8CB1F]
004DA3F7 . 85D2 TEST EDX,EDX
004DA3F9 . 0F84 92000000 JE main.004DA491
004DA3FF . 833D E809E600 >CMP DWORD PTR DS:[E609E8],5
004DA406 . 0F85 85000000 JNZ main.004DA491
004DA40C . B9 50377908 MOV ECX,main.08793750
004DA411 . E8 9AFE1500 CALL main.0063A2B0
004DA416 . 83F8 FF CMP EAX,-1
004DA419 . 75 76 JNZ SHORT main.004DA491
004DA41B . 833D 70CBE800 >CMP DWORD PTR DS:[E8CB70],0
004DA422 . 75 6D JNZ SHORT main.004DA491
004DA424 . C705 70CBE800 >MOV DWORD PTR DS:[E8CB70],1
004DA42E . 68 8C7AD200 PUSH main.00D27A8C ; /Arg2 = 00D27A8C ASCII "> Connection closed. "
004DA433 . 68 D8C5E800 PUSH main.00E8C5D8 ; |Arg1 = 00E8C5D8

how fix???
 
Initiate Mage
Joined
May 11, 2014
Messages
9
Reaction score
4
someone check my main and fix it.
Link:
REMOVED
Thank you very much.


4FUNer can you help me :(
 
selling server files is against RZ rules
Joined
Feb 26, 2013
Messages
542
Reaction score
131
Help please.
i'm using main 1.03.16, but I have not found anything like the screenshot.

in my main.exe
uX6zGFO - Lower cpu usage - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Back
Top