Cave lighting

Content and general development discussion, including maps, quests, and server code from the development team.
zick
Novice
Novice
Posts: 194
Joined: Wed Feb 21, 2007 4:30 am
Location: City Of Champions Again

Re: Cave lighting

Post by zick » Tue Jul 08, 2008 3:01 am

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.
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: Thu Nov 01, 2007 6:35 pm
Location: Internet

Re: Cave lighting

Post by Jaxad0127 » Tue Jul 08, 2008 3:15 am

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).
Image
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: Thu Aug 25, 2005 5:08 pm
Location: Germany

Re: Cave lighting

Post by Crush » Tue Jul 08, 2008 12:58 pm

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.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: Thu Nov 01, 2007 6:35 pm
Location: Internet

Re: Cave lighting

Post by Jaxad0127 » Tue Jul 08, 2008 4:07 pm

Right. Only light from other players (and some special cases) needs to be sent in the net code.
Image
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: Thu Nov 01, 2007 6:35 pm
Location: Internet

Re: Cave lighting

Post by Jaxad0127 » Tue Jul 08, 2008 10:29 pm

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.
Image
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: Thu Aug 25, 2005 5:08 pm
Location: Germany

Re: Cave lighting

Post by Crush » Tue Jul 08, 2008 11:14 pm

The problem I am talking about is generating said image.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Post Reply