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

Topics - Snarky

#1
So, this isn't quite a Black Stories mystery, but a true-life tale that happened to me the other day and had me stumped for at least half an hour, and I thought it might be fun to see if you could solve it.

The Case
The other day I thought I'd make a pot of tea. (Since the pandemic I've switched from teabags to proper brewing of loose-leaf tea in a pot, though with a kind of wire basket to retrieve the leaves afterward.) But when I took the lid off the pot I discovered I had already made one earlier, which was now cold. I decided to just heat up a cup in the microwave—I know some people find reheating to be a crime against tea, but I honestly think it tastes just fine.

So I looked around for my favorite tea mug, but I couldn't find it.

Where was it?

(Ask me any such questions as might help, or propose places to look for it.)
#2
Hints & Tips / Dreams in the Witch House
Mon 05/06/2023 08:47:39
I'm getting fed up with the rat, and I wonder if there is some way to deal with it or if the constant frustration is meant to be an unavoidable part of the game.

Spoiler
Whenever I try to poison it, it just eats the plank and bites me, with no apparent ill effect of the poison.
[close]
#3
The forums are now telling me I'm not allowed to view spoilers:



(For once, this does not seem to have anything to do with CleanTalk; it's the same whether I'm on VPN or not.)
#4
As a script module writer, some modules can get very complex, and it would sometimes be useful to break them up into separate scripts. This would help keep individual files simpler, but also add flexibility for users about what functionality they need and what they don't, and allow the creation of "libraries" to provide features used within multiple script modules, without requiring code duplication.

For example, for the SpeechBubble module, it would be useful to have the code for text formatting/rendering and for formatting GUIs with outlines, corners and backgrounds as separate pieces of functionality in their own scripts, as well as the code that replicates AGS's speech blocking logic (and other missing Wait() functions).

Of course, you can do this already, but it means that there are dependencies between the scripts, and there is no good way to distribute them all together.

Similarly, someone might create a script module that uses e.g. Tween, or some other pre-existing module, but then they have to explain to users that they need the other module, and that it has to be placed higher in the hierarchy, etc.

I think a good way to solve this problem would be if it were possible to save and distribute the module as a (sorted) script folder. When imported, it would create the folder in the script hierarchy. (And to forestall one objection: it would be easy as a module author to use #ifdefs to avoid a case where the same script is imported twice in two folders, e.g. a bundled copy of Tween into a project that already has it.)
#5
We've had paging bugs before where threads get lost between pages on a board, but I don't think I've ever before noticed posts going missing between pages of a thread. However, currently this post (from 25. December at 10:01:51 CET, where I talk about just having seen Glass Onion) does not appear for me either on page 2 or 3 of the thread.
#6
See thread here.

The documentation for this method states:

Quote
Code: ags
Character.ChangeRoomAutoPosition(int room_number, optional int newPosition)

Changes the room that the character is in, and positions him along one of the room edges.

This command simulates the behavior of the old "Go to room" interaction command from AGS 2.72 and previous versions. If newPosition is not specified or is 0, the character will be placed on the opposite side of the new room, if he is within 10 pixels of a room edge in the current room.

Alternatively, you can specify the position where he will get placed in the new room. newPosition can be 1000 for the left edge, 2000 for the right edge, 3000 for the bottom edge and 4000 for the top edge. Then, add on the offset within that edge where you want to place the character, in normal room co-ordinates.

(1) It should be clear from this description that the function cannot work correctly in any game with a room width or height greater than 1000 (because the edge encoding will overflow).

(2) The documentation also leaves undefined how the character will be positioned if it is not within 10 pixels from a room edge.

(3) Khris reports that the current behavior of the function is buggy/not according to spec:

Quote from: Khris on Sun 27/11/2022 20:36:44ChangeRoomAutoPosition is buggy apparently, the Tumbleweed template's 2nd room is twice as wide and Roger ended up halfway between the room's center and edge, suggesting that AGS uses the distance from the center to calculate the new position, not the distance from the edge.

(In other words, it fails to position the character along the edge in the new room.)

If this is a regression and hasn't always behaved this way, it should be fixed for backwards compatibility. I cannot test that right now, but I'll try when I can. (And as a minor point, the documentation should be edited to be gender-neutral. I think "it" should be the preferred pronoun for characters.)

Going forward, I propose that the whole function be deprecated, since its API is fundamentally incompatible with an engine supporting larger resolutions/room sizes. If the functionality is desired in the engine, a new function with an API like the version I wrote in AGS Script could be provided:

Code: ags
Character.ChangeRoomEdge(int room_number, optional RoomEdge edge, optional int edgePosition)

(As in my implementation, I also propose removing the 10 pixel condition, and pick the room edge the character is closest to/furthest outside as the exit edge, no matter the distance.)
#7
See thread.

AGS Script allows you to call functions like String.Format(), Character.Say() and Display() with a variable list of arguments of "arbitrary" types. However, it is not possible to create custom variadic functions in AGS Script (or, at least, there is no way to actually read the argument values). Some way to support this would make the scripting language a lot more powerful and convenient: for example, you could write mathematical functions that could take either ints or floats as arguments (function overloading), create generic functions that could, for example, manipulate arrays of arbitrary types, etc.

Of course, it may be that there are better approaches to achieve those goals, but I thought since it already exists in the engine somehow, this might be relatively easy to implement.
#8
Editor Development / [BUG] Sprite Resolution
Fri 02/12/2022 09:07:02
[AGS Editor v3.6.0.38]

The "Resolution" property for sprites used to allow you to scale up "low-resolution" sprites in "high-resolution" (above 320x240) games to 2x size. This capability is now disabled by default. However, I think there are two problems with the way it currently works.

-First, even when "Allow relative asset resolutions" is disabled, the property is available in the sprite editor and can be modified. This is confusing because changing the value has no actual effect in-game. I think the property should be hidden or made non-editable when the game-wide setting is disabled.
-Second, it used to be possible to bulk-edit this setting by selecting multiple sprites and adjusting the property. Now, the changed value is not applied to all the selected sprites, but only to the first one. I would consider this a regression.

Separately from this, I think it would be nice if the ability to pre-scale sprites was reintroduced in a more straightforward way, e.g. a sprite scaling setting that could be set to 1x, 2x, 3x, 4x.
#9
Sooo... the era of lockdowns appears to be over—regardless of whether the actual pandemic is. We've missed three years of Mittenses; is there any interest in resuming the tradition next year?
#10
With sprites, there is a feature to reimport a sprite or a selection of sprites from the source file(s). This can be very useful if graphics are updated, and IIRC it is also the basis for an experimental feature to recreate a missing sprite file from scratch.

I would like to request similar functionality for audio clips. Sometimes you need to update the audio for whatever reason (for example to adjust the volume for consistency), and currently this requires a whole sequence of steps to replace the clip in AGS (or the "hack" of overwriting the file in the AudioCache). It would also be useful if a missing AudioCache directory could be automatically recreated from the source files (to save space with source control tracking).
#11
One of the most common newbie errors is to not link an event handler to an event property, so that the function never runs. (And honestly, not even just a newbie error, though more experienced AGS devs know how to fix it on our own.)

So I was thinking: why not do it for them? At compile time, for each event property that doesn't have an event handler set, check if the default function name (with the correct function signature) exists in the relevant script, and if so, automatically link it. (Probably with a warning in the output pane, or maybe even a popup dialog box.)
#12
This is a bit outside the usual (since it's handled by a secret jury rather than open nominations and vote), but I'd like to bring suggestions for the juried categories:


Best Innovation: Dualnames

When I won it last year, in large part for the AGS Awards client, I was shocked to discover that Dualnames had not got the award years ago (although he did work on Colourwise, which was the basis for bicilotti's win in 2008). He did most of the work on the original client and maintained it for years, and has made many other contributions besides. He deserves this award.


Lifetime Achievement: densming

For making the popular AGS YouTube tutorials, which have taught so many people how to code in AGS. Enough said!
#13
Here's a module to do comic book-style speech bubbles. It's an alternative to Phylactere, because the older module doesn't work properly with 32-bit color. This module requires AGS 3.4, and for now it only works in 32-bit mode (or rather, transparency only works in 32-bit mode).

Initial development of this module was paid for by bx83, who agreed to allow it to be open-sourced.

To use, you call Character.SayBubble():

Code: ags
  player.SayBubble("This line will be said in a speech bubble.");


To configure, you set the SpeechBubble properties:

Code: ags
  SpeechBubble.BorderColor = Game.GetColorFromRGB(0,128,0);
  SpeechBubble.BackgroundColor = Game.GetColorFromRGB(128,255,128);
  SpeechBubble.BackgroundTransparency = 33;
  SpeechBubble.PaddingTop = 5;
  SpeechBubble.PaddingBottom = 5;
  SpeechBubble.PaddingLeft = 15;
  SpeechBubble.PaddingRight = 15;


(You should probably do this in game_start() in GlobalScript.)

This module is still under development, and is currently missing some functionality (in particular support for background speech). Please report any bugs you experience.

The module is available on GitHub.

Download SpeechBubble v0.8.0

Change Log:
0.8.0
-Implemented Character.SayBackgroundBubble()
-Added SpeechBubble.DefaultGui property
-Fixed crash with characters that don't have a speech view set

0.7.6
-Fixed an issue with lines with speech clips in text-only mode

0.7.5
-Initial pre-release
#14
Is there some way to find out from within AGS how long a certain speech clip is, without playing it?

Here's why I'm asking:

When you call Character.Say() with a voice clip (e.g. player.Say("&14 This line has voice-over");), the speech lasts as long as the clip, logically enough. (Depending on your Speech.SkipStyle setting the text may stay on screen longer, but the character won't do the Talk animation.)

However, if you set your Speech.VoiceMode to eSpeechTextOnly, the voice clip is ignored, and it seems the game falls back to using the standard AGS formula for how long to display the text, based on the string length and  Game.TextReadingSpeed.

I want to be able to maintain the same timing whether or not speech is turned on. If I could get the length of the speech clip I could do that (writing my own little function to manually do the Talk animation and time it correctly).
#15
TotalLipSync


(Character head/animation by Preston Blair. King Graham sprite ripped from King's Quest II VGA by AGDI. Background from AGS Awards Ceremony by Ali.)


TotalLipSync is a module for voice-based lip sync. It allows you to play back speech animations that have been synchronized with voice clips. TotalLipSync has all the same capabilities as the voice-based lip sync that is built into AGS, and offers the following additional advantages:
  • It works with LucasArts-style speech (as well as with Sierra-style and full-screen speech modes).
  • In addition to the Pamela (.pam) and Papagayo/Moho Switch (.dat) formats supported by AGS, it also reads Annosoft SAPI 5.1 (.anno) and Rhubarb (.tsv) lip sync files.
  • In particular, Rhubarb support means that lip syncing can be 100% automated (with decent results): no manual tracking of the speech clips is required.
  • It is more flexible: You can switch speech-styles mid-game, change the phoneme mapping, use files with different data formats, etc.
  • You don't have to do the phonemes-to-frames mapping manually: The module comes with a default auto-mapping.

How to use
  • Create the lip sync data files for the speech clips. You can use one of these tools (personally I would recommend Papagayo for manual tracking, and Rhubarb for automatic lip syncing, but the Lip Sync Manager plugin is good too):
    The filename of each sync file should be the same as the speech clip except for the extension, and you need to place them in your compiled game folder (by default, in a folder names "sync/" inside the game folder).
  • Create the speech animation for your character(s), with different animation frames for the different phonemes (see below), and set it as their speech view.
  • Download and import the TotalLipSync module into your AGS project.
  • Make sure your game settings are correct: the AGS built-in lip sync (in the project tree under "Lip sync") should be set to "disabled".
  • If you are going to use Sierra-style (or full-screen) speech for your lip sync animations, you must create a dummy view. Make sure to give it exactly one loop and one frame. If you name the view TLS_DUMMY it will automatically be used by the module. Otherwise you can set the view to use with TotalLipSync.SetSierraDummyView().
You are now ready to use the module. Add the code to initialize TotalLipSync on startup:

Code: ags
function game_start() 
{
  TotalLipSync.Init(eLipSyncRhubarb);    // Or whatever lip sync format you're using
  TotalLipSync.AutoMapPhonemes();
}

Or if you want a custom phonemes-to-frames mapping:

Code: ags
function game_start() 
{
  TotalLipSync.Init(eLipSyncPamelaIgnoreStress);

  TotalLipSync.AddPhonemeMappings("None",0);
  TotalLipSync.AddPhonemeMappings("B/M/P",1);
  TotalLipSync.AddPhonemeMappings("S/Z/IH/IY/SH/T/TH/D/DH/JH/N/NG/ZH",2);
  TotalLipSync.AddPhonemeMappings("EH/CH/ER/EY/G/K/R/Y/HH",3);
  TotalLipSync.AddPhonemeMappings("AY/AA/AH/AE",4);
  TotalLipSync.AddPhonemeMappings("AO/AW/UH",5);
  TotalLipSync.AddPhonemeMappings("W/OW/OY/UW",6);
  // Frame 7 unassigned to match default Moho mapping
  TotalLipSync.AddPhonemeMappings("F/V",8);
  TotalLipSync.AddPhonemeMappings("L",9);
}

To speak a line with lip syncing, you simply call the extender functions Character.SaySync() or Character.SayAtSync(), using a speech clip prefix:

Code: ags
  cGraham.SaySync("&1 This line will be animated with lip sync");
  cGraham.SayAtSync(320, 100, 240, "&2 ... and so will this");    // x_left, y_top, width, message

And that's all there is to it! (If you don't use a speech clip prefix, or if there is no matching sync file, the speech animation won't play at all.)

Phoneme-to-frame mappings
The principle of lip syncing is that different sounds (phonemes) correspond to different mouth shapes. If we display an animation frame with the right mouth shape at the same time as that sound appears in the audio being played, the animation will seem to match the speech. The first step, then, is to identify the phonemes and timing of them in the speech (that's what the tools listed above are for), and the second step is to choose an appropriate animation frame for each phoneme. We usually don't use different animation frames for all the different phonemes, so we combine phonemes into groups that are all mapped to a single frame. The different tools have different sets of phonemes (or phoneme groups), so we have to define different mappings from phonemes to frames.

So here is the default mapping for each data format used by TotalLipSync. It has been set up for a speech animation with ten different frames, each representing a different mouth position. (This is a fairly standard setup.) If you stick to these frames and these mappings, you can use the same speech view no matter what lip sync tool or data format you use:

Spoiler
Frame
Description
Rhubarb
phoneme ID
Moho
phoneme
Pamela
phonemes
0Mouth closed
(or slack)
[slack or same as 1]XrestNone
1M, B, PAMBPM/B/P
2Various consonants,
(Rhubarb: Ee-type
sounds)
BetcK/S/T/D/G/DH/
TH/R/HH/CH/Y/N/
NG/SH/Z/ZH/JH
3Eh-type sounds,
(Non-Rhubarb:
Ee-type sounds)
CEIH/IY/EH/AH/
EY/AW/ER
4Ah-type and
I-type sounds
DAIAA/AE/AY
5Aww-type sounds,
Ow-type sounds
(can also go in 6)
EOAO/OW
6U-type and
Oo-type sounds
(Non-Moho: W)
FUUW/OY/UH
7Moho: W[same as 6][same as 6][same as 6]WQW
8F, VGFVF/V
9L
(Th-type sounds
can also go here,
rather than in 2)
HLL
[close]
Where to get it
TotalLipSync is hosted on Github (mainly just as a way for me to learn about how Github works):
https://github.com/messengerbag/TotalLipSync

You can download the current release from there:


Known bugs
None

Change log
0.5
-Added APIs to get the currently lip syncing character, the current phoneme and current frame.

0.4
-Fixed support for Sierra-style speech
-Minor bug fixes for edge-cases
-Documentation

0.2 (pre-release)
-Added support for Papagayo/Moho Switch (.dat), Annosoft SAPI 5.1 LipSync (.anno) and Rhubarb (.tsv)

0.1 (pre-release)
-Pamela support for LucasArts-style speech

Originally based on code by Calin Leafshade (though very little of it remains in the current version).
Thanks to Grundislav for providing a speech view used in development and testing of the module!
#16
This forum is for general topics that aren't AGS or adventure game-related.

You can post about anything, just keep in mind that this forum is for conversation and discussion: things people can talk about, with a real back-and-forth. If you just want to post pictures of cats, or ask people to list their favorite ice cream flavors, there's another forum for that.

Also, even though this forum is for general topics, it's still intended for members of the AGS community. If you don't care about adventure games or about AGS, there are other places on the Internet for you. I would recommend that newcomers participate in the other parts of the forums to show that they are actually interested in AGS before becoming too active here in General Discussion.

Except for making sure that posts are in the right place, this forum is lightly moderated; it's pretty much a free-for-all. Strong language, adult content and frank discussion of controversial topics can occur, which may not be suitable for underage readers. All participants are expected to be sufficiently mature to handle this, and to post accordingly.

However, we do try to enforce basic rules of reasonable conduct, including:


  • Don't be evil:

    • No posts that are themselves illegal in the UK.
    • No threats or hate speech.
    • No links to or instructions for how to commit piracy, or discussion about warez. (Talk about abandonware is fine, but again no links or instructions.)
    • No spam or ads. They will be deleted.
  • Be nice:

    • Respect other people; posters and non-posters alike. It's understood that the tone of some threads can get heated, and that some things are said jokingly, but harassment, offensive remarks or swearing at people will not be tolerated.
    • Warn people in the thread title if there is any adult content in your post. For example, if you posted a link to a porn site for a legitimate reason, always add some text like "(Warning: Adult Content)" to the thread title so that people who are easily offended can simply choose not to read the thread.
    • Warn people before you give away parts of the story in a film, book, game, comic, TV show, etc. Use the [hide] tag to hide spoilers and other sensitive details.
    • Some things are better dealt with over personal message (PM). If you have a problem with someone, try contacting them directly (in a calm, respectful manner) instead of airing your disagreement in public.
    • Sometimes you may regret something you wrote, and want to go back and change or delete it. This can occasionally be a good idea, but it's best to then write a short comment to give people an idea of what you deleted/edited and why. Do not delete a series of posts you've made in a topic; it's disrespectful of the others who took the time to read and reply to your posts, and you may get blocked from making more posts in the future.
  • Think before you post:

    • Is your post funny, smart, interesting, or useful? Something others would enjoy reading and replying to? If not, maybe you should keep it to yourself. Pointless posts that don't add anything to the conversation just waste people's time and reflect badly on you.
    • Check existing topics before creating a new one. Use search to see if a question you have has already been answered.
    • Don't flood the forum with posts. This is not your soapbox or your personal toy, it's a space for the AGS community as a whole. You wouldn't go to a party and start shouting on top of everybody's conversation, would you?
    • Don't double post. If you have something to add to what you just wrote and no one has replied yet, edit your last post.
  • Keep it readable:

    • Write in proper, decipherable English. Don't use text-style abbreviations ("C U L8R") or fill your posts with Internet slang. Use punctuation and capitalization where appropriate (no all-uppercase posts), and avoid nonsense formatting. If your spelling is poor, make use of the spellchecker in your browser. (If your browser doesn't have a spellchecker, get a better browser.)
    • Don't quote a huge post to add one line - quote only the relevant bits.
    • Check that the SMF [tags] in your post are not broken, and distinguish correctly between what you quote and what you write. Preview your post before posting it.

Most importantly, have fun!

The moderators try to be fair in how we enforce these rules, but we are not always perfect. If you think a poster is breaking the rules and getting away with it, you can flag the post or private message (PM) one of the moderators. (The moderators are listed at the top of the forum.) And if you think a thread has been locked or a warning issued incorrectly, again please PM one of the moderators and explain why you think it is actually OK/should be unlocked.
SMF spam blocked by CleanTalk