Nexus killed by Skycube?

Posted By: Ernie76

Nexus killed by Skycube? - 08/05/10 20:23

Hi,

i spoted some strange behavior in our Game.
I made 2 skycubes that are loaded by the engine and they work and look fine. They are 6144 x 1024 pixels large ( Exact doubel the size ob the skys, delivered with GS ). The Vidocard should easy handel that size.
Damm thing is: When pressin F11 the Nexus isent Displayed.
After rezising the skycubes to the original size ( half the size ) the nexus is displayed but the skycube looks very blurry becouse of the small size. The size is Power of 2, the memory ist there, the cube is displayed, only the damm nexus is not displayed with 6144x1024. The whole thing seems to be the source of rendom crashes.
Dose anyone has a clue why that happens?

Posted By: pegamode

Re: Nexus killed by Skycube? - 08/05/10 20:57

Some additional info:

The skycubes are declared like this:

ENTITY* cube = {
type="skycube04_high+6.tga";
layer=2;
z=5;
flags2 = SKY | CUBE;
}

ENTITY* cube_moon = {
type="skycube07_high+6.tga";
layer=2;
z=5;
flags2 = SKY | CUBE;
}

None have the SHOW flag set ... this is done separately when the levels are loaded. It's always only one of them shown.

The error occurs only if both skycubes are declared. Both work fine when standalone, but together they override some memory with the result that some engine variables are overwritten (e.g. the nexus value).
Posted By: Damocles_

Re: Nexus killed by Skycube? - 08/05/10 21:35

does it occur on a totally clean level, just using the skycubes?
Posted By: Ernie76

Re: Nexus killed by Skycube? - 08/05/10 22:14

Pegamode made a little test Program and if i understood him right, then yes.
Posted By: pegamode

Re: Nexus killed by Skycube? - 08/06/10 04:53

Yes, I can reproduce it with a small litte test program that just loads a level and declares those skycubes.

I took a "normal" skymap and used photoshop to change its size to 6144x1024.
Then I made a copy of this skymap and declared them both as shown above.

After that the nexus is overridden.

[code]
ENTITY* cube = {
type="a+6.tga";
layer=2;
z=5;
flags2 = SKY | CUBE;
}

ENTITY* cube_moon = {
type="b+6.tga";
layer=2;
z=5;
flags2 = SKY | CUBE;
}



void main() {

level_load("telescope_room.wmb");

while(1) {
wait(1);
}

}

{/code]
Posted By: pegamode

Re: Nexus killed by Skycube? - 08/06/10 06:38

By the way ... this seems to work without any problem:

Code:
STRING* cubeStr1 = "skycube04_high+6.tga";
STRING* cubeStr2 = "skycube07_high+6.tga";

ENTITY* cube = { 
	type="skycube04_high+6.tga";
	layer=2;       
	z=5;	
	flags2 = SKY | CUBE | SHOW;
}



void main() {		
	
	level_load("telescope_room.wmb");	
	
	int i = 0;
	
	while(1) {	
		
		wait(-5);
		
		if (i == 0) {
			i = 1;
			ent_morph(cube, cubeStr2);
		} else {
			i = 0;
			ent_morph(cube, cubeStr1);
		}
		
		wait(1);				
	}
	
}


Posted By: Damocles_

Re: Nexus killed by Skycube? - 08/06/10 13:25

true, tested this.
it does not show the nexus. (shows a 0)

Also when display both with show in the beginning, the engine crashes.

using a smaller skycube as second skycube works and shows the nexus.

So probably the engine runs out of memeory.
(not displaying the nexus, as it runs over a limit i suppose)
© 2024 lite-C Forums