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 - Gal Shemesh

#1
And for anyone who wish to have an out-of-the-box module, I've just made and shared it here.
Several things were fixed in it and there's no need for global variables anymore. Just download, import and use. :)
#2
About
This module basically pauses the game upon call, takes a screenshot, and then draws that screenshot onto the screen as an overlay, with a nice touch of fade animation.

You enter the grayscale pause using the grayscale.FadeIn() function. Then you can show other elements on screen such as GUIs or close-up graphics for the player to interact with. When you're done, you exit from it using the grayscale.FadeOut() function, which fades back to full color and unpause the game.

This is the first module that I've created in AGS and I'm happily sharing it so everyone could enjoy and use it.

This module couldn't be done without the help of @Nahuel and @Crimson Wizard who assisted and directed me in the right way to making it work - thanks guys! I've credited you both in the module.

The idea behind making this module was to reproduce the same effect that exist in an old adventure game that I'm currently re-reproducing with captions, called "The Riddle of Master Lu" - in that game, when you opened GUIs during gameplay or examined inventory items which showed a close-up graphic of them, the entire screen went grayscale so the player won't be distracted by the surrounding but only by the specific GUI or close-up  graphic that was opened.

Attached an example how this module looks like in my reproduction game:


You may download the module from my personal dropbox.

Module was updated with the MIT license agreement as suggested in the forum guidelines. It is free for non-commercial AND commercial use - only request is to please credit authors if used.

Enjoy! :)


Changelog
=========
Version: 1.2.0
Released: 20th Septembre 2023
Notes: Added Original User GUI Hidden and Visible again during FadeIn/Out

Version: 1.1.0
Released: 20th Septembre 2023
Notes: Added TweenModule compatibility & Licence to header. by Nahuel

Version: 1.0.1
Released: 19th Septembre 2023
Notes: Added license. by Gal Shemesh.

Version: 1.0.0
Released: 19h Septembre 2023
Notes: Initial release. by Gal Shemesh
#3
Ok, it's done! 8-) making another comment instead of editing my previous one so anyone who gets here who's interested in this thing will be able to see the progress and differences.

With @Nahuel's great code above, I learned about the DynamicSprite type which I wasn't familiar with before, and the ability to draw it onto the screen and make 'tint' adjustments to it. Though, it affects the room's background separately and objects and characters separately - in some cases some will prefer / need this to work this way, especially when for example you wish to make a playable scene while changing the color tint.

However, in my scenario I actually wanted to 'freeze' the entire screen with everything that is currenly showing on it, to make it grayscale and to show GUIs / close-up inventory items sprites onto it. So I tried using a 'screenshot' method instead. But when passing a screenshot of the room into the global variable and drawing it on the screen using 'DrawingSurface* ds.DrawImage' the screenshot was actually dawn behind all objects and characters. So with the help of @Crimson Wizard who helped me on Discord to tune the code for drawing the screenshot using an 'overlay' instead, the magic finally happens!

I can't thank you enough you guys. Thank you so much for your kind and professional help! ;-D

Here's an animation GIF demonstating the final thing. I'm also using a custom inventory interaction (override built-in inventory window click handling is set to TRUE) so I show there how it works; on this bit I also wish to thank @Khris for the help to other member in this thread that I also learned from.

I'm attaching the grayscale effect code below for anyone who's interested (or if I ever forget  (laugh)):



The code - I made a dedicated script for holding this code which serves as a 'module', for separating it from the Global Script. I called the script "Grayscale Fade" and the following code is in its header:
Code: ags
// gUI is the GUI that holds the actions and inventory. I don't want it in the screenshot so I turn it off before taking it
// screenToGrayscale is a DynamicSprite* type global variable
// screenOverlay is an Overlay* type global variable

void grayscaleFadeIn()
{
  gUI.Visible = false; // hide the UI before taking the screenshot
  mouse.Visible = false; // hide the mouse cursor before taking the screenshot
  Wait(1); // allow enough time for the GUI and mouse to get hidden, or else they will be integrated into the screenshot
  PauseGame(); // pause the game before taking the screenshot
  screenToGrayscale = DynamicSprite.CreateFromScreenShot(); // save a DynamicSprite type screenshot of the screen into the 'screenToGrayscale' variable for making into grayscale
  screenToGrayscale.Tint(190, 190, 190, 100, 100); // set the grayscale level on the screenshot in 'screenToGrayscale'
  screenOverlay = Overlay.CreateGraphical(0, 0, screenToGrayscale.Graphic); // passing the screenshot from 'screenToGrayscale' into global overlay object type variable 'screenOverlay' for drawing it on the screen (on top everything)
  mouse.Visible = true; // un-hide mouse cursor
  int screenshot = 100; // set the initial transparancy value for the screenshot in a local variable named 'screenshot' (100 = fully transparent)
  while (screenshot > 0) // a 'while' loop for making the transition effect - checks if the 'screenshot' local variable's value is greater than 0 (not opaque / semi-transparent)
  {
    screenshot = screenshot - 5; // subtract transparancy increment from the local variable towards transparancy
    screenOverlay.Transparency = screenshot; // set the transparancy value of the overlay object type as the local variable's 'screenshot' current value
    Wait(2); // a short wait to see the result on screen before the 'while' loop repeats itself
  }
}

// call this void when willing to exit from the current grayscale pause and return to the game
void grayscaleFadeOut()
{
  int screenshot = 0;  // set the initial transparancy value for the screenshot in a local variable named 'screenshot' (0 = opaque)
  while (screenshot < 100) // a 'while' loop for making the transition effect - checks if the 'screenshot' local variable's value is lower than 100 (not fully transparent)
  {
    screenshot = screenshot + 5; // add transparancy increment from the local variable towards opaque
    screenOverlay.Transparency = screenshot; // set the transparancy value of the overlay object type as the local variable's 'screenshot' current value
    Wait(2); // a short wait to see the result on screen before the 'while' loop repeats itself
  }
  screenOverlay.Remove(); // after while loop is over, remove the overlay object from the screen
  gUI.Visible = true; // un-hide gUI
  UnPauseGame(); // unpause the game
}

This function can be called anywhere you like. For example, when clicking on a button that should reveal a settings panel GUI:
Code: ags
function btnSettings_OnClick(GUIControl *control, MouseButton button)
{
  grayscaleFadeIn();
  gSettings.Visible = true;
}

Or when close-examine (look at) of an inventory item - for this I first made a global 'int' variable that I pass the close-up graphic sprite index number into when looking on a certain inventory item. Then I call the grayscale function to play and when it's done I'm calling another function for actually drawing that sprite on the screen - that other function I placed on my dedicated UI script header, but you can place it in the Global Script header as well:
Code: ags
// replace 'x' and 'y' where you wish the sprite to be drawn on
void inventoryCloseUp()
{
  inventoryItemCloseUpOverlay = Overlay.CreateGraphical(x, y, inventoryItemCloseUpSprite); // passing the close-up sprite stored in 'inventoryItemCloseUpSprite' into global overlay object type 'inventoryItemCloseUpOverlay' for drawing it on the screen (on top everything)
}

And here's the 'Look at' inventory item code:
Code: ags
// replace 'x' with the close-up image sprite number
function iKey_Look()
{
  inventoryItemCloseUpSprite = x;
  grayscaleFadeIn();
  inventoryCloseUp();
}
#4
Only now got to the point in my game that I could finally put this into use - using @Nahuel's code I was able to achieve this almost fantastic result! I just implemented this as a Void that I could call when clicking on varies things, such as buttons for opening menus, etc. I also coded the transition effect. It looks like this:

Code: ags
void grayscaleScreen()
{
  PauseGame();
  DynamicSprite* RoomBefore;
  RoomBefore = DynamicSprite.CreateFromBackground();
  RoomBefore.Tint(190, 190, 190, 100, 100);
  int dsTrans = 100;
  int sat = 0;
  int lum = 0;
  while (dsTrans > 0)
  {
    dsTrans = dsTrans - 5;
    sat = sat + 5;
    if (sat > 100)
    {
      sat = 100;
    }
    if (lum < 80)
    {
      lum = lum + 5;
    }
    if (lum > 80)
    {
      lum = 80;
    }
    DrawingSurface* ds = Room.GetDrawingSurfaceForBackground();
    ds.DrawImage(0, 0, RoomBefore.Graphic, dsTrans);
    ds.Release();
    SetAmbientTint(190, 190, 190, sat, lum);
    Wait(2);
  }
}

There are a few issues, though:

1. The player character's sprites are brighter than this in-door room. So I used 'player.LightLevel' to make him a little darker. But this caused him to be isolated from the AmbientTint effect altogether. I also tried using player.Tint to make him darker but this one isolates him as well.

2. Overlay speech text, such as the 'SayBackground speech' that is shown in the screenshot still remains in full color.



I wonder if there's a way to make this grayscale effect happen on a screenshot, that is taken from the room when triggered, which is then drawn on the screen the same way as in this method - if possible, that would probably make things much easier as non individual elements would need to be tinted, as everything will be merged down in the screenshot.

EDIT:
Ok, almost nailed it - I managed to make a screenshot which contains everything in the room in it and to make it grayscale - this allows to desregard needing to tint rooms and objects / character separately. I used 2 global variables of the DynamicSprite type for storing the room's state: one for tinting into a grayscale image and another for reverting back to full color - if this is the correct route; I'm not sure yet. Since my rooms are positioned 30 pixels lower on the screen, I had to make the screenshot drawn 30 pixels lower on the Y axis. The code looks like this:

Code: ags
void grayscaleFadeIn()
{
  PauseGame();  
  mouse.Visible = false;
  screenToGrayscale = DynamicSprite.CreateFromScreenShot();
  screenBeforeGrayscale = DynamicSprite.CreateFromScreenShot();
  screenToGrayscale.Tint(190, 190, 190, 100, 100);
  int screen = 100;
  while (screen > 0)
  {
    screen = screen - 5;
    DrawingSurface* ds = Room.GetDrawingSurfaceForBackground();
    ds.DrawImage(0, -30, screenToGrayscale.Graphic, screen);
    ds.Release();
    Wait(2);
  }
  mouse.Visible = true;
}
Now, a new issue arise which is that all of the room elements (characters and objects) remain showing on the screen, while the full grayscale screenshot is drawn at the back of them. Is there a way to draw the screenshot in-front?
#5
Thanks guys. By now I've already implemented a black GUI and made a custom FadeIn and FadeOut functions with it by using transparancy - I don't think I'm going to use the built-in transitions anymore due to their limitations and as they don't give the freedom of control; in my custom fades I can do mostly anything I want, and even choose the amount of transparent value that I wish to make the fade kind of 'jump' to on each screen draw. For example, subtracting transparancy in jumps of '10' with a minor Wait of (3) or so for making a '10 frame like' FadeOut, instead of a smooth fade that drawn on each game cycle.
#6
Quote from: Crimson Wizard on Fri 15/09/2023 15:22:03Today it's possible to use one of the existing video plugins, like this one:
https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/plugin-spritevideo-v0-9-3-sprite-and-video-render-based-on-direct3d-plugin/
(except it does not support audio)
When we translated some games we found integrating subtitles in the FMVs that didn't have any somewhat troublesome. I don't mind having audio separated from the video in AGS. Though, the last time I tried adding a video into AGS I had trouble showing text on top of it, which led me to disregard the video altogether. Not sure if its supported by now.

Quote from: negator2vc on Fri 15/09/2023 15:31:02Just please don't mess with the original design (puzzles, texts, etc...).
No worries. :) I stick to the original and do my best to re-build everything exact. The only thing I've improved so far is the ability to skip over the cut-scenes, which isn't possible in the original.
#7
Quote from: Monsieur OUXX on Fri 15/09/2023 10:07:49That seems like a great idea, because there's a lot of old FMV games which could have achieved greatness but were carrying some obnoxious/obsolete game mechanics, broken puzzles and unclear hints.
They all need a good "repair". Not just this one, but Phantasmagoria and the others too!

Thanks. :) While this kind of thing is great to kind of fixing problems in old games, only a minor group of people would probably do that as it's time consuming, which others may prefer to spend on an original game of their own. I encountered with only a few old games that fans had taken and improved, such as King's Quest 1 through 3 by AGDI, another KQ3 by Infamous Adventures (once called TIERRA) and KQ4 Retold by DrSlash.

As for Phantasmagoria - in the local group I'm running with some friends in my country we've fully translated it to Hebrew; I was responsible on translating the visual graphics. Same on Syberia 1 & 2. They all look great, though I don't think that we would have taken the road of rebuilding neither of them like I'm doing here with Master Lu.
#8
I have a suggestion / feature request regarding the Sprite editor:

If sprite source files had moved on disk and we try to replace them from source, AGS gives an error that the source files are missing. However, it doesn't give an option to search for the files in the new path.

I thought that maybe I could just select multiple sprites and then update only a fraction of the path in their SourceFile property, and that it will keep the filename intact - but it actually changed all sprites to have the same path in their SourceFile, which is not correct. So I thought of 2 possible solutions:

1. To have the SourceFile property broken into 2 separate properties: one for the path without the filename, and one only for the filename. That way, the path of multiple sprites could be updated while their filename property will remain intact.

2. Havig AGS to give us an option to search for the first missing file, and after picking it in the new path it will try to search for the rest there as well - this is neat solution that exists in other programs like Adobe's; when loading a project and there are missing files that should be read from external locations on disk, which for example had been moved to another location, the program prompts about the first missing file and lets you browse for it. Once picking the file at the new path, it takes into account the new path and automatically search for the rest of the missing files there.

I think that the second option would be the best route, as this may also be usable not only for the sprite manager but for other sections in AGS which have an option to replace assets from source.
#10
That is awesome, CW. What an improvement to the View editor! Thank you so much! I can confirm that delaying , flipping, setting different images and setting a sound on frames in multiple loops work great!

I have some feedback for other things I checked that don't currently work correctly:

1. Upon trying to delete (Del Key) a selection of frames in multiple loops, only the frames of the first loop are getting deleted while the selected frames on different loops remain intact.

2. The right-click context menu on any of the frames from the multiple selection removes the multiple selection and affects only the single frame clicked upon.
#11
Thanks a lot, CW. If and when this could be added that would be much appreciated.

Quote from: Crimson Wizard on Wed 06/09/2023 17:05:09The "Assign to View" can assign only to the first 8 loops for some reason.
This is such a mess...
Gee, good find! I haven't reached to assign to a 9th loop yet but only to the 8 directions. You were one step ahead of me on this one before I even managed to find and report about it myself, as I counted on assigning sprites this way... (laugh) Thanks for letting me know at least. :)
#12
I'm not sure if I understood correctly what you mean. The Sprites editor lets me select multiple selection and I use this to assigning the selection to a view. It gives options such as overwriting or adding the frames to an existing loop, and also to set all frames as flipped or to add them in reverse order. I only find that it missing one option which is to set a certain delay for all the frames in this process.

EDIT:
Sorry, I mistook the Sprite and the View editor when I read your reply. I originally talked about the Sprite editor so the delay could be set at the same time when assigning the frames to a View. But if as you said the View editor will allow selecting of multiple frames that could do the trick as well, in addition to also allow deleting / flipping of multiple frames.
#13
The ability to grab a bulk of sprites in the Sprite editor and to assign them to a View is a very neat feature. Though, it lacks the ability to set a 'delay' to all of the frames if you need it.

In the game I'm working on, I need the walk animation of my character to run in an 'in-between' delay speed, which I can achieve only by setting a delay value for every frame of its walking animations. But since every of the 8 direction of my characters contains 18 walking frames, this is quite tedious to have to click on each and every frame in every loop for adding the delay value. So it could be nice if it could be added for all frames at the same process of assigning them to a view.

Thanks
#14
Thanks, @Snarky.

Quote(I'm almost tempted to suggest you try upscaling the graphics for an HD remake.)
In general that's a great idea. Though, due to some visual problems with the graphics that you can rip for the original game files, apart from the 'walk' and maybe 'talk' animations I base most of what's going on upon captured cropped moments from while playing the game in an emulator. So if I'll try to upscale the background for example and then to upscale a cropped area of it with some animations, it might not look right. It's a very neat process that requires positioning of every object at the exact pixel spot it should be.

QuoteI would have thought the best way to achieve that would be through a ScummVM port (as they did for KQ7), but it looks like attempts to add the engine to ScummVM were abandoned, so for a non-engine-coder I guess a remake is the last resort. Good luck!
Exactly - our local Hebrew Adventure group in which I'm one of the admins mostly use ScummVM when we translate games, as it gives more freedome and flexibility to add captions and to translate games that the original engine of the game could ever have. But yes, 'Master Lu' isn't supported to run in it, and even if it could I don't think that adding captions to it could be done, giving the fact that it doesn't have any code of captions to relay on.
#15
*** PROJECT DISCONTINUED - See latest update at the end of this post ***



Ripley's Believe It or Not!: The Riddle of Master Lu is a point-and-click adventure game based on Robert Ripley, the creator of Ripley's Believe It or Not!, which was developed and published by Sanctuary Woods in 1995. -Wikipedia.

I really liked this game back in the day, the same as I like it today, and found myself keep returning to playing it every few years from beginning to end. Though, the one thing that bothered me most is the fact that it lacks of any text captions; making it unplayable for players who cannot hear. The second thing that bothered me is that there is no way to skip scenes or dialogues; which makes it quite bothersome.

The main issue made me want to try and add captions to the game, however this task was found impossible, giving the fact that there is no access to the source-code of the game nor to the engine it was built upon. And as hard as I found, I wasn't managed (so far) to reach any of the original game developers or owners of the out-of-business Sanctuary Woods - which I'm still trying.

That is when I came up with an idea to actually re-create the game in AGS. I began the process to first test how it looks, and after days and nights of tedious work and completing its long introduction scenes, I can say that it turns out really good and truly looks and feels as if it was developed by the out-of-business Sanctuary Woods themselves! And at this point I think that it deserves a thread in the AGS Games in Production forum. So here it is!

* Please note that I'm still trying to reach and get approval to releasing this game – hopefully that it will be allowed to be shared for free, or at least that GOG could add it to their library and so I could offer them this captions version when its ready as a free-extra download for whomever purchase the game from them.

I currently work on re-creating the 'shareware' version of the game – as this can be shared for free like the original shareware is – and will update here once I have more to update. So keep tuned on this thread if this project interests you.

How does the Redux version is built?
I used some ripping tools that someone once wrote for ripping the game's assets, and also purchased Game Extractor which in the background use some of the mentioned ripping tools. The ripped assets include many BMP index files, which I converted into PNGs to save space, though many of them (especially animations) were not ripped correctly and have 'pixel-holes' in them. So whatever's not good enough I basically capture while playing the game in an emulator (without any compression). Then I crop the areas of action and make them GIF animation files. And finally, I import these GIFs into AGS and arrange them in Views.

The thing that did ripped correctly is the locations background (index BMPs) and the RAW audio (which is basically a WAV format) that I converted into OGGs to save space as well.

I've arranged all the audio files in an Excel sheet, and then listen and categorize them on-the-fly with filters, while also typing the caption of everything that is said in them; this process involves the listening feature of google translate for listening to the spoken audio – as not everything is cleared – and of course my own judgment checking if whatever was translated is actually correct, where if not I use other online dictionaries for checking and comparison, and then fix the necessary things that google translate got wrong. At the same time, I'm also translating the game to Hebrew (my mother tongue) as it would be a waste not doing so if I'm already going over 4K+ audio files.

All these 'pieces' become into a 'puzzle' of over 50,500 graphic files, and an addition 4,247 audio files. And I build this puzzle together in AGS and make all the necessary scripting from a complete scratch to make the game look and feel as close as possible to the original – only with the addition of text captions and skipping cut-scenes/dialogues possibility, which are the main reasons of why I've began working on this project in the first place.

Any comments and suggestions would be most welcome! And if someone has any relation or way to communicate with the original owners of the game and its intellectual proprietary, I'd very appreciate to know so I could begin working with them to get the necessary approval to releasing this re-release in the end.

* A side note – I'm not doing this for money and make this project voluntarily and completely for free, to bringing this masterpiece first for those who couldn't play it because they can't hear, and for returning adventurers who'd appreciate to re-play this game with captions – while making the captions, I myself now get many things that I didn't hear or understand correctly when I originally played it . So I suppose others would too.

Attached some screenshots from the process.





And here's a short video demonstrating how I prepare the animations for AGS:

10/09/2023 UPDATE:
Dealing with a huge amount of sprites can be a tedious task - but it can be a breeze with the help of some automatic scripting. I've made a short video demonstrating a recent discovery of mine about the ImageMagicK tool, and how I use it to prepare the sprites for importing into AGS. This tool includes so many features that I really got lost and it took me quite some time to find the appropriate functions that I needed to make it work for my needs.

12/09/2023 UPDATE:
A package from over seas has just arrived - it's the official player's guide of the game; read in some FAQ walkthrough that someone wrote that back in the day - before the commonly internet access in every house - you had to buy one of these if you got stuck in games. When I found this one on eBay right afterwards I immediately grabbed it. I expect that it would probably be a good reference book when re-creating this game.


In addition, I've capture today the full introduction from the re-built game which shows how the English captions look like. You may find it here (game resolution is 640x480 - it was sharply upscaled x3 for best viewing experience on YouTube):

For those of you who speak Hebrew, this is the same intro with Hebrew subtitles (Hebrew font by me):

14/09/2023 UPDATE:
In this video I describe the making process of the captions along with translating them - this is a technique I developed myself which helped me a lot when translating other games:

02/10/2023 UPDATE:
It appears that my good will to reproduce this game had encountered with some problems that I thought I could overcome, though eventually found they're just too much to handle. And so instead of having a good time re-producing this game, it turned into something un-pleasant and very exahusting - the good thing is that I'm only at the very beginning on the game. There are 2 main problems:

1. The ripped sprites have an index color 0 (pure black) as the background, while the same color is used in the actual sprites of the characters and objects - meaning that when the sprites are imported and this index color is considered as transparency, it also makes 'pixel-holes' within the actual sprites, which requires manually painting them over.

2. Each of the animation sprites has its own dimentional size, which requires manually aligning each and every sprite when re-building the animations.

These two main issues might not have been a problem on a regular 2D game where there are only a few sprites to handle. Though in this particular game there are dozens and hundreds of sprites in almost every animation sequence, which makes it a tedious process to re-create.

Sorry if this last update is such a disappointment - I'm disappointed by this as well. However, there is a bright side for everything. The first one is that I learned new scripting methods in AGS, which I'm surely going to use when working on my
next project. The second thing is that during the re-creation of what I did so far, I found and reported about bugs and new feature requests for the AGS editor, which mostly (if not all) were fixed and implemented in the coming 3.6.1 update by @Crimson Wizard. In addition, I managed to reproduce and release a nice grayscale pause module - very similar to the one that exists in 'The Riddle of Master Lu' when taking / viewing inventory items! This couldn't be done without the help of @Nahuel and @Crimson Wizard too. You can find it here.
#16
Not on the same matter I originally posted, but someone may reach this post when searching for SayBackground along with X and Y coordinates. Which I was looking for on another game that I'm working on where I wanted to position the speech text at the bottom center of the screen. So if anyone is interested, here's the details and the solution:

My game has live footage cut-scenes animations, which I imported into AGS as sprites, set them in Views and then in room objects. I'm using if statements to check for specific frames in the animations where I wish to play speech sound and to present the text at the bottom center of the screen.

Originally, I tried using .SayAt function for positioning the text where I want it to be, but it's a blocking function which sometimes caused another message that coded very close to the previous one to not appear. So I moved to use the .SayBackground function instead. But this one doesn't have the 'At' property like '.Say' has, and also requires to play the speech file separately. Besides, it also required to place the characters at the bottom center of the screen where I wanted the text to be shown and to make their transparancy 100. This had its own issues, such as frequently line breaks that looks wrong for bottom-center text, and also that sometimes the text was disappeared before the speech voice is finished playing, since as mentioned above the SayBackground is purely for showing text and you have to play the audio separately.

Eventually, I ended up using a custom .Say function which plays the speech clip, and also pass the text string to a GUI label, which I positioned exactly where I want it to be. So if anyone is interesed, here's how it works:

1. I made a GUI with a label that I positioned where I want the speech text to appear, and set it with the appropriate Speech font.

2. I made a custom 'say' function in my Global Script header (can't thank enough for @Khris for helping me with this one) called '.SayBottom', which goes like this:

Code: ags
void SayBottom(this Character*, int cue, String text)
{
  Game.PlayVoiceClip(this, cue);
  lblSpeech.TextColor = this.SpeechColor;
  lblSpeech.Text = text;
}

* I use this mainly in live-acting cut-scenes where the actual character are not present in the room. So I don't need any speech animation.

And under 'repeatedly_execute_always()' in the Global Script I wrote this to actually draw the text on the screen:

Code: ags
if (System.AudioChannels[0].IsPlaying) { // speech is playing on channel[0] by default
  if (lblSpeech.Text.Length < 500) // 500 is the Width of my label in pixels
  {
    lblSpeech.Y = 376; // this is the position I like the text to show for 2 lines of text
  }
  else
  {
    lblSpeech.Y = 356; // this is the position I like the text to show for 1 line of text
  }
}
else if (!System.AudioChannels[0].IsPlaying) { // this wipes any text from the label if no speech is playing on channel[0]
  lblSpeech.Text = "";
  }
}

By using this method in an actual playable room, this can be used for making the character speak (where the speech animation is not required) while the character does other stuff, or even walk around, as this is a none-blocking function.

Of course, this is for a case where you have speech in your game - if you're only making your game and don't have speech yet then this should be modified accordingly.
#17
Thanks for the quick testing. Appreciate it. That's really odd - I'm using July's 3.6.0 and on my end although the font is set up with outline and showing correctly for speech during runtime, when I passed a Character* .Say string into it the text shows only with the the character's speech color, but no outline... I will re-check this shortly this evening and update here.

EDIT:
Checked and confirm that it works - it appears that I probably changed the label's font unintendedly to Font0 which is the very same font as the speech font. Hence it didn't show the outline.

As for the label text alignment, such as aligning to bottom center, until such feature is implemented (or not), I made a simple code for changing the label's Y position, based on whether the its length is less than its Width or above it.
#18
Thanks CW. I actually have set my speech to use Font1 and it has its outline settings applied and showing correctly during runtime. But the labels that I set to use this Font1 only get the 'naked' font without any outline applied to it during runtime...
#19
Just found that GUI labels text can only be aligned to either left, center or right, while buttons text on the other hand has the flexibility of aligning their text to every edge and corner of its boundaries. I think that it would be nice if labels could have the same flexibility.

Besides, I think that labels and any other element that can utilize text should also have the properties that Fonts have, such as OutlineStyle, AutoOutlineStyle, AutoOutlineThickness, LineSpacing, and SizeMultiplier... I found this missing when I tried to use a text label as a static speech text location, which works quite nice yet missing these features to look better.

Thanks
#20
Hi everyone,

Just encountered this one and found that it actually hangs the editor on that dialogue until all messages are accepted (the only option in the dialogue to click upon).

When trying to delete frames in the Sprite editor, AGS reports you about frames that are in used in 'Views' and that they cannot be deleted - which is all fine and dandy when you're  trying to delete a single or about just a few frames. However, if you try to do so for a bunch of frames (say 100+), the editor will prompt you the 'Cannot delete sprite because it is in use' dialogue for each and every frame, where only an 'OK' button and an 'X' which does the same thing are available for you to closing the dialogue window that is related to a specific sprite. So basically, you're getting stuck in a situation where you have to accept each and every dialogue to get it out of the way and to get back to the editor.

I think that a 'Cancel operation' button should be integrated in this dialogue for stopping the deletion process from memory and closing the dialogue in a single click.

Thanks
SMF spam blocked by CleanTalk