otclient icon indicating copy to clipboard operation
otclient copied to clipboard

Lights downgrade fps massively when you are underwater

Open edubart opened this issue 12 years ago • 3 comments

This problem happens because each underwater tile has a blue light with radius 8, this can be fixed in the dat, but this should be reworked with some kind of optimization to avoid drawing too many lights with huge radius together to improve FPS

edubart avatar Jan 18 '13 19:01 edubart

Temporary soultion would be "if item id is underwater tile then ignore dat light info and draw 1sqm" or something like that. But it would improvements in places, where that tiles ends and should glow further

But anyway it would be nice thing to help people with weak computers (like me ^^)

I guess this one is hardcoded?

zakius avatar Feb 08 '13 21:02 zakius

when I tested limits of cip client this is what they did to avoid fps drops:

  • animated effects have some limit on the screen (if there is too much going on the screen, you will see only half of exevo gran mas tera for example)
  • if there are more than 8 items on the stack, they get hidden from the game window (except for archways I guess)
  • creatures stacked in one tile are on the battle list, but they if there are more than 8, they aren't displayed on the game window
  • lights have some kind of priority - hot colours (red, yellow) tend to overwrite cold ones (green, blue)
  • if you switch to dx5 you will see that each tile has some kind of brightness mask - we could use similar thing instead of per pixel drawing to draw light/shadow first, then colour individual tiles based on calculations outcome (can't do it myself because I don't know shit about computer graphics algorithms)

imo this deserves a new issue and some bounty, but I'm currently out of money unfortunately

Zbizu avatar Jan 06 '20 04:01 Zbizu

imo we should use per tile lightning/colour with heavy blur

instead of drawing bubbles, light source would change tile brightness and colour (in case of multiple lights, some colour mixing would apply), after that we could draw light with optional shadow mask

here is how it works in cip client recreated with gimp: ptl

Zbizu avatar Jan 07 '20 16:01 Zbizu