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 - Crimson Wizard

#2821
Quote from: greg on Mon 18/07/2022 00:30:07
Hi, I just upgraded to beta 10 (from beta 5).  When I look at my views in the editor, I see that many frames now have a frame-link sound "-1 [unknown]."  Previously, none of these frames had any frame-linked sound.

I recall there had been an incorrect frame sound ID problem quite long ago, much earlier than 3.6.0 betas. But I cannot think of any change between beta 5 and 10 that would affect frame sound ID property.

Do you still have a previous version of your game's project? It might be useful for testing this issue.
#2822
Quote from: Laura Hunt on Sun 17/07/2022 21:42:00
When I start my game, Lucía is displayed as Luc?a.

However, if I delete the "í" and write it again, it is now displayed properly. I rebuild all files just to be sure, and save my game.

But when I start up AGS and run my game again, the issue is there again.

Please tell, how do you display it precisely?

Does it display correctly in the editor, or it gets broken in both text editor and game?

Could it be that while in game you restore some previously made save, which has this property value stored in an incorrect way?

PS. I rather recommend switching to Unicode mode regardless, as that might resolve all text problems now and in the future.
#2824
Quote from: Khris on Fri 15/07/2022 10:37:59
When I had color issues, the reason always turned out to be the 8bit room background. So I always import a game-sized grey background as my first room's background.

Afaik the video is drawn separately from the room, so room background should not affect it. Game color depth may affect it though.

EDIT: on another hand, the OGV video decoder used by AGS is somewhat outdated, and may not correctly support certain video (sub)formats.

If you won't achieve desired effect with AGS itself, there's also Direct3D plugin for playing non-blocking videos, and its upgraded versions called Sprite3D plugin.
#2825
NOTE: I reuploaded demo once more, fixing another problem that caused incorrect drawing colors in room 2.
#2827
Quote from: Mehrdad on Thu 14/07/2022 13:01:38
Both. editor and run game. All images point to sprite 0. I could fix it manually and replace image 0 with other sprites.

Do I understand correctly, that objects themselves exist, but they lost their sprites?
Do you get any errors or other messages when opening the game in the editor? Which sprites are present in the sprite manager?

EDIT: alright, I finally reproduced this, if I save & rebuild whole game without opening a room first.
It appears that the game contains mistakes, where objects reference sprites which are no longer present in the sprite manager, but somehow remained present in the sprite file. The newer version of AGS 3.6.0 detects such case and cleans the sprite file.
#2828
Quote from: Mehrdad on Thu 14/07/2022 06:00:37
Yes, Demo Game. I hadn't problem with previous versions. It happens for me in 1.1.0
I use 3.6 last version.

So what happens, you download the demo game, open the game in the editor, go to room 3, switch to display room objects, and there are none? And when you run the game, there are also none?
#2829
Quote from: Mehrdad on Tue 12/07/2022 14:42:49
Room 3 is empty and doesn't have any items for drag

Are you talking about Demo Game? I don't observe this problem. Please tell, where did you download the game, and which version of AGS are you using to open it?
Does anyone else have same issue?
#2830
Quote from: Mehrdad on Tue 12/07/2022 12:08:06
In the game, I haven't items (objects) in room 3.

Sorry, what do you mean by this?
#2831
Updated DragDrop & DragDropCommon modules to 1.1.0

* Introduced DragDrop.EvtCancelled attribute, telling that the action was cancelled and object "unhooked" even before the dragging itself started.
* Consequently, fixed a mistake in DragDropCommon when it did not reset some public attributes when the drag was cancelled.


PS. I still have to write a better documentation and examples...

PPS. Started rewriting module docs, I also found a number of logical mistakes in the module, so likely there will be 1.2 update after this...
#2832
Probably fixed the extender functions not showing up in the list:
https://cirrus-ci.com/task/6733627856781312
#2833
Quote from: Baguettator on Mon 11/07/2022 06:31:41
And all the functions linked to a struct that is not created in the script (all the "standard" ones, like Button, GuiControl, ListBox etc...) don't appear in the list.

Are you speaking of standard AGS functions or the custom extenders linked to standard structs?
I will note just in case that the builtin functions should not be in this list on top, as this list is meant to jump to the code, and these functions are not in game script but in the engine.


Quote from: Baguettator on Mon 11/07/2022 06:31:41
Sorry, the font is Gorri Sans, the label parameters are standard, the thing is that probably I need to add a vertical offset to the font so the top of the letters won't be cut by the label top edge. But if I didn't choose the "cut content for Guicontrol" option in General Settings, that's not intended to be cut ?

The label is not supposed to cut anything without "clip contents", but my guess is that the font renderer may prevent anything from being drawn in negative relative coordinates (above and to the left from text's starting drawing position).

On the question why it is drawn too high, I quickly experimented with this font (downloaded it here), and noticed that it cuts a pixel or two from top if it has "TTF font adjustment" set to "Resize ascender...", but it seems fine if this option is set to "Do nothing". Is this the effect that you are experiencing?


#2834
Quote from: codinginquarantine on Mon 11/07/2022 03:13:09
So looking into this, I see there's some built in tokens like @SCORE@ that will auto replace in GUI labels. Is there one I would need to use in order to get the text to populate the label? Not able to find one when I do research on GUI labels

You need to call your custom function instead of calling "player.Say", passing text as an argument. Inside that function set a label, make gui visible, position it as you prefer. Then use "WaitMouseKey" function to block the game until player presses or clicks something. The function may be created as a "extender", to make its use more pretty.
(See this topic in the manual for extender functions: https://adventuregamestudio.github.io/ags-manual/ExtenderFunctions.html)

Example:
Code: ags

// in a script header, such as GlobalScript.ash:
function SpeechGui(this Character*, String text);

Code: ags

// in a script body, such as GlobalScript.asc:
function SpeechGui(this Character*, String text)
{
     //... find necessary position, like you do now

     SpeechLabel.Text = text; // set text to a label on gui
     gSpeech.Visible=true; // turn gui on

     // wait for player input
     WaitMouseKey(TIMEOUT);

     // cleanup
     gSpeech.Visible = false;
}


Then you may call such function as:
Code: ags

player.SpeechGui("Yadda yadda");



For Dialog scripts, configure "Custom Say function in dialog scripts" (General Settings -> Dialog), and input your function's name there. Then whenever you write dialog scripts your function will also be used for speech lines instead of standard "Say".


If you want "timeout" based on text length, then it may be calculated inside this function like:
Code: ags

    int timeout = (text.Length / Game.TextReadingSpeed) / GetGameSpeed(); // number of game loops to read this text
    WaitMouseKey(timeout);


If you want an infinite timeout (no skip by timer), then, if you are using 3.6.0 simply do "WaitMouseKey(-1);", if not then following code:
Code: ags

    while (WaitMouseKey(1) == 0); // wait until something is pressed or clicked





PS. Also I might mention that there's a SpeechBubble module that may save you time, unless you prefer to code everything yourself:
https://www.adventuregamestudio.co.uk/forums/index.php?topic=55542.0
#2835
Quote from: Baguettator on Sun 10/07/2022 22:39:10
- the functions for specific controls (functions like that : function my function (this Button*)) don't appear in the list of the editor (at the top of the script). It was not a problem in previous versions

What are these functions, where and how are they declared?

Quote from: Baguettator on Sun 10/07/2022 22:39:10
- the labels seem to cut the letters at their top border, even if the option in General Settings is false ("GUIControl cut their content").

Please, give some details... what is the font, which parameters do you use, what is the label's parameters?

Quote from: Baguettator on Sun 10/07/2022 22:39:10
- is there any reason for the DrawString function is not as good as the way texts are displayed in labels ? With my font (GorriSans), texts in labels are perfectly displayed, and when I use the DrawString function, the letters are "bold" and not as precise.

Depends on what do you draw upon. If the font is anti-aliased, and you draw on a surface without alpha channel, then the anti-aliasing will be lost.
#2836
Updated to v0.9.1, now implements D3D.OpenSpriteFile() again.

For Windows: https://github.com/ivan-mogilko/ags-sprite3d/releases/download/v0.9.1/win_ags_sprite3d.zip
For Linux (debian-based): https://github.com/ivan-mogilko/ags-sprite3d/releases/download/v0.9.1/libags_sprite3d.tar.xz

I think this now covers all the functionality of the old plugin. What remains is mostly testing and writing a documentation.
#2837
Updated to Beta 10
(use download links in the first post)

Editor:
- Editor no longer errors and fails when opening a game project with some script files missing.
- Fixed editor displaying unhandled exception if the script which user is trying to open was missing. Instead it will now open a blank script.
- Fixed a recently imported sprite could be displayed incorrectly scaled up in the room editor for high-resolution games, if the "Allow relative asset resolutions" was enabled in General Settings, and the sprite 0 had "Resolution" property set to "Low".
- Fixed script autocomplete for function calls was mistreating commas in strings and inline comments as if they were separating actual parameters.
- Fixed script autocomplete was not displaying members of extended structs if the parent struct was declared in another header.
- Fixed script autocomplete was not working for enum names.
- Fixed structs and enums were not highlighted if declared inside a script's body.
- Fixed crash in TextWindow GUI preview.

Engine:
- Fixed AGS_EngineInitGfx plugin callback was not called during OpenGL renderer initialization.
- Fixed ListBox.RowCount reporting 0 if called before the control was displayed once.
- Fixed ListBox was trying to draw double border (in hi-res games) outside of the control's clipping rectangle.
- Fixed Slider's handle not reacting to mouse clicks when partially outside the slider's box.
#2838
Quote from: Baguettator on Fri 08/07/2022 06:30:52
Also I thought about a thing : would it be possible to make the slider's handle clickable even "out" from the slider's height ?

This was the intended behavior, but got broken few months ago, will be fixed in the next update.

Quote from: Baguettator on Fri 08/07/2022 06:30:52Even if you click on it, and even if you have chosen the pixel-perfect collision.

Please note that pixel-perfect click detection does not work on guis at the moment.
#2839
This is an upgrade of the older "Direct3D" plugin by AJA, which was used to display Theora videos in AGS, and also freely display sprites with various transformations (without creating standard game objects).

The original plugin was a nice addition as it worked around some engine's limitations, such as being unable to display video non-blocking or while keeping some other objects on screen (like GUI or cursor); or randomly creating scaled and rotated sprites on any layer in game. Not much changed since, except maybe in AGS 3.6.0 Overlays now come close to this plugin's sprites abilities.
But the older plugin also had a significant limitation, as it was made for an older engine, it did not support anything besides Direct3D renderer on Windows.

This new upgraded version, called "SpriteVideo", now has following major improvements:
* OpenGL renderer support;
* May be built for Linux and Android;
* When used along the latest AGS 3.6.1+ may stream video from within the game package too (no need to put video files directly in the game folder).
* Potentially maybe will work on Mac OSX, but not yet configured the project for that. Also I don't know how to build on Mac :/, so help is welcome.

Another important part is that this plugin is purposely made 100% script compatible with the old plugin, which means that you may simply replace it in your game project and all the scripts will continue to work. In fact, you may even rename new plugin's dll into "ags_d3d.dll", replace it in the game folder, and it should hook up correctly.

WARNING: neither the original plugin nor this reimplementation play any sounds from videos, they only display video frames. Adding sound support might be a goal for the future versions, but it's not in the immediate plans.
UPDATED INFO: AGS 4.0 supports non-blocking videos with sound starting with Alpha 9, see this post for details. If you're using AGS 4, it's likely that you don't need this plugin at all.

Documentation:
https://github.com/ivan-mogilko/ags-spritevideo/wiki

The plugin is currently in the "test stage", and I will be interested to see how it works with existing games that used the original plugin. My primary goal at this point is to make it complete and stable substitute for "Direct3D" plugin.

Downloads:
Updated 22 December 2023
For Windows: https://github.com/ivan-mogilko/ags-spritevideo/releases/download/v0.9.7/win_ags_spritevideo.zip
For Linux (debian-based): https://github.com/ivan-mogilko/ags-spritevideo/releases/download/v0.9.7/libags_spritevideo.tar.xz
For Android: https://github.com/ivan-mogilko/ags-spritevideo/releases/download/v0.9.7/android_libags_spritevideo.zip
Source code: https://github.com/ivan-mogilko/ags-spritevideo

TODO for v1.0:
* Testing in some real games.
* Bug fixing
#2840
Your question is in the manual's FAQ, question 4 from top :)
https://adventuregamestudio.github.io/ags-manual/FAQ.html

(you also have an offline manual with AGS, that may be launched by pressing F1 in the editor)
SMF spam blocked by CleanTalk