Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
sky_color background -- no background - how? #254955
03/06/09 16:42
03/06/09 16:42
Joined: Nov 2008
Posts: 215
V
vertex Offline OP
Member
vertex  Offline OP
Member
V

Joined: Nov 2008
Posts: 215
I'm using a good deal of template code. Among that code is display00.wdl.

I have some environments/levels that have solid color backgrounds and different interiors/levels that I want to have no background at all. This is for reasons of optimization. Removing the background helps a bit on interiors. (Fellow noobs, you'll no it's gone if you adjust the sky_color settings and you create a window in your interior and see an odd motion blur-like render effect. (The trick is to have no windows/views of the backgroiund.)
In display change skycolor to all 0s.
sky_color.red = 0;
sky_color.green = 0;
sky_color.blue = 0;


The problem is that display settings of the first level get carried over to other levels.

Help is appreciated.


Re: sky_color background -- no background - how? [Re: vertex] #254970
03/06/09 19:10
03/06/09 19:10
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
set the sky color to something else when you load the new level.....


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: sky_color background -- no background - how? [Re: Michael_Schwarz] #254994
03/06/09 21:46
03/06/09 21:46
Joined: Nov 2008
Posts: 215
V
vertex Offline OP
Member
vertex  Offline OP
Member
V

Joined: Nov 2008
Posts: 215
Thanks Michael.

"The problem is that display settings of the first level get carried over to other levels."

That is, I was doing exactly what you wrote already, but it isn't working.
I'm setting sky_color from a certain rgb (on the first level) to nothing (on a subsequent level).

If I load the no background level by itself without first loading the level with a solid sky color the sky color settings get set properly. Of course this isn't a solution when level switching is going on...


This appears true of other display settings as well, i.e. clip range. I need clip closer for some levels for optimization.

(Fellow noobs adjusting your clip and your background can greatly affect frame rate.)

Any help appreciated.

Thanks.

Re: sky_color background -- no background - how? [Re: vertex] #255001
03/06/09 22:17
03/06/09 22:17
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
are you setting the new sky color after or before loading the new level? (e.g. before you invoke the level_load command)


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: sky_color background -- no background - how? [Re: Michael_Schwarz] #255007
03/06/09 23:08
03/06/09 23:08
Joined: Nov 2008
Posts: 215
V
vertex Offline OP
Member
vertex  Offline OP
Member
V

Joined: Nov 2008
Posts: 215
Ok, thnks Michael. Before I was duplicating the display wdl and attempting to include a unique version of "display00.wdl" for each level by using "include" calling the modified nobackgrounddispaly00.wdl in each level's first script-- each level other than 2(the one that needs a solid sky). Doesn't work.

After your last response, I dusted off the unused portion of my artist brain and I took a look at "levels00.wdl" searching for the exit function. I found it, and inserted the sky_color to 0 settings... worked! but for one problem-- returning to the hub world (level2) which needs a solid sky, now loads first time to solid but of course on return from another level no background (not what I need) (because I've altered the exit function to do so).

The super complex solution algorithm that I created ... "if level2 don't do that"...

(I'm very new to programming). (level_num is a var pre setup in the template by its author. I am attempting to only give a solid sky on levle 2.
I'm getting several "parameter unknown errors" with my code below.
"parameter unknown-- keyword else bad parameter in {}
parameter unknown-- sky_color.red bad parameter in {}
...


The function Levels00_Exit_Pt_Event() is part of the template-- everything that follows is my addition and the rest is not included in my post.

My question now is what is wrong with this code:

function Levels00_Exit_Pt_Event()
{

if (level_num == 2)
{
// make a red one to test
sky_color.red = 100;
sky_color.green = 0;
sky_color.blue = 0;
} else // turn it off for optimization
{ sky_color.red=0;
sky_color.green = 0;
sky_color.blue = 0;
}
....

Thanks.

Re: sky_color background -- no background - how? [Re: vertex] #255313
03/09/09 14:16
03/09/09 14:16
Joined: Nov 2008
Posts: 215
V
vertex Offline OP
Member
vertex  Offline OP
Member
V

Joined: Nov 2008
Posts: 215
Still need help on this if anyone can do so.

I thought I had it taken care of using some work arounds-- but not really-- need to change background sky color between levels.

Thnx.


Last edited by vertex; 03/09/09 14:16.

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