Page 2 of 2

Re: Cave lighting

Posted: 08 Jul 2008, 02:01
by zick
so the server would send the coordinates of a shape of what the player could see. sounds like a good idea, but that's alot of server load.

Re: Cave lighting

Posted: 08 Jul 2008, 02:15
by Jaxad0127
zick wrote:so the server would send the coordinates of a shape of what the player could see. sounds like a good idea, but that's alot of server load.
Essentially. It could (and maybe should) be simplified by only sending info from the player's field of view (like it does now with players/monsters/npcs/etc).

Re: Cave lighting

Posted: 08 Jul 2008, 11:58
by Crush
It is not necessary to include the light radius of most objects in the netcode.

The light radius of static objects can be defined in the map files, the light radius of monsters in the monsters.xml and in any case where the light radius of an object has to be set dynamically it can be done with one additional byte in addition to the other look informations.

Re: Cave lighting

Posted: 08 Jul 2008, 15:07
by Jaxad0127
Right. Only light from other players (and some special cases) needs to be sent in the net code.

Re: Cave lighting

Posted: 08 Jul 2008, 21:29
by Jaxad0127
Crush wrote:jaxad: The technical problems I mentioned wouldn't be solved by that. The problem is that SDL does not support any opacity maps.
It does support images with alpha. A black overlay with transparent areas for lights could work.

Re: Cave lighting

Posted: 08 Jul 2008, 22:14
by Crush
The problem I am talking about is generating said image.