[Release] Lag Fix (Experimental)

Discuss Median XL!

Was that helpfull ?

Yes
46
74%
No, I Prefer Fauzt LazorLag
16
26%
 
Total votes: 62

linuxrs
Vampiress
36 | 1
ReverseEngine wrote:
linuxrs wrote:An error that keeps popping up for me after I click Save & Exit:

UNHANDLED EXCEPTION:
ACCESS_VIOLATION (c0000005)

Hope it helps.


Ok let me release a quick fix faster, i guess it's because i broken some code, i will use a permanent jump.

Edit: updated main post, try it and tell me if u still crash.


Roger that, will test!
User avatar
romanN1
Core Lord
397 | 34
Great Popularity Badge
Has a thread with over 50.000 views
Common Love Badge
Earned over 20 cookies
I didn't get that error at all...
User avatar
void
Shadowgate Totem
1771 | 97
Common Posting Badge
Posted over 1.000 messages
Great Popularity Badge
Has a thread with over 50.000 views
Common Love Badge
Earned over 20 cookies
Common Guide Badge
Created a complete character guide
It's far from perfect, but it's beautiful. Thank you.
This is what I've been dreaming of for a long time.

Some skills seem to work better than others. I've forgotten which exactly, but Ice Lance can proc in huge numbers without lag. :thumb:
The no-shadow tweak is cool IMO, the only problem I have with it is that it makes Slain Souls in Dunc hard to see.
User avatar
ReverseEngine
Banned
63 | 2
Common Popularity Badge
Has a thread with over 10.000 views
void wrote:It's far from perfect, but it's beautiful. Thank you.
This is what I've been dreaming of for a long time.

Some skills seem to work better than others. I've forgotten which exactly, but Ice Lance can proc in huge numbers without lag. :thumb:
The no-shadow tweak is cool IMO, the only problem I have with it is that it makes Slain Souls in Dunc hard to see.


Indeed that's why it's (experimental) removing the shadows help alot, there can be a maximum of 3000 elements displayed on-screen, i did nearly reverse the entire Function where the "lower_walls" and some tile work, it's still very long, you see i spent 4-5h reversing at the following, and it's seriously much much harder than we were thinking, good thing is that Whist help as well so we are 2 making the thing :P

Blizzard simply sux, it's obviously lame that these guys never patched this "sprite overflow" they just need to set the array higher than the default to Array[30000] I mean now in 2016 we can display 30K elements or more on screen without lag...

You see just using a few brimstones this display up to more than 3000 elements, here is a little snippet of my IDA 6.8 pseudocode

ArrayIndex = *(_DWORD *)(Memory_LowerWall_ArrayStorage + 60004);
*(_DWORD *)(Memory_LowerWall_ArrayStorage + 60004) = ArrayIndex + 1;
if ( ArrayIndex < 0xBB8 )
{
ReadtGraphics_LowerWall = Memory_LowerWall_ArrayStorage + 20 * ArrayIndex + 4;


So it is a structure (i have no idea what is the real look, i didn't really spent time RE the structure) i spent nearly all my time test/renaming, so what it does here, if the Current Index is lower than 0xBB8 (3000) which is the size of the array, then this render the element which is added in the array, if it's higher than 0xBB8 (3000) then this cannot render anymore and you all get bug.

Note that this isn't a "general" array, there is array for every layers, including shadows (from entity), shadows (tile), Floor layer1, Floor layer2, Lower wall, Normal wall, Higher wall, Roof, and Dead Corpse ! Usually it's the exact same structure while in different function, and to find out what everything does ...
User avatar
void
Shadowgate Totem
1771 | 97
Common Posting Badge
Posted over 1.000 messages
Great Popularity Badge
Has a thread with over 50.000 views
Common Love Badge
Earned over 20 cookies
Common Guide Badge
Created a complete character guide
Well, in cLoD sprite overflow isn't as much of an issue so it's probably never been something Blizz was considering to need a fix.

Woud it be possible to modify the function so that after the 3000 sprite mark has been reached to start over with using the first array slot, in a way that would show all sprites, but make them somewhat flicker? Like in the old NES games.
Do you know what I mean by that?
User avatar
ReverseEngine
Banned
63 | 2
Common Popularity Badge
Has a thread with over 10.000 views
void wrote:Well, in cLoD sprite overflow isn't as much of an issue so it's probably never been something Blizz was considering to need a fix.

Woud it be possible to modify the function so that after the 3000 sprite mark has been reached to start over with using the first array slot, in a way that would show all sprites, but make them somewhat flicker? Like in the old NES games.
Do you know what I mean by that?


You can't do that, when the index is for exemple at "3000" this mean that there is 3000 element that EXIST in the array, setting the current index to "1" for exemple would just result in a crash and still, this will not fix anything because you have reach the maximum rendering thing for let's say "sprite+shadows", the memory is filled with those elements, no way to delete them like that and if we do so this is the exact same thing as the sprite overflow do, after the limit nothing can be added more (if you cast) a skill at index 3001 for exemple, the element will not be added and so not rendered.

Setting index to 1 is the same as "deleting everything" and adding "1" element, also it's the game itself that allocate/add element to those arrays, you can't really manipulate them and all of their data without making instant crash, the only way is to understand how it work, how is the structure, and the final touch re-allocate it to increase his lenght (that's what must be done in the end) so we could display any amount of element we want, without crashing D2Engine since the sprite cache is made to handle half of thing.

Also there is multiple place where those arrays are used (for the other layers) there is a need to replace all occurence as well.
User avatar
void
Shadowgate Totem
1771 | 97
Common Posting Badge
Posted over 1.000 messages
Great Popularity Badge
Has a thread with over 50.000 views
Common Love Badge
Earned over 20 cookies
Common Guide Badge
Created a complete character guide
ReverseEngine wrote:Also there is multiple place where those arrays are used (for the other layers) there is a need to replace all occurence as well.

Why? Are the arrays dependent on each other?
User avatar
ReverseEngine
Banned
63 | 2
Common Popularity Badge
Has a thread with over 10.000 views
void wrote:
ReverseEngine wrote:Also there is multiple place where those arrays are used (for the other layers) there is a need to replace all occurence as well.

Why? Are the arrays dependent on each other?


You have an array storing Lower wall graphics, another storing general sprite/shadows, another storing roof, another storing certain tiles + warp tile (entity) etc, it's not a general array for everything ^^.
Trolinu
Skeleton
3 | 0
any news from Macro to use on TsW?

and also I dont have a file to replace in MODS/Median XL folder... :(
User avatar
Taem
Necrobot
2476 | 151
Common Posting Badge
Posted over 1.000 messages
Legendary Popularity Badge
Has a thread with over 250.000 views
Great Love Badge
Earned over 100 cookies
Great Supporter Badge
Donated 5 times
You just drop the dll into the mods folder and d2se sees it and replaces the stock one. The only thing I'm not sure of is if goes in the MODS folder, or the actual game folder in mods, so I put it in both.