Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lights downgrade fps massively when you are underwater #220

Open
edubart opened this issue Jan 18, 2013 · 3 comments
Open

Lights downgrade fps massively when you are underwater #220

edubart opened this issue Jan 18, 2013 · 3 comments
Labels
Milestone

Comments

@edubart
Copy link
Owner

edubart commented Jan 18, 2013

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

@zakius
Copy link

zakius commented Feb 8, 2013

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?

@Zbizu
Copy link
Contributor

Zbizu commented Jan 6, 2020

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
Copy link
Contributor

Zbizu commented Jan 7, 2020

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

tornadia pushed a commit to tornadia/otclient that referenced this issue Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants