Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - subspark

#341
I'm not sure how long Hq3x has been in the AGS DirectDraw5 rendering system but I beleive it and other perhaps more sophistocated scaling algorithms are due to make their way into the DirectX9 rendering mode.

Such filters as:


Cheers,
Sparky.
#342
Yeah but I don't want the controls to grey out. I've actually got a separate GUI that pops in underneath the active GUI that fades 30% black over the underlying elements.

Using something.clickable = false; doesn't seem to work with my sound scripts in repeatedly execute. The mouse_down & 'mouse_up' sounds still play and is rather annoying. This is what called for my elaborate workaround.

However as you said, my suggestion seems reasonable enough and it would eliminate these problems while conforming to and extending the excellent AGS scripting standard.

Sparky.
#343
That or sektor13's infinity string!

Sparky
#344
Well back on Unreal Engine 3, what we would do is design multiple GUIs for every resolution we wanted to support. I would work in photoshop at the very highest 16:10 resolution (2560x1600) and scale backward sharpening by 50% in each increment. The engine would allows for resolution to be changed in-game or set beforehand and the nessecary GUI layout would load. This is how many engines handle this but AGS may not necessarily be the best candidate for this neither the worst. I would imagine we'd have to rethink much of AGS.

Allow me to share some of my ideas on how AGS 'might' handle dynamic resolutions that can be changed during gameplay.
First and foremost a new resolution manager could be invented in which say 6 custom resolutions can be input that the gui & room editor have access to from a drop listbox. Also updating the GUI editor to handle the 'play area' might be neccessary. You would define a play area rect in the GUI editor much like the inventory rect.

In the gui/room editor, by cycling through the six different resolutions, AGS would load/unload a different set of variables and sprites per resolution setting.
Handling all this data internally may or may not be the best way to go. I'm no programmer or system designer but I can take a good guess.

Anyway I hope this discussion continues. (Perhaps in a seperate "radical ideas and design" thread)
I'd like to see dynamic "custom" resolution support in the near future and I'm sure some of you would too. :)

Cheers,
Sparky.
#345
Its a marvellous movement towards crossplatforming ags. Spectacular plugin, denzil! Youll make clarvalon really happy with that!

Cheers,
Sparky
#346
QuoteI wouldn't rely on me though, as I'm not very self-motivated...
Lol... That's not supposed to be a good thing. :)
#347
Strongly agreed!

Cheers,
Sparky
#348
Most appreciated Chris. I'll probably name mine "Config.exe" as opposed to anything else. :)

Cheers,
Sparky.
#349
It certainly would be ideal to be able to set names for both the game and setup exe from game settings in the editor itself. So i am inclined to agree.
#350
I've been meaning to ask this for a while, CJ, and since you just updated winsetup I'll ask it now:
Please can "winsetup.exe" be compiled as "Setup.exe". "winsetup" is so 90's and call me particular but I really grow tired of renaming it manually every few compiles or so.  Setup.exe is much more generic.

Even the old Mac OSX Version of AGS compiles as winsetup. Mismatch much? :P

Cheers,
Sparky.
#351
You beauty Chris!  8)
#352
In a similar fashion, if the game is run in windowed mode, it would be good if AGS could return "window focus lost" so that a GUI (game paused?) could pop up. Also Sierra/LucasArts
#353
QuoteYou can effectively turn off a visible GUI by setting it's .Clickable property to false.
Unfortunately not that simple. When a GUI.Clickable is set to false, the mouse over hilight functions still work on the buttons.
Before I posted this thread, I elaborately worked around this problem by writing the following code:


Global Script:
Code: ags

//=============
// DECLARATIONS
//=============

bool FreezeMainMenu;
export FreezeMainMenu;

//============================
// FREEZE MAIN MENU CONDITIONS
//============================
  
  if (FreezeMainMenu == true) {
    bNewGame.Clickable = false;
    bNewGame.MouseOverGraphic = 394;
    bLoadGame.Clickable = false;
    bLoadGame.MouseOverGraphic = 397;
    bMainOptions.Clickable = false;
    bMainOptions.MouseOverGraphic = 395;
    bCredits.Clickable = false;
    bCredits.MouseOverGraphic = 393;
    bQuit.Clickable = false;
    bQuit.MouseOverGraphic = 396;
  }
  else {
    bNewGame.Clickable = true;
    bNewGame.MouseOverGraphic = 399;
    bLoadGame.Clickable = true;
    bLoadGame.MouseOverGraphic = 402;
    bMainOptions.Clickable = true;
    bMainOptions.MouseOverGraphic = 400;
    bCredits.Clickable = true;
    bCredits.MouseOverGraphic = 398;
    bQuit.Clickable = true;
    bQuit.MouseOverGraphic = 401;
  }


Global Script Header
Code: ags
import bool FreezeMainMenu;


None of this code would be necessary if GUI.Enabled was implemented. Thanks for the general help though Khris. My code could be optimized with your example.

Cheers,
Sparky.
#354
While a certain GUI is onscreen (Yes/No Popup), it would be handy to disable other GUIs behind along with all of their controls at once without having to disable the buttons separately, each.

For example:

Code: ags
if (gAskFirst.Visible == true) {
gOptions.Enabled = false; // Disables all clicking in this GUI but does not pass the mouse clicks through it.
}


Cheers,
Sparky.
#355
Hey guys,

I'm creating a static bool that disables the save buttons in two GUIs but I'm having difficulty with the syntax.

Heres my code:

Code: ags
// top of global script
static bool Game.LockSave;

function repeatedly_execute_always ( )
{
  if (Game.LockSave == true) {
    bMainSave.NormalGraphic = 361;
    bMainSave.Enabled = false;
    bSave.NormalGraphic = 363;
    bSave.Enabled = false;
  }
  else {
    bMainSave.NormalGraphic = 873;
    bMainSave.Enabled = true;
    bSave.NormalGraphic = 333;
    bSave.Enabled = true;
  }
}


I keep getting the typical error: Variable 'Game' is already defined. Am I not allowed to write my own 'Game.' function or something?

Cheers,
Sparky.
#356
Most appreciated Khris. Thanks for the kickstart here.
Thumbs up!

Sparky.
#357
LOL. For those that were helpful, thanks for explaining the function correctly.
I didn't realize QuitGame(askintfirst) used the default standard AGS dialog box. I thought I had changed it already.
Turns out that most people seem to be adding their own checks and balances here. So problem solved
Thanks again guys.

Cheers,
Sparky.
#358
The "buttons with sounds" come from all of my GUIs.

So like this?

Code: ags
function repeatedly_execute ( )
{
  Button* ButtonsWithSounds = bMainCancel;
  Button* bMainSave = ButtonsWithSounds;
  Button* bMainLoad = ButtonsWithSounds;
  Button* bMainLoad = ButtonsWithSounds;
  Button* bMainRestart = ButtonsWithSounds;
  Button* bMainQuit = ButtonsWithSounds;
  Button* bModalYes = ButtonsWithSounds;
  Button* bModalNo = ButtonsWithSounds;
  Button* bNewGame = ButtonsWithSounds;
  Button* bLoadGame = ButtonsWithSounds;
  Button* bOptions = ButtonsWithSounds;
  Button* bCredits = ButtonsWithSounds;
  Button* bQuit = ButtonsWithSounds;
  Button* bLoadGameCancel = ButtonsWithSounds;
  Button* bLoadGameLoad = ButtonsWithSounds;
  Button* bSaveGameCancel = ButtonsWithSounds;
  Button* bSaveGameSave = ButtonsWithSounds;
  Button* bCombatHelpOk = ButtonsWithSounds;

  if (mouse.IsButtonDown(eMouseLeft) && Button.GetAtScreenXY(mouse.x, mouse.y)=="ButtonsWithSounds") {
    aClickDown.Play(eAudioPriorityVeryLow, eOnce);
  }
  else if (mouse.IsButtonReleased(eMouseLeft) && Button.GetAtScreenXY(mouse.x, mouse.y)=="ButtonsWithSounds") {
    aClickUp.Play(eAudioPriorityVeryLow, eOnce);
  }
}


Also, how would I check if the mouse button has just been released from a down state on one of these sound enabled buttons?
(mouse.IsButtonReleased) is not really an actual function obviously.

Cheers,
Sparky.
#359
I tried to create an array of certain Buttons to call them by just one name, "ButtonsWithSounds" like this:

Code: ags

function repeatedly_execute ( )
{
  String ButtonsWithSounds = bMainCancel;
  String bMainSave = ButtonsWithSounds;
  String bMainLoad = ButtonsWithSounds;
  String bMainLoad = ButtonsWithSounds;
  String bMainRestart = ButtonsWithSounds;
  String bMainQuit = ButtonsWithSounds;
  String bModalYes = ButtonsWithSounds;
  String bModalNo = ButtonsWithSounds;
  String bNewGame = ButtonsWithSounds;
  String bLoadGame = ButtonsWithSounds;
  String bOptions = ButtonsWithSounds;
  String bCredits = ButtonsWithSounds;
  String bQuit = ButtonsWithSounds;
  String bLoadGameCancel = ButtonsWithSounds;
  String bLoadGameLoad = ButtonsWithSounds;
  String bSaveGameCancel = ButtonsWithSounds;
  String bSaveGameSave = ButtonsWithSounds;
  String bCombatHelpOk = ButtonsWithSounds;

  if (mouse.IsButtonDown(eMouseLeft) && Button.GetAtScreenXY(mouse.x, mouse.y)=="ButtonsWithSounds") {
    aClickDown.Play(eAudioPriorityVeryLow, eOnce);
  }
  else if (mouse.IsButtonReleased(eMouseLeft) && Button.GetAtScreenXY(mouse.x, mouse.y)=="ButtonsWithSounds") {
    aClickUp.Play(eAudioPriorityVeryLow, eOnce);
  }
}


Basically I want a sound to play when a GUI button is clicked down, and another sound for when that button is released.
Is there some neater way to do this?

Cheers,
Sparky.

#360
As the subject suggests, I think a built-in confirmation for RestartGame(); would be consistent with the QuitGame(); function.
Low priority naturally CJ, but it couldn't be too hard to implement. To much my own excitement, baby updates like this keep AGS rolling strong and I hope this is a fair request. :=

Cheers,
Sparky.
SMF spam blocked by CleanTalk