Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CF0.91.8??/lighting code ideas



	Hi, I have some other hacks I would like to release
	to the community -- but have so far been waiting on
	the next release of CF (0.91.8?). Can anyone give me
	an idea when this will be? Any information on what
	has changed (client/server)??

	I am interested (nothing done yet!!) right now on a 
	'lighting' code to modify the current line of sight
	code. -- Two types of floor archetypes would be needed
	(As I envision it): outside and inside. Perhaps the 
	flag could be called "unlit". For inside floor squares
	unlit would be set. The effect of lighting would come
	into play when the player stood on a 'unlit' flagged
	square --then all squares in the field of view with
	type 'unlit' would become 'blocking' squares, unless
	the player had a light source. In that case the code
	would always treat the nearest squares as outside or
	unlit == 0 squares (ie no blocking line of sight). This
	simple scenario works for many cases, would be fairly
	fast to code, and should put minimal load on the execution
	loop. I do see 2 problems where it might fail though:

		- mixed inside/outside maps of complex geometry.
		(say a checkerboard-type layout of inside/outside
		squares. Not really 'realistic' layout, only a 
		silly mapmaker would do this. But it is a consider
		-ation.)

		-Treatment of distant light sources in a unlit
		area. The code might be modified to account for
		this - but too many light sources could really
		slow down the execution!! 

	Any comments/ideas/critism is welcome. :) b.t.