Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (degenerate_762), 1,098 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Please help me I am dumb I guess #307704
01/31/10 02:44
01/31/10 02:44
Joined: Jan 2010
Posts: 13
USA
The_Unknown_Game Offline OP
Newbie
The_Unknown_Game  Offline OP
Newbie

Joined: Jan 2010
Posts: 13
USA
okay so I am guessing I'm dumb cause I can't figure out how to make the black in a window transparent to show the layer 1 which the window is on layer 2 is there a way to do it if so can some one show me a code snip or explain really well to me

and thank you in advance for your help


USE FOR GAME DEV.
GameStudio A7 7.82.3 pro
3D Max 9 for Modeler
Adobe PhotoShop CS4 for art
Brain for thinking
Win XP ser 2 pent 4 3000 mhz 1 GB Ram ATI Radeon 9600 256 mb
Re: Please help me I am dumb I guess [Re: The_Unknown_Game] #307706
01/31/10 03:07
01/31/10 03:07
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
flags = OVERLAY;
That is for Panels. The Engine Window, you don`t can set the black transparent.

Re: Please help me I am dumb I guess [Re: Widi] #307707
01/31/10 03:16
01/31/10 03:16
Joined: Jan 2010
Posts: 13
USA
The_Unknown_Game Offline OP
Newbie
The_Unknown_Game  Offline OP
Newbie

Joined: Jan 2010
Posts: 13
USA
ok i was just trying to make my scrolling image with the black be transparent in my little window on my game screen but i guess i cant so no i have to decide on a new method and rewrite a lot of my code oh boy but thank you tho i guess this engine can't do everything lol oh well I'm going to have to look for a new one cause if it can't do something like that its not worth it i guess


USE FOR GAME DEV.
GameStudio A7 7.82.3 pro
3D Max 9 for Modeler
Adobe PhotoShop CS4 for art
Brain for thinking
Win XP ser 2 pent 4 3000 mhz 1 GB Ram ATI Radeon 9600 256 mb
Re: Please help me I am dumb I guess [Re: The_Unknown_Game] #307713
01/31/10 04:24
01/31/10 04:24
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Umm, you can set the black parts of your panels to be transparent. Like Widi said, just write "flags = OVERLAY;" into your panel definition.

EDIT: For future reference, The_Unknown_Game: before you ask simple questions like this, look for answers in the User's Manual. If your copy of Gamestudio didn't come with a manual (for whatever reason), just use the online manual, which can be found on the side bar in this forum. Thank you.

Last edited by Redeemer; 01/31/10 04:28.

Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Please help me I am dumb I guess [Re: Redeemer] #307719
01/31/10 08:23
01/31/10 08:23
Joined: Jan 2010
Posts: 13
USA
The_Unknown_Game Offline OP
Newbie
The_Unknown_Game  Offline OP
Newbie

Joined: Jan 2010
Posts: 13
USA
okay let me try to explain this in easier terms where you all might under stand ok like the window not a panel like the window in the lite-c workshops #5 example #2 the one with the altitude is the a way to make that black transparent and if you say to do flags = OVERLAY | SHOW; then don't bother answering me cause then u don't know what i am talking about and need to do that workshop your self to understand what i mean by a window on the game screen but if you do know what i am talking about then great and you know how to make the bitmap black transparent the that is even better and here is some of my code to explain what i am trying to do

Code:
PANEL* sample_pan =
{
	layer = 2;
// THIS IS A WINDOW BELOW I NEED TO MAKE TRANSPARENT WITH BLACK RGB 0,0,0
	window (0, 500, 800, 50, "select.png", 0, select);
	flags = OVERLAY | SHOW; // OVERLAY DOESN'T MAKE THE BLACK IN THE WINDOW TRANSPARENT
}




ok there maybe that will help you guys understand now if it was a normal panel then yes " flags = OVERLAY | SHOW; " would work but not for the window that is why i need help

Re: Please help me I am dumb I guess [Re: The_Unknown_Game] #307777
01/31/10 14:55
01/31/10 14:55
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

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


You have created a window in your panel.

Now you have to put something larger that the window behind it
and write the code to move this bitmap

Look at the compass example.


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: Please help me I am dumb I guess [Re: Ottawa] #307783
01/31/10 14:59
01/31/10 14:59
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Use for the window a Bitmap with a alpha cannel (*.tga), and change the black into a color with alpha = 0.

Re: Please help me I am dumb I guess [Re: Widi] #307806
01/31/10 16:20
01/31/10 16:20
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

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

Here's a code snip.
You will have to draw a bitmap with your Draw program to make it work.
Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>

///////////////////////////////
////////////////////// ---- my folders 
#define PRAGMA_PATH "..\\Models";
#define PRAGMA_PATH "..\\des_tga";
#define PRAGMA_PATH "..\\des_pcx";
#define PRAGMA_PATH "..\\panels";

//

// Global variables

BMAP* clr_strip = "yourbmap.pcx"; // make a bitmap that's 596x76 
var compass_x = 0; // horizontal 
var compass_y = 0; // vertical 

// Panels

PANEL* SANTE = {
	// bitmap clr_strip is 596x76
	// the window must be smaller than the bitmap clr_strip
	// The visible part is  180 x 60
	// the function show_panel modifies the values of compass_x or _y : this creates the movement
	//
	// 
	pos_x = 100;
	pos_y = 375;
	layer = 2;
	window (15,14,180,60,clr_strip,compass_x,compass_y); 
	digits (-60,-10, "compass_x = %.0f",*,1, compass_x); // to follow the values ... to be removed after testing
	flags = SHOW; //| OVERLAY not needed here
}

// functions

function show_panel ()
{
	var up = 0;
	var down = 100;
	compass_x = 0;
	// move the bmap from left to right.....
	while (1)
	{
		if (compass_x >= 100)
		{
			down = 100;
			// up becomes down 
			while (down != 0)
			{
				compass_x -= 5 ;
				down -= 1;
				wait (1)  	;
			}
		}
		if (compass_x <= 0)
		{
			up = 0 ;	
			// down becomes up
			while (up <= 99)
			{
				compass_x += 5 ;
				up  += 1;
				wait (1)  	;
			}
		}
		wait (1)	;
	}
}
//--------------------------- 

function main()
{
  vec_set(screen_size,vector(800,600,0));
  vec_set(screen_color,vector(50,1,1)); // dark blue
  vec_set(sky_color,vector(50,1,1)); // dark blue

  video_window(NULL,NULL,0,"My New Game");
  
  level_load("");

	show_panel ();
}




Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: Please help me I am dumb I guess [Re: Widi] #307908
01/31/10 20:08
01/31/10 20:08
Joined: Jan 2010
Posts: 13
USA
The_Unknown_Game Offline OP
Newbie
The_Unknown_Game  Offline OP
Newbie

Joined: Jan 2010
Posts: 13
USA
ok so i tried to set the alpha to 0 but i get an error can anyone show me how to set the alpha to 0 just a little code snip or really good explain would help thank you


USE FOR GAME DEV.
GameStudio A7 7.82.3 pro
3D Max 9 for Modeler
Adobe PhotoShop CS4 for art
Brain for thinking
Win XP ser 2 pent 4 3000 mhz 1 GB Ram ATI Radeon 9600 256 mb
Re: Please help me I am dumb I guess [Re: The_Unknown_Game] #307911
01/31/10 20:19
01/31/10 20:19
Joined: Mar 2009
Posts: 112
Germany
K
KDuke Offline
Member
KDuke  Offline
Member
K

Joined: Mar 2009
Posts: 112
Germany
Thats not made with a code snippet. You do it in an image manipulation program like GIMP or Photoshop. Just add an alpha channel to the image and use the eraser to remove everything you want to have transparent.


Using A7 Free
Click and join the 3dgs irc community!
Room: #3dgs
Page 1 of 2 1 2

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

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