Cave lighting

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

zick
Novice
Novice
Posts: 194
Joined: 21 Feb 2007, 03:30
Location: City Of Champions Again

Re: Cave lighting

Post 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.
User avatar
Jaxad0127
Manasource
Manasource
Posts: 4209
Joined: 01 Nov 2007, 17:35
Location: Internet

Re: Cave lighting

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

Re: Cave lighting

Post 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.
  • 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
Manasource
Manasource
Posts: 4209
Joined: 01 Nov 2007, 17:35
Location: Internet

Re: Cave lighting

Post by Jaxad0127 »

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

Re: Cave lighting

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

Re: Cave lighting

Post by Crush »

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