nipkownix / re4_tweaks

Fixes and tweaks for the "UHD" port of Resident Evil 4
zlib License
345 stars 32 forks source link

I figure out something about Slowmotions and Crashes. #280

Open FutonGama opened 2 years ago

FutonGama commented 2 years ago

About Slowmotions and Crashes.

(I put this in the Issues Feature request because i don't know where is the correct location to put this topic) I realised the game do alot of slow motions and can crash because of the EFF(Effects) files inside the UDAS files of every enemy of BIO4/Em. I made a test by put 255 Novistador in r111 just to see if make difference in FPS when removing EFF using Son of Persia Tools decreasing the Effect0GroupCount to 0 (Effect0 in this case, sometimes is on Effect1 too) in the .Idx file like this. notepad++_CFwgnLJxfC

And here is the Results: https://www.youtube.com/watch?v=DJ_9_OAsB9k

The game with EFF and many enemies runs horrible and crashes. Without EFF runs 60 smooth without crash. Maybe increasing EFF alloc memory can be useful for prevent crashes or maybe make this effects get more light. Feels good put the fix optional in Memory Tab. I think this can help in many ways. You can see Mega Salvadors have too many fogs and other effects when he turn on the Chainsaw and causes lag, but this only happen if he turn on the Chainsaw. Another problem is if you put many enemies and kill everyone very fast or throw a granade in many enemies at same time, the game causes lag or crash. I have a code from Qingsheng to decrease or increase how many enemies the granade can hit at time.

Tested on Bio4.exe 1.0.6 with 4gb patch. How many enemies grenade explode at time: (Only work for explosive granade)

Offset 285E2D. Default value is 14

14 = 20 enemies - feel free to change

Try put 32(50 enemies in decimal) and thrown a grenade in the middle of the enemies and the game will slow motion and will crash because have too many EFFs.

OBS: All this tests i made using RE4 Tweaks "dinput8-emListParamExtension-initFixTest" the build what emoose made for size and speed of enemies, this build from here (https://github.com/nipkownix/re4_tweaks/pull/266) and i'm using Qingsheng DLL(More informations about this DLL in the bottom of post). This dll works with re4 Tweaks but the problem happen with the DLL or without it. And i'm using HD Project. But this things happen without it too and on my HD Project i have reduced alot the .pack files size for optimize the game.

Qingsheng tried to find the EFF memory for alloc but no luck yet so he thinks Emoose or nipkownix can try to see it.

I have a very high end computer and still have too much lag with EFF. Here the most important configurations: i9 10900 RTX 2080 Super 32 GB RAM 5 TB HD - 1 TB SSD NVME

I know how to remove EFFs from the enemies but i think is better optimize it maybe increasing the memory. I'm not programmer so you guys will know alot more than me. If completely remove the effects of the game i don't think is a good idea because breaks the immersion and thats one of the reasons i'm saying that here about EFF files.

(About Qingsheng, he is my friend, he is a Chinese and a Excelent programmer. He made a DLL to fix many things of the game but in this case is focused more to mod experience and he is making it compatible with RE4 Tweaks.)

Hope this helps with something about the slow motions of the game or crashs. I'm aware the re4 tweaks DLL is for increase the original experience and i trying to find problems and solutions for help the game in many ways, helping the original game or mods or both things at same time, in this case helps both. But i have stop reporting problems related only to mods. Thanks for the attention.

If someone have a doubt just ask me, i will responde everything. Thank You.

Mister-Curious commented 2 years ago

I think what he is asking here is that we need more memory allocated to textures, because when there are an abundance of effect textures loaded into memory, the game will either slow down, or start to unload effect textures.

I have a VERY heavy EFF file for one room that uses dozens and dozens of instances of a water effect (this effect uses 60 textures). If I start spamming grenades, the game will start to unload effect textures for weapons (like the muzzle flash of guns). Other times the loading time of the sprites for these effects will slow down significantly.

I would be really interested in a patch to allocate more memory for effects. I must say though this rarely happens in the vanilla game, and really only happens when modders overload texture memory. In the case of @FutonGama he is simply loading an extraordinary amount of enemies on screen at one time, whereas in my case I am loading an extraordinary amount of effect textures into memory at one time. It should be noted I also have a very powerful machine.

If anyone is interested at taking a crack at this I can provide a room that will reproduce the issue.

FutonGama commented 2 years ago

I think what he is asking here is that we need more memory allocated to textures, because when there are an abundance of effect textures loaded into memory, the game will either slow down, or start to unload effect textures.

I have a VERY heavy EFF file for one room that uses dozens and dozens of instances of a water effect (this effect uses 60 textures). If I start spamming grenades, the game will start to unload effect textures for weapons (like the muzzle flash of guns). Other times the loading time of the sprites for these effects will slow down significantly.

I would be really interested in a patch to allocate more memory for effects. I must say though this rarely happens in the vanilla game, and really only happens when modders overload texture memory. In the case of @FutonGama he is simply loading an extraordinary amount of enemies on screen at one time, whereas in my case I am loading an extraordinary amount of effect textures into memory at one time. It should be noted I also have a very powerful machine.

If anyone is interested at taking a crack at this I can provide a room that will reproduce the issue.

I Agree, i will not lie, my game have many enemies and can cause that happen, is good increase the memory, i have already see many modders with lag just because 1 Mega Salvador on the map and some enemies, lag playing on mercenaries. Well everything to help with that is welcome. I'm glad to help if need.

DarthxVoid commented 2 years ago

I'm playing the original game right now and when i throw a flash grenade on armors the game lag a lot.

kTeo-0 commented 2 years ago

yeah i agree, EFF is one of the biggest problems for the slowmotion of this game. One example is r107 or r11b, many users may experience heavy lag on those areas, including me, and literally all lag was gone once i nulled the EFF of those areas.