Sign in to follow this  
Sheffie

Incorrect choice of light source

Recommended Posts

 

N9f5P35.jpg

 

DVRQfko.jpg

 

 

Problem: When more than one personal light source is available, the code doesn't choose the brightest light. See images above.

  • The first image shows the effect of a lit lantern, QL 67 and painted blue. This illuminates four tiles away from the player (OK).
  • The second image shows the effect of a Brass Vynora rune attached to an equipped studded leather cap, QL 85 and painted green. This illuminates about 2 tiles from the player (OK).

 

However, the only difference in circumstances between the two images is that in the second, the cap is equipped and in the first it isn't. The lantern is lit in both cases.

In other words, when it has a choice, the game engine is choosing to use the weaker of the possible two light sources (NOT OK).

 

Theory: The engine chooses the highest quality item that provides light, rather than the item that will provide the brightest light (NOT OK).

 

Possible solutions:

  1. (Not preferred) Whenever the player's personal list of light sources changes (a light source is un/equipped, lit/snuffed) look at every light source and determine which produces the brightest light (largest radius) taking into account both item quality, type of rune, and any other factors. Having determined the brightest source, use that radius and RGB value until another change.
  2. (Preferred) Whenever the player's personal light sources change, look at every light source and determine an overall blended average of all sources - then use the resulting radius and RGB until another change.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this