Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (M_D), 1,430 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
problem with lights #400311
04/28/12 16:54
04/28/12 16:54
Joined: Dec 2003
Posts: 988
Germany, Magdeburg
JoGa Offline OP
User
JoGa  Offline OP
User

Joined: Dec 2003
Posts: 988
Germany, Magdeburg
Hey!
I have got a "little" problem with my lights.
"little" because it is no huge problem, but something, I can't understand, why it is happening.

So, here it is:
I have some lights via script on entities in my game.
Click to reveal..
Code:
function Kohlenpfanne01()
{
	while(!player)	wait(1);
	set(my, INVISIBLE);
	my.lightrange = 100+random(100);
	my.red = 170;
	my.green = 170;
	my.blue = 20;
	set(my, CAST);
	int flackern;
	int aufflackern	=	1;
	int schrumpfen		=	2;
	while(1)
	{
		if(my.lightrange < 100)	flackern	=	aufflackern;
		if(my.lightrange > 200)	flackern	=	schrumpfen;
		
		if(flackern == aufflackern)
			my.lightrange	+=	(4+random(2)) * time_step;
		if(flackern == schrumpfen)
			my.lightrange	-=	(4+random(2)) * time_step;

		effect(p_kohlenpfanne_feuer,my.lightrange/80,my.x,NULL);
		if(vec_dist(player.x, my.x) > 1000)		my.lightrange = 0;
		wait(1);
	}
}


They increase and decrease their lightrange.
I press 2 times F11 to see the radius with the yellow cubes ingame.
If I change the camera-angle, there appear some other yellow cubes, suddenly.
I don't know why. Did this happened to you, too or do you know why this happen?

Here a picture for better clarity.
first: the scene without F11, second the scene with 2xF11, third the scene with 2xF11 and a different camera-angle:


Re: problem with lights [Re: JoGa] #400314
04/28/12 17:09
04/28/12 17:09
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
May be you need to apply Per Pixel Lighting shader to the terrain, that might help, just a quick idea.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: problem with lights [Re: 3run] #400395
04/30/12 11:55
04/30/12 11:55
Joined: Dec 2003
Posts: 988
Germany, Magdeburg
JoGa Offline OP
User
JoGa  Offline OP
User

Joined: Dec 2003
Posts: 988
Germany, Magdeburg
I deactivated the terrain-shader and added a pp-Lighting shader, but the boxes appears, too.

Anyway, thanks for that idea laugh

Re: problem with lights [Re: JoGa] #400452
05/01/12 11:30
05/01/12 11:30
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 993
Budapest
Take a look at this: default.c
Search for F11, that could give an answer...

Re: problem with lights [Re: Aku_Aku] #400454
05/01/12 11:44
05/01/12 11:44
Joined: Dec 2003
Posts: 988
Germany, Magdeburg
JoGa Offline OP
User
JoGa  Offline OP
User

Joined: Dec 2003
Posts: 988
Germany, Magdeburg
thanks for your answer, but I don't know, where the answer in your link is.
I searched in default.c, too and the num_lights (which is shown in the def_debug_pan is at this point in my level 4. So the yellow boxes around my 4 lights are okay, but I don't know, what the others are for. As mentioned above, there are no other lights.
is there some description about these yellow boxes, I missed?

Re: problem with lights [Re: JoGa] #400456
05/01/12 12:14
05/01/12 12:14
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 993
Budapest
On the mentioned default.c page you can find this, when you search for F11:
Quote:
[F11] Activates a Statistics Panel (see below) that displays some predefined variables and other information. [F11] pressed a second time causes level and terrain polygon tesselation to be highlighted by red lines, and the bounding boxes of non-passable entities by a blue wireframe.

Unfortunately there is no any word for yellow lines or wireframes.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1