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 - Snarky

#61
That's quite clever, @heltenjon. In a game with character stats, you can also use the inventory item count as the stat value.
#62
The Rumpus Room / Re: What grinds my gears!
Sun 20/08/2023 14:01:15
Quote from: Stupot on Sun 20/08/2023 03:35:21I'm not so sure these days as I haven't tested it for a while but you used to be able to get away with clicking a wrong square or two on those things.

Quote from: Danvzare on Sun 20/08/2023 13:18:02If I'm not mistaken, aren't the answers based on the answers of everyone else?
I'm fairly sure these captchas are used to train algorithms, so presumably what it usually does is average out people's answers to increase it's own understanding.

I definitely remember hearing that whenever it forces you to do it twice, it's because it knows the answer to one, but is collecting your answer for the other.

I think ReCaptcha has changed a lot on the backend over the years, so that much of what used to be true about it no longer is. For example, I believe that these days it uses some kind of Bayesian inference to decide how much proof is good enough to accept you as human, based on things like your IP address (and other traffic from that IP) and your mouse movements just as much as your actual answers to the challenge. If it basically trusts you, you might only have to click the checkbox, or it will be more accepting of a non-perfect answer, but if it distrusts you you might need to do a dozen challenges "perfectly" before it is satisfied. (And even that may be more a matter of "we have imposed a sufficiently high cost on this bot to discourage frivolous abuse" than really believing the user to be human.)

Its "correct" answers are probably a mix of human consensus and machine intelligence at this point. As pointed out in LF's link, computer vision can do these just as easily as—or better than—humans can these days, unless adversarial signals are overlaid onto the image (e.g. the noise ReCaptcha occasionally adds to the pictures).
#63
The Rumpus Room / Re: What grinds my gears!
Fri 18/08/2023 13:16:09
I often connect from a VPN, which makes Google give me ReCaptcha challenges before I can ask urgent questions like "How do the lyrics to that song go?"

My frustration is that it is always asking me to select which parts of an image that contain a bicycle, a motorbike, or a staircase. And this turns out to be very difficult!

-What is meant by a "staircase"? Just the steps? The banister? The whole structure? Does a staircase seen from an angle where the steps aren't visible count as a staircase?
-Does a bike or motorbike include the rider?
-Does it include side mirrors?
-Does is include sidecars, trailers, or cargo?
-If a bike is mostly but not entirely obscured by some other object in a particular square (a fence, for example), does it count?

Apparently, my answers to these questions are more robotic than human, because I usually fail the test many times over before I am able to convince Google to let me through.
#64
Quote from: Gal Shemesh on Wed 16/08/2023 21:11:03I'll have to cut the audio files into separate pieces, right?

Not necessarily. You'd just need a function that displays each part of the subtitle sequentially as the audio plays.

Quote from: Gal Shemesh on Wed 16/08/2023 21:11:03If not, then I'm not sure how this will behave and how players could skip forward in the speech clip when skipping fractions of the text, if it's a single long audio file, that is. Maybe I'm not aware of such a feature in AGS and you can make this brighter to me? :)

Well, this is the trickiest part, but you wouldn't be able to do that with the scrolling subtitles in any case. The relevant function is AudioChannel.Seek() or .SeekMs(), but you may have to play the audio "manually" using Game.PlayVoiceClip() to make it work, and that might not be possible given your script compatibility and API version.
#65
Well, you'll just have to render and animate it yourself, using DrawingSurface functions. To get the feather effect you would need to use DynamicSprite.CopyTransparencyMask() — note that this function is slow, so could potentially cause performance issues (though it will probably be fine).

Honestly, I would suggest not doing this, and instead simply display the subtitles broken up into separate lines. You could, more easily than your proposal, write a function that will take a set of strings and display them one by one (and you could also provide timings if necessary, and possibly even allow them to skip forward in the speech clip). I also think this will be a more pleasant experience for players, since constantly scrolling text will be a distraction and interfere with people's natural reading speed.
#66
1. Whether the button is lit in this case is equivalent to "this object is visible." So you would write a check that is something like

Code: ags
  if(   oButton1.Visible
     && oButton2.Visible
     && oButton3.Visible
     && oButton4.Visible
     && oButton5.Visible
     && oButton6.Visible
     && oButton7.Visible
     && oButton8.Visible
     && oButton9.Visible)
  {
    // All buttons lit, so open door
    doorIsOpen = true;
  }

(I've split the test across multiple lines to make it easier to read—with this formatting you can see at a glance that it tests 9 buttons; you can do that but you don't have to.)

A good way to run this code would be to make a function that you call after each button is pressed.

2. In that case, you would make a global variable (for example using the Global Variables pane), for example bool doorIsOpen that is set to false at game start. As you can see, the code above sets it to true. Then in the "enter room" event of the other room, you check that variable and set the open door object to visible or not depending on whether it's true.

(A variable used in this way is often called a "flag.")
#67
Quote from: Khris on Mon 14/08/2023 16:48:10And if you create items programmatically, there should still be a global array where you can iterate over all items, so I don't think inventory[] is going to disappear?

In that case there can't be a static array, so if anything it will have to be a Vector or something, and the problem goes away.
#68
Quote from: Crimson Wizard on Mon 14/08/2023 06:47:07This is not a limitation, this is a intended behavior: the button only considered "clicked" when you release a mouse on it. It works similar to how many other gui frameworks work. For example, this is a standard behavior in Windows applications.

Though most other UI frameworks then also provide Control.OnMouseButtonDown and Control.OnMouseButtonUp events.

BTW, could your Drag-and-Drop module help in this situation?
#69
Game.TextReadingSpeed

(The two properties should probably cross-reference each other in the manual.)
#70
I mean, the problem is evidently that you cannot have 0-length arrays.

Of course, if 4.0 moves towards making it possible to create new items etc. programmatically, a very different approach is probably needed in any case, so this may not be a long-term issue.
#71
Quote from: Crimson Wizard on Sat 12/08/2023 00:40:51The standard "inventory" array is generated only if you have at least 1 inventory item.
Create 1 dummy item in your game, and this problem will be solved.

This refers to few other arrays too, the problem is explained here in more detail:
https://adventuregamestudio.github.io/ags-manual/GlobalArrays.html

It occurs to me that if AGS #defined a constant to indicate whether each built-in array existed, it would make it possible to write more robust modules that avoided/worked around this problem.
#72
A very common problem is that you're adding a YouTube link, when you're only supposed to add the YouTube video ID. Try submitting again with the minimal possible information: you can always edit it later.
#73
@Baguettator, you may want to check out the ImGi module, which allows you to create GUI Controls in script (though they're not "real" Controls, but a reimplementation using Overlays). Though since what you're trying to do isn't actually to create a GUI, you may be better off just implementing what you're trying to do yourself, as CW explains.
#74
I haven't looked at the module, but in general you'd need to add something like this:

Code: ags
  for(int i=0; i<Game.CharacterCount; i++)
  {
    Character* c = character[i];
    if(c.Room == player.Room)
    {
      // Calculate the vertical center of the character
      ViewFrame* frame = Game.GetViewFrame(c.View, c.Loop, c.Frame);
      int hotspot_y = c.y - Game.SpriteHeight[frame.Graphic]*c.Scaling/200; // c.Scaling/100 gives scaling factor, divide by 2 to get midpoint

      // TODO: Display a hotspot indicator at (c.x, hotspot_y)
    }
  }
#75
You could try using the TruBlu module's GetColorFromTrueColorRGB(255,55,255);

I'm not sure it will work. The AGS color system is an insane mess, and that it's possible to use above-16-bit color values at all is unintentional behavior, so no guarantees. (I actually thought the 248,252,248 problem had been fixed a long time ago, though.)

If that doesn't work, you can use color 15, which is at least neutral.
#76
What happens if you set it to 65536?

(Personally I usually just import a fullscreen black sprite.)
#77
Quote from: Khris on Sat 05/08/2023 14:22:01I checked this in the Tumbleweed template; the wait cursor is the crosshairs but it disappears during the fade. So I don't think it's just a matter of a missing Wait cursor sprite.

Yeah, the in-engine fade might have some special voodoo, but in that case I wouldn't expect that doing anything in repeatedly_execute_always() would work either. But the custom fade method should certainly work if the Wait cursor sprite is set.
#78
Am I crazy, or is this whole problem just a matter of setting the Wait cursor image to an actual cursor rather than a blank sprite?

To explain a little further: in AGS, when the game is blocked from player input, the cursor is set to the Wait cursor mode. This cursor mode can have a special cursor image, for example an hourglass or a stopwatch, but in many games it is simply set to be invisible instead. That's why the cursor disappears when the game blocks. If you instead set it to a normal cursor image, it should show up normally, but of course then there won't be any visual indication that the game is not currently responding to player input.

Quote from: Gal Shemesh on Sat 05/08/2023 10:52:04I just can't find a way to make the fake 'Wait' cursor (the GUI I made) to keep showing on-top of the fade when it plays - in other words, to exclude it from the fade transitions; the transitions affect it even if I set the default fade to Instant and use the FadeIn() / FadeOut() functions...

If your pseudocursor is on a GUI and your custom fade relies on a fullscreen black GUI, then it's just a matter of setting up the GUI z-order to decide whether the "cursor" is in front of or behind the black screen.
#79
The Rumpus Room / Re: What grinds my gears!
Thu 03/08/2023 11:30:59
Quote from: Stupot on Thu 27/07/2023 06:56:16I can't think of any other instance where we describe an item by the colour of the background it sits on, rather than the colour it actually is.

Apropos of nothing, here's the AGS splash screen with the big blue cup logo:

#80
Quote from: KyriakosCH on Tue 01/08/2023 18:56:04I am not sure if it is available outside book form - quite possibly it's not yet in the public domain (if that applies to his lectures, anyway). I read it in an edition of all his articles and lectures :)

It's presumably a version of the argument he makes in "On Chesterton" in Other Inquisitions, where he briefly alludes to the story.
Spoiler
As a reminder, the victim in "The Invisible Man" is a millionaire who made his fortune selling household robots, and the narrator observes:

Quote from: G.K. ChestertonAngus had suddenly the horrid fancy that poor Smythe's own iron child had struck him down. Matter had rebelled, and these machines had killed their master. But even so, what had they done with him?

"Eaten him?" said the nightmare at his ear; and he sickened for an instant at the idea of rent, human remains absorbed and crushed into all that acephalous clockwork.

Quote from: Jorge Luis BorgesIn my opinion, Chesterton would not have tolerated the imputation of being a contriver of nightmares, a monstrorum artifex (Pliny, XXVIII, 2), but he tends inevitably to revert to atrocious observations. He asks if perchance a man has three eyes, or a bird three wings; in opposition to the pantheists, he speaks of a man who dies and discovers in paradise that the spirits of the angelic choirs have, every one of them, the same face he has; he speaks of a jail of mirrors; of a labyrinth without a center; of a man devoured by metal automatons [...]

These examples, which could easily be multiplied, prove that Chesterton restrained himself from being Edgar Allan Poe or Franz Kafka, but something in the makeup of his personality leaned toward the nightmarish, something secret, and blind, and central.
[close]
SMF spam blocked by CleanTalk