Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,731 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Pixels bleeding into background? #122971
04/11/07 03:32
04/11/07 03:32
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
I don't know if this is a glitch in the engine or in the script, but I want to place a button at coordinates (0,0) on the screen and set it to be invisible. But, not only does it show up anyway, the button's initial background color "bleeds" into the main background panel for some odd reason.

My level_loader.wdl:

Code:
 var video_mode= 8;
var video_screen= 1;
var video_depth= 32;


include "level_loader_top.wdl";
include "level_loader_car.wdl";

string level1_wmb= <carmovesnd.wmb>;
string level2_wmb= <top_move_test.wmb>;

bmap back_pcx= "mrcode.pcx";
bmap mouse_pcx= "cursor.pcx";


function main()
{
mouse_map= mouse_pcx;
mouse_mode= 2;
while(1)
{
mouse_pos.x= pointer.x;
mouse_pos.y= pointer.y;
wait(1);
}
}

panel back_pan
{
pos_x= 0;
pos_y= 0;
bmap= back_pcx;
flags= visible;
}

panel button1_pan
{
button= (384,250,"topspinner_on.pcx","top_spinner.pcx","topspinner_ovr.pcx",load_lvl1,null,null);
layer= 2;
flags= visible;
}

panel button2_pan
{
button= (350,350,"car3d_on.pcx","car_3d.pcx","car3d_ovr.pcx",load_lvl2,null,null);
layer= 2;
flags= visible;
}

panel exit_pan
{
button (290,450,"exit_on.pcx","exit_off.pcx","exit_ovr.pcx",exit,null,null);
layer= 2;
flags= visible;
}

panel back_button
{
button= (0,0,"back_on.pcx","back.pcx","back_ovr.pcx",null,null,null);
layer= 3;
flags= visible;
}

function load_lvl1()
{
wait(1);
mouse_mode= 0;
wait(1);
button1_pan.visible= off;
wait(1);
button2_pan.visible= off;
wait(1);
exit_pan.visible= off;
wait(1);
back_pan.visible= off;
wait(2);
level_load (level2_wmb);
wait(1);
camera.x= 0;
camera.y= -876;
camera.z= 664;
camera.pan= 90;
camera.tilt= -62;
camera.roll= 0;
}

function load_lvl2()
{
wait(1);
mouse_mode= 0;
wait(1);
button2_pan.visible= off;
wait(1);
button1_pan.visible= off;
wait(1);
exit_pan.visible= off;
wait(1);
back_pan.visible= off;
wait(2);
level_load (level1_wmb);
wait(2);
camera.x= -714;
camera.y= 0;
camera.z= 845;
camera.pan= 360;
camera.tilt= -71;
camera.roll= 0;
}

function exit()
{
while(1)
{
sys_exit(null);
wait(1);
}
}



And the images showing the error:
Without back button code:

With back button code:


Please excuse the tiny images, Imageshack does ridiculous things to your pictures. Still, at least you can see the difference.


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: Pixels bleeding into background? [Re: MrCode] #122972
04/11/07 04:39
04/11/07 04:39
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
make sure sky_color is not set to 0,0,0


xXxGuitar511
- Programmer
Re: Pixels bleeding into background? [Re: MrCode] #122973
04/11/07 11:32
04/11/07 11:32
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Code:
function exit()
{
while(1)
{
sys_exit(null);
wait(1);
}
}



This comment is not related to your problem, however, this piece of code is totally senseless, as the content of your loop will be executed only once. The loop is superfluous.


Always learn from history, to be sure you make the same mistakes again...
Re: Pixels bleeding into background? [Re: Uhrwerk] #122974
04/11/07 16:53
04/11/07 16:53
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I'm not sure if the sky_color thing I posted would help. I'd have to have/see your problem so I could better understand whats going on.

I thought it was sky_color, because when all its color vectors are set to 0, the background will not be redrawn...


xXxGuitar511
- Programmer
Re: Pixels bleeding into background? [Re: xXxGuitar511] #122975
04/11/07 22:25
04/11/07 22:25
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
sky_color doesn't change anything. (just tried it at 1,0,0)

EDIT: And a new problem arises! I originally didn't have any function assigned to the button, but now that I do, when I click it (after loading a level), the image tiles itself over the background!

Last edited by MrCode; 04/11/07 22:40.
Re: Pixels bleeding into background? [Re: MrCode] #122976
04/11/07 23:08
04/11/07 23:08
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Post the rest of your code. I don't see any potential problems in the above code...

EDIT: Also, can you give us a better description of your error. The more details, the better!


xXxGuitar511
- Programmer
Re: Pixels bleeding into background? [Re: xXxGuitar511] #122977
04/11/07 23:19
04/11/07 23:19
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
Here's the NEW code:

Code:
var video_mode= 8;
var video_screen= 1;
var video_depth= 32;

include "level_loader_top.wdl";
include "level_loader_car.wdl";

string level1_wmb= <carmovesnd.wmb>;
string level2_wmb= <top_move_test.wmb>;

bmap back_pcx= "mrcode.pcx";
bmap mouse_pcx= "cursor.pcx";


function main()
{
mouse_map= mouse_pcx;
mouse_mode= 2;
while(1)
{
mouse_pos.x= pointer.x;
mouse_pos.y= pointer.y;
wait(1);
}
}

panel back_pan
{
pos_x= 0;
pos_y= 0;
bmap= back_pcx;
flags= visible;
}

panel button1_pan
{
button= (384,250,"topspinner_on.pcx","top_spinner.pcx","topspinner_ovr.pcx",load_lvl1,null,null);
layer= 2;
flags= visible;
}

panel button2_pan
{
button= (350,350,"car3d_on.pcx","car_3d.pcx","car3d_ovr.pcx",load_lvl2,null,null);
layer= 2;
flags= visible;
}

panel exit_pan
{
button (290,450,"exit_on.pcx","exit_off.pcx","exit_ovr.pcx",exit,null,null);
layer= 2;
flags= visible;
}

panel back_button
{
button= (0,0,"back_on.pcx","back.pcx","back_ovr.pcx",go_back,null,null);
layer= 3;
}

function load_lvl1()
{
wait(1);
button1_pan.visible= off;
wait(1);
button2_pan.visible= off;
wait(1);
exit_pan.visible= off;
wait(1);
back_pan.visible= off;
wait(1);
back_button.visible= on;
wait(2);
level_load (level2_wmb);
wait(1);
camera.x= 0;
camera.y= -876;
camera.z= 664;
camera.pan= 90;
camera.tilt= -62;
camera.roll= 0;
}

function load_lvl2()
{
wait(1);
button2_pan.visible= off;
wait(1);
button1_pan.visible= off;
wait(1);
exit_pan.visible= off;
wait(1);
back_pan.visible= off;
wait(1);
back_button.visible= on;
wait(2);
level_load (level1_wmb);
wait(2);
camera.x= -714;
camera.y= 0;
camera.z= 845;
camera.pan= 360;
camera.tilt= -71;
camera.roll= 0;
}

function exit()
{
sys_exit (null);
}

function go_back()
{
wait(1);
back_pan.visible= on;
wait(1);
button1_pan.visible= on;
wait(1);
button2_pan.visible= on;
wait(1);
exit_pan.visible= on;
wait(1);
back_button.visible= off;
}



Is there a website that will host any file for free, as I would like to post a demo to clarify more as to what is going on.


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: Pixels bleeding into background? [Re: MrCode] #122978
04/11/07 23:21
04/11/07 23:21
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Email it to me and I'll host it...


xXxGuitar511
- Programmer
Re: Pixels bleeding into background? [Re: MrCode] #122979
04/12/07 00:53
04/12/07 00:53
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Quote:

sky_color doesn't change anything. (just tried it at 1,0,0)




Try (8,8,8).


Always learn from history, to be sure you make the same mistakes again...
Re: Pixels bleeding into background? [Re: Uhrwerk] #122980
04/12/07 00:57
04/12/07 00:57
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
Didn't change anything. Still showing over background, still tiling after using it in a level.

EDIT: Is there a "tile" flag that I'm not aware of?

Last edited by MrCode; 04/12/07 04:03.

Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Page 1 of 2 1 2

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

Gamestudio download | 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