Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by Grant. 02/24/26 22:21
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, clint000, Grant), 6,810 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: sprites [Re: Ottawa] #272269
06/17/09 08:15
06/17/09 08:15
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
now i was trying again but no result
look at my code and tell me pls whats wrong

PANEL* visor_grain =
{


pos_x = 0;
pos_y = 0;
layer = 3;
bmap=visor_grain_1.pcx;
flags = OVERLAY;


}


function grain_startup();
{
while(1)
{
set (visor_grain, SHOW); // makes it visible
wait(1);
reset (visor_grain, SHOW); // makes it invisible
wait(1);
set (visor_grain, SHOW); // makes it visible


}
}

Re: sprites [Re: GameScore] #272292
06/17/09 10:16
06/17/09 10:16
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
sorry i didn't answer earlier... your function should look like this:
Code:
function grain_startup();
{
    while(1)
    {
        visor_grain.flags = SHOW | OVERLAY; // makes it visible
        wait(-0.3); // change this to change speed
        visor_grain.flags = NULL; // makes it invisible
        wait(-0.3); // change this to change speed
    }
} 


Re: sprites [Re: the_mehmaster] #272317
06/17/09 13:06
06/17/09 13:06
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

This should work (untested)

Code:
BMAP* visor_bmp = "visor_grain_1.pcx";

PANEL* visor_grain =
{
	pos_x = 0;
	pos_y = 0;
	layer = 3;
	bmap= visor_bmp;
	flags = OVERLAY;

}

function grain_startup();
{
	while(1)
	{
		set (visor_grain, SHOW); // makes it visible
		wait(-2); //wait one second
		reset (visor_grain, SHOW); // makes it invisible
		wait(-2);
		set (visor_grain, SHOW); // makes it visible
	}
}



Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: sprites [Re: Ottawa] #272381
06/17/09 19:38
06/17/09 19:38
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
something strange, i just write the code on a other position in my script
and now works
a7 is kidding me

tnx for your help

Re: sprites [Re: GameScore] #272412
06/17/09 23:28
06/17/09 23:28
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

There is nothing strange
If you wrote the code that I posted.


You have to understand what the code is doing.
Do you have questions about the code that I posted? smile


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: sprites [Re: Ottawa] #272461
06/18/09 08:45
06/18/09 08:45
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
thx, i understand your code very well smile

now i wrote it like this and works fine to

PANEL* grain_pan_1 =
{

pos_x = 0;
pos_y = 0;
layer = 2.5;
bmap = visor_grain_1.pcx;
//flags = VISIBLE ;

}

PANEL* grain_pan_2 =
{

pos_x = 0;
pos_y = 0;
layer = 2;
bmap = visor_grain_2.pcx;
//flags = VISIBLE ;

}

PANEL* grain_pan_3 =
{

pos_x = 0;
pos_y = 0;
layer = 2.5;
bmap = visor_grain_3.pcx;
//flags = VISIBLE ;

}

PANEL* grain_pan_4 =
{

pos_x = 0;
pos_y = 0;
layer = 2;
bmap = visor_grain_4.pcx;
//flags = VISIBLE ;

}

PANEL* grain_pan_5 =
{

pos_x = 0;
pos_y = 0;
layer = 2.5;
bmap = visor_grain_5.pcx;
//flags = VISIBLE ;

}

PANEL* grain_pan_6 =
{

pos_x = 0;
pos_y = 0;
layer = 2;
bmap = visor_grain_6.pcx;
//flags = VISIBLE ;

}





//////////////////////////////////////////////////////////////////////////////////////////////////////////////


var speed=3;

function grain_startup()
{
set(grain_pan_1,TRANSLUCENT);
set(grain_pan_2,TRANSLUCENT);
set(grain_pan_3,TRANSLUCENT);
set(grain_pan_4,TRANSLUCENT);
set(grain_pan_5,TRANSLUCENT);
set(grain_pan_6,TRANSLUCENT);


while(1)
{
set (grain_pan_1, SHOW); // makes it visible
reset (grain_pan_6, SHOW);
wait(speed);
set (grain_pan_2, SHOW); // makes it invisible
reset (grain_pan_1, SHOW); // makes it visible
wait(speed);
set (grain_pan_3, SHOW);
reset (grain_pan_2, SHOW); // makes it visible
wait(speed);
set (grain_pan_4, SHOW); // makes it invisible
reset (grain_pan_3, SHOW); // makes it visible
wait(speed);
set (grain_pan_5, SHOW);
reset (grain_pan_4, SHOW); // makes it visible
wait(speed);
set (grain_pan_6, SHOW); // makes it invisible
reset (grain_pan_5, SHOW); // makes it visible
wait(speed);

wait(1);


}

}

but one thing left
the framerate goes down to
same when i use sprites before
do u know how can i do that the framerate is stable?
the reason why i use the panel is i was using a sprite before
and the sprites with a solution of 1280x1024 eats my video memory
and someone told me its better u do this with panels, if u want a animated full screen effect, but now the same problem i have with the framerate again
when i start the function the framrate will go down till 40fps

i think about a video effect, but if i use a video i do not have the same
possibility like with a panel
i mean, fade in fade put translucent, bright ect...

do u have a idea?

Re: sprites [Re: GameScore] #272535
06/18/09 13:13
06/18/09 13:13
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

I see that you have improved your code and you are getting the hang of it. smile

I wonder about the way you define the bmaps
bmap lines should be (I think)
bmap = "visor_grain_6.pcx"; //local
if you are not defining them globaly. (framerate?)
and

in PANEL* grain_pan_1 = (3 and 5)

you have layer = 2.5 (Is this realy working?)
With your code they should all be at = 2

As for frame rate
Did you read the section on "Framerate" in the manual? It's very usefull.

Quote:

Some tips for increasing the frame rate in your games




Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: sprites [Re: Ottawa] #272571
06/18/09 18:11
06/18/09 18:11
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
yeah layer 2.5 is working, my code works really
i only have the framerate problem, like with a sprite in a 1280x1024 solution

i found this with the layer 2.5 in the manual under media_layer
when i was searching stuff about media
couz i have problems to run videos
my video dont wanna run and i dont know why
its a wmv format, but maybe have some other reason why it wont run

the reason why i set the layer 2 and 2.5 is
if i set one panel invisible, the other panel must be visbible
so if the 2.5 is visible is set the layer 2 visible and 2.5 invisible, if i dont do like this
i have a blink effect in my animation, on,off,on,off

Last edited by GameScore; 06/18/09 18:25.
Re: sprites [Re: GameScore] #272632
06/19/09 02:15
06/19/09 02:15
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Getting rid of the blink is very good.

Did you try putting quotation marks around your bmaps?
Does it help the framerate?


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: sprites [Re: Ottawa] #272822
06/19/09 22:41
06/19/09 22:41
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
no it was not a soulution, to bad
but i have a new idea

i was try with a screen entity and try to change the skin
works fine and the framerate is stable
but now comes the blink again frown

the problem is, if my entity have 5 skins
and i change the skins one of the screen entity skin
is naked ( without skin ), the skin changed 6 times not 5
and i dont know why
but the framerate is stable smile

here is the code

ENTITY* test_model =
{

type = "test.mdl";
layer = 2.5;
flags2 = VISIBLE;
//flags= OVERLAY;
x = 100;
y = 0;
z = 0;
}


function grain_startup()
{
my= test_model;
set(my,TRANSLUCENT);

while(1)
{
my.skin += 0.9*time_step;
if (my.skin > ent_skins(my))
{
my.skin -= ent_skins(my);
}
wait(1);

}
}

Page 3 of 3 1 2 3

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