Hi there!...with this piece of code, I`v got in my small laptop samsung NC10 (10" creen) up to 18 lights at a time ... believe me !!, and with the same code, I got just 10 lights in my big laptop Acer Aspire 6930G...that means that not only the directX limitation...but the laptop limitation.
Just ckeck how many lights you get!!
`Creating a lot of lights and turnig on and off to have up to eight lights shining in the scene
`Chafari 25-9-2009
autocam off
sync on
`Texture for floor
ink rgb(100,110,90),1
box 0,0,100,100
ink rgb(90,120,80),1
box 10,10,90,90
get image 1,0,0,100,100,1
set ambient light 20
hide light 0
`we create 30 lights but just eight of them will shine at once and we turn off the rest
for i= 1 to 30
make light i
position light i,100,10,50+i*100:set light range i,3000
color light i,rgb(rnd(255),rnd(255),rnd(255))
next i
make object box 1,5,50,5:set object light 1,2
make matrix 1,200,3000,100,300
prepare matrix texture 1,1,1,1
position camera -100,700,-300
point camera -50,100,500
z=0
do
ink rgb(255,255,255),1
set cursor 5,5:print "UP TO 18 LIGHTS AT A TIME IN SCENE "
set cursor 5,440:print "USE UPKEY-DOWNKEY "
if upkey()=1 then z=z+10
if downkey()=1 then z=z-10
if z<0 then z=0
if z>2800 then z=2800
position object 1,100,25,z
for i= 1 to 30
lp=light position z(i)
if z>lp-900 and z<lp+900 then show light i else hide light i
if light visible(i)>0 then set cursor 5,15+12*i:ink rgb(255,255,0),1:print "Light ",i," ON"
if light visible(i)=0 then set cursor 5,15+12*i:ink rgb(80,80,80),1:print "Light ",i," OFF"
next i
sync
loop
cheers.
I'm not a grumpy grandpa
