Technical Questions From Me :)

Started by Knox, Wed 03/06/2009 15:26:08

Previous topic - Next topic

Knox

Hi,

I can get transparency to work when there are zones 100% transparent. I either use the PNG or I use a bitmap with a pink color to punch through...however, when I want to make an area semi-transparent, it doesnt work.

When I load the PNG with semi-transparency, the preview shows its semi-transparent, however, when I start the game, its just opaque. I then made an alpha channel and saved as a TGA file, but when I come to import the tga file, it doesnt seem to be supported (doesnt show up in the options to import)...even though while browsing the forums Ive seen people mention they use TGA.

Its in 32-bit true color and the sprite Im trying to get semi-transparency to work is a dialog portrait set to Sierra with Background.

Thanks!
--All that is necessary for evil to triumph is for good men to do nothing.

Knox

By the way, if its a character sprite, the semi-transparency works super fine...its ONLY when I try to do it for a speech portrait where the semi-transparency doesnt work.
--All that is necessary for evil to triumph is for good men to do nothing.

Trent R

A couple notes:

-If it's semi-transparent (i. has a alpha channel) it will ask you when you import.
-I don't think speech portraits (sierra style) allow transparency. A way to test this is to use one of its sprites somewhere else that does support transparency (object, character, etc).
-TGA's are no longer supported, from 3.0 when CJ switched the importing routines.
Quote from: Pumaman on Mon 02/03/2009 19:20:11
There was a change in supported file formats between 2.72 and 3.0, at which point PCX and TGA were lost, and JPG and TIF were added instead. This was as a result of AGS switching from custom file import code to using the standard Windows file import routines.
-You can edit your posts instead of double posting. :)


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Knox

I never thought of that (editing instead of double-posting). Thanks for that advice!

Ok, I think you are right on the sierra style portraits not allowing semi-transparency...it allows simple transparency, but not semi...oh well, maybe in a new release!

Ok, so long TGA's!

Im currently reading and doing the scripting tutorials, Im starting to get the hang of it (very slowly).

:)
--All that is necessary for evil to triumph is for good men to do nothing.

Trent R

#4
Well, there's other ways to display dialog so that you can use the Semi-transparency. Check out some modules, or even check out the manual entries on custom dialog rendering (somewhat-advanced scripting, so you may want to wait a bit).

[Edit]: Off the top of my head, some modules you might check out are: CustomDialogGui, KADS-Kick Ass Dialog System, GuiPortrait.

I haven't used these modules, just read through the threads once upon a time. But with some modification I think either of them can do what you need.


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Knox

Ive got the CustomDialogGui (which is absolutely awesome btw!), and I just downloaded the GuiPortrait. KADS link is broken though...doh!

Ive got some really good news yesterday for legal issues/permissions, etc...but I wont reveal that until I have more info.

Anyways, thanks again Trent...I appreciate all your help.

:)
--All that is necessary for evil to triumph is for good men to do nothing.

abstauber

Unfortunately custom dialog rendering (as used in CDG) doesn't support semi-transparency too, so we just have to wait until CJ decides to put it in.

btw. I'm glad you like that module :)

Knox

Yah, its cool...so sweet.

One more thing, not wanting to start yet another thread..is about widescreen resolution. I read those threads about how the maximum res is 1024 x 768...however, when I go into fullscreen mode with a widescreen...it gets stretched vertically...which is pretty ugly!

Is there a way to make the fullscreen mode have a blackbar at the bottom and/or top so the aspect ration is maintained?

--All that is necessary for evil to triumph is for good men to do nothing.

Matti

Quote from: general_knox on Mon 08/06/2009 23:28:01
Is there a way to make the fullscreen mode have a blackbar at the bottom and/or top so the aspect ration is maintained?

... I guess you mean you mean a bar on both sides of the screen instead of the top/bottom  ;)

Well, I don't think so but if there is, I'd be more than interested since I have the exact same annoying problem with my laptop.

Knox

Heh, yeah, on the side :P

Its annoying, eh?

Hopefully something will be added to fix this in the next release of AGS!

--All that is necessary for evil to triumph is for good men to do nothing.

Matti

Well, it would be nice to have a feature like this implemented in AGS but really don't understand why such a feature isn't supplied by windows.... I have the problem with other games too. I would like to see those bars whenever I play something in fullscreen...

Knox

Ive got a minor problem...I have my own custom gui for Quit...but when I call it up from the icon bar, the cursor doesnt go to the pointer cursor...its the walk cursor...It does work however if I call the quit from the PanelGui.

How do we change it so it uses the pointer cursor when we call Quit from the icon bar? I tried enabling the pointer mode, and disabling the other modes...but it doesnt work...the walk cursor (or any currently used cursor) stays there.

{
  mouse.EnableMode(eModePointer);
  mouse.DisableMode(eModeInteract);
  mouse.DisableMode(eModeLookat);
  mouse.DisableMode(eModeTalkto);
  mouse.DisableMode(eModeWalkto);
  gQuitgui.Visible = true;
  gIconbar.Visible = false;
  gPanel.Visible = false;
}

**this does work however from the panel gui (weird!)
--All that is necessary for evil to triumph is for good men to do nothing.

Trent R

mouse.Mode=eModePointer;


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

GuyAwesome

I'd guess the Iconbar GUI just turns the Quit GUI on, while the Panel GUI has an extra line like what Trent suggested. Check the button functions in the Global script to be sure.

And the widescreen 'stretching' thing, I'm pretty sure Mr Matti's right and it's a general video card/monitor/Windows thing so it might not be fixable by AGS alone.

Knox

#14
Hey Trent (and GuyAwesome), this works!

I now have it setup like I need it to be!

:)

Merci beaucoup!!

Edit: I decided to edit the main title to include any general technical questions I might have...I really dont want to create a gazillion topics!

Ok, I have a new question: When I have an item in the inventory, I was wondering if it were possible to select a region as a hotpost instead of a small crosshair hotpost.

Right now, when I click on the "look icon", you have to click on a specific location on the inventory item's pic, if not, my display message doesnt appear.

I know that for a cursor there are hotspots you assign, and you have the option of turning pixel-perfect detection on or off...but it seems that for an object in an inventory...you cant select a full region of the sprite to be a "look at" hotspot.

How would one go about making this possible?

I looked at the functions for iventory but could seem to find anything useful.
--All that is necessary for evil to triumph is for good men to do nothing.

Khris

I find that even with Pixel-perfect click detection being enabled, I can select an inventory item just fine by clicking anywhere inside it's grid box, even a transparent part of the sprite.
Something must be wrong with either the InvWindow's item dimensions or with the mouse cursor's hotspot, I guess.

Knox

#16
You're right. I rechecked the "item dimensions" you mentionned and it was the default size...way too small for my inv sprite!

Thanks ;D

Ive checked the forums here and couldnt seem to find anything on how to animate how a gui "opens". Right now when I call on a custom gui, it just appears...but what if I would like it to slowly appear, or slowly zoom in, or act like a page from a book, etc...

Al Emmo has this kind of feature...when you move your mouse cursor up and to the right, a gui page "unfolds", animated...pretty cool.

What would you suggest I lookup in the wiki to find out how to make this possible? I tried different combinations without success (animated Gui, animate a custom gui, etc...)

!
--All that is necessary for evil to triumph is for good men to do nothing.

Khris

In the Technical forum, Edmundito posted this a few days ago: Tween Module.

Anyway, what's the problem? Fading in a GUI by gradually changing the transparency is trivial.
So is "animating" using a second GUI with a huge button, animating it, then turning it off and the actual GUI on.

Sorry to ask, but do you contemplate this stuff at least for a minute before you ask here?

Knox

Hmm...I dont think there is any need to be rude, KhrisMUC. Not everyone has had the experience in scripting, etc...how would you feel if you had an artistic question and I responded in the same fashion?

You don't have to answer any of my questions if you dont feel like it. Its kind of hurtful to get responses like you just left, Im really trying hard to learn this stuff. Yes, I am "contemplating for more than a minute".  :'(

I dont understand how some people can react this way (?)
--All that is necessary for evil to triumph is for good men to do nothing.

Akatosh

Yeah, the AGS forums as a whole can be sort of... short-fused when it comes to questions that could be easily solved by flipping through the manual a little, or doing a forum search. I'm fairly certain it wasn't meant as a personal insult, though - Khris always does that.  :=

Still, he sort of has a point- with a bit of research, the answers are fairly obvious. For example, the manual directly tells you how to fade out a GUI (in the article "Transparency property (GUI)", no less) - reversing that to make it a fade-in shouldn't be too hard.

And don't worry - practice makes perfect, as they say, and when it comes to scripting, they're certainly correct.

SMF spam blocked by CleanTalk