General questions about the limitations of GUI and new AGS version conversion

Started by Alarconte, Mon 12/09/2011 19:14:38

Previous topic - Next topic

Alarconte

Hi, I was very time out of AGs (two years), and don't know if there are relevant changes about the gui.
As I don't saw new games pushing the last capabilities of GUI use, I have some remembering questions about my limitations in the projection of my new little project.

I'm going to do a text adventure with graphics... I have simple questions about the GUI:

I remember that the gui script was a bit hard-coded... Like you can't animate buttons of the GUI by room scripts (I will need a permanent GUI with Health & hunger things, or a portrait showing positive and negative changes...) It's possible with the GUI, or is better to go representing the changing data room by room as "draw image"? Not only better... if is even possible. I know some thing is better to do in every room better rather than in the GUI (like the movement pad that I'm going to use, not the "north-east.." commands... maybe better one incluided in the room graphics with specific room translations...

Maybe I wasn't very good explaining myself, but maybe somebody of you can give a general answer, or some specific answer 'bout my questions

Lots of thanks!
"Tiny pixelated boobies are the heart and soul of Castlevania"

Galactic Battlefare Capital Choice Part 1 , finished, releasing soon
GBF CC Part 2, WIP

pcj

I'd think something like that would be better to handle in a GUI, with global functions to work with it, instead of room by room.  You should be able to modify the GUI's images with Button.NormalGraphic and/or Button.Animate.
Space Quest: Vohaul Strikes Back is now available to download!

Alarconte

I will check all the commands between guis and normal scripts, so see the capabilities... And I will start trying to use the total interface as GUI at first... but well, Let's see whats happens xD
"Tiny pixelated boobies are the heart and soul of Castlevania"

Galactic Battlefare Capital Choice Part 1 , finished, releasing soon
GBF CC Part 2, WIP

Khris

You would use global functions to update health meters and the like anyway so it doesn't really matter if you're using a GUI (recommended) or RawDraw to the room background.
There's no requirement to have function code in room scripts in your situation; what you might want to do is call room-specific code to show exits or something like that. Again, you'd ideally call a global function so one line / function call per GUI should be enough.

Alarconte

Well, If you tell It can be done, I will confide in that and check the options.

Now I'm stranded, trying to finish the old game  with the new AGS version... I even been capable of show the Start Menu, And I don't know why...

Look at the code, please.

Quote
function room_Load()
{
 aMusic5.Play();
SetSonidos();
oLeen.Transparency = 100;
gMenuinicio.Visible = false;
mouse.Visible=false;
}

function room_AfterFadeIn()
{
Wait(20);
int trans = object[0].Transparency;
while (trans > 0)
 {
 trans -= 2;
 object[0].Transparency = trans;
 Wait(1);
 }
Wait(20);
oLeen.Clickable = false;
gMenuinicio.Visible = true;
mouse.Visible = true;
}

function room_Leave()
{
gMenuinicio.Visible = false;
}

function on_key_press(int keycode)
{
if ((keycode == 27) && (gIntro.Visible == true)) gIntro.Visible = false;
if ((keycode == 27) && (gExit.Visible == true)) gExit.Visible = false;
if (keycode == 363) ClaimEvent();
if (keycode == 9) ClaimEvent();

Problems: The GUI don't show even if I remove the first Visible = false, and put the GUI to originally show always...
And the mouse too show when by script is supposed to not be shown :S
"Tiny pixelated boobies are the heart and soul of Castlevania"

Galactic Battlefare Capital Choice Part 1 , finished, releasing soon
GBF CC Part 2, WIP

pcj

Well, you have mouse.Visible = true; in room_AfterFadeIn() so that might be why the mouse is showing...

You are asking about gMenuinicio, right?  What is the visibility setting in its options pane set to (e.g., "Normal, initially off")?
Space Quest: Vohaul Strikes Back is now available to download!

Alarconte

#6
Weel, I see that the mouse is ok.

At first, the Gui visibility was, "normal, initially off". I changed to "normal, initially on". and "Always". It never displays...

In the same way I get another visibility error with inventory in the conversion from 3.0... to 3.2.1; the items in inventory are invisible. Maybe are only a thing of Zorder... But I will check it later.

Maybe the sprites can be deconfigurated his transparents colors of something?

but .. the strange thing is that is not "on" and "invisible", Cause if I Left-Click where it has to be, don't work. BUT If I Right-click (not something that has to happen, never happened), It's seems like the right click activate the start button.... It's a complete mess, I don't know what is happening :S

EDIT: Finally, yes, the GUI is On... but is Invisible... And I don't know why. In the gui description the transparency is 0, and by script is visible :S And I don't know why, still invisible, it works with right-click but not with left click... :S
"Tiny pixelated boobies are the heart and soul of Castlevania"

Galactic Battlefare Capital Choice Part 1 , finished, releasing soon
GBF CC Part 2, WIP

pcj

Yeah, GUI visibility has different effects depending on what "popup style" is set in the options - see the Help file for GUI.Visible for more info.

Z-order should only affect the GUI with regards to other GUI (i.e. it's hiding behind another GUI).

The other things to check would be the GUI's transparency (set similarly to object transparency), the size of the GUI window itself, and the X/Y position of the GUI.  Depending on how the transparent color is set on the GUI's background image sprite, that may also play a role.
Space Quest: Vohaul Strikes Back is now available to download!

Alarconte

I was checking the entire game... for an odd reason, maybe 5% of the GUIs aren't visible, when before the AGS version conversion they were. Also, the music stops randomly, (usually after skipping text with the mouse). Also seems that my Auto-savegame system have been disabled. I'm gonna have to check it deeply to make it work 100% again... And the problem is that I don't know the cause of some GUIs being invisible... At first, second and third glance, xD, I don't see the reason ... :S
"Tiny pixelated boobies are the heart and soul of Castlevania"

Galactic Battlefare Capital Choice Part 1 , finished, releasing soon
GBF CC Part 2, WIP

Khris

Maybe it has something to do with the coordinates?
Are the GUIs that disappeared supposed to be near the bottom of the screen or at the right edge?

Alarconte

Well, they where invisible, but I don't know why there were clickable with rigth button and not left button.

Now is SOLVED!

A thing of the AGS version conversion I think... I just only Replaced the invisible sprites with themselves again... and now works :S

I will check the other problems... so see what is happening.. But at last seems that I'm gonna finally publish the game!
"Tiny pixelated boobies are the heart and soul of Castlevania"

Galactic Battlefare Capital Choice Part 1 , finished, releasing soon
GBF CC Part 2, WIP

SMF spam blocked by CleanTalk