Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Ayumi, AndrewAMD), 833 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
simple prob #408858
10/08/12 17:03
10/08/12 17:03
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
hi all
The problem I have is simple
wanted to know how I could do to turn the camera, the screen is dark until you load the level and subsequently encederla

Re: simple prob [Re: GaniX] #408860
10/08/12 17:27
10/08/12 17:27
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
i don't understand your problem
can you explain it further?


Visit my site: www.masterq32.de
Re: simple prob [Re: MasterQ32] #408869
10/08/12 18:14
10/08/12 18:14
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
ok. my problem: i wanna know how to turn off the camera when i load a new lvl. then (when the lvl is already charge) i wanna put the camera work again

Re: simple prob [Re: GaniX] #408870
10/08/12 18:21
10/08/12 18:21
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
the camera gets reset if you load a new level
so you have to setup the position and angles again

Quote:
i wanna know how to turn off the camera

how do you load your level?
this should be done in one frame, so you won't notice it


Visit my site: www.masterq32.de
Re: simple prob [Re: MasterQ32] #408873
10/08/12 18:47
10/08/12 18:47
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Do you mean, that the screen should fade to black, then you load a level and then everything becomes visible again?


POTATO-MAN saves the day! - Random
Re: simple prob [Re: MasterQ32] #408874
10/08/12 18:49
10/08/12 18:49
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
reset(camera,SHOW);
set(camera,SHOW);
??

Re: simple prob [Re: Widi] #408875
10/08/12 18:54
10/08/12 18:54
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
kartoffel : yes that the screen should fade to black, then you load a level and then everything becomes visible again

Re: simple prob [Re: GaniX] #408876
10/08/12 18:54
10/08/12 18:54
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 993
Budapest
I would create a big black image and show it on a panel.
Alternatively you can set the sun light to zero. And switch off every other lightsources.

Last edited by Aku_Aku; 10/08/12 18:55.
Re: simple prob [Re: Aku_Aku] #408877
10/08/12 19:39
10/08/12 19:39
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Maybe this function might also be of help to you:

level_loadsplash (STRING* filename,STRING* bmapname,var mode)

see the documentation here:
http://www.conitec.net/beta/level_c.htm


Always learn from history, to be sure you make the same mistakes again...
Re: simple prob [Re: Aku_Aku] #408880
10/08/12 19:57
10/08/12 19:57
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
here's a simple function as example:
Code:
void load_level_fade_black(STRING* _levelname)
{
	PANEL* TempPan = pan_create("alpha = 0; flags = SHOW | TRANSLUCENT", 1000); // Create a new temp-panel
	BMAP* BmapBlack = bmap_createblack(8, 8, 24); // create an 8x8 black texture
	
	TempPan.bmap = BmapBlack;
	TempPan.size_x = screen_size.x; // set x and y size of the panel to the game-resolution
	TempPan.size_y = screen_size.y;
	
	var p = 0; // percent (1 - 100)
	var Speed = 1.5; // fade-speed per frame
	
	while(p < 100) // fade in
	{
		p += Speed;
		TempPan.alpha = p;
		wait(1);
	}
	
	TempPan.alpha = 100;
	
	level_load(_levelname); // screen is black, load the level now
	
	p = 100;
	while(p > 0) // now the same just backwards
	{
		p -= Speed;
		TempPan.alpha = p;
		wait(1);
	}
	
	TempPan.alpha = 0;
	
	ptr_remove(TempPan);
	ptr_remove(BmapBlack);
}


if you usually use level_load("level.wmb"); you can now use:
load_level_fade_black("level.wmb");
instead - which will do exactly the same, just with fading the screen black before loading the level.

I simply create a panel and assign a black texture to it with the size 8x8.
(2^x textures wich are greater or equal 8x8 px will be repeated seamlessly if the panels' size_x and _y are bigger)
Then I set size_x and _y to the applications' resolution so the complete screen gets covered.

After that I use a simple linear fade-in to show the panel, load the level and then blend it out again.

Last edited by Kartoffel; 10/08/12 19:58.

POTATO-MAN saves the day! - Random

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