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

#281
Quote from: Crimson Wizard on Fri 06/01/2023 10:08:59But warnings regarding missing sprites should be added of course, imo that's an oversight that there was none at least printed to warnings log.

I'm not convinced. Consider something like:

Code: ags
DynamicSprite* dsFluid;

  // ...
  for(int i=0; i<simulationSteps; i++)
  {
    fluidSimulation.AdvanceSteps(1);
    dsFluid = fluidSimulation.Render();
    btnDisplay.NormalGraphic = dsFluid.Graphic;
    Wait(1);
  }

In other words, a button displays a dynamic sprite, and this sprite is updated to do some animation (by switching the pointer to a new dynamic sprite rather than by redrawing onto its drawing surface). In this case, the old dynamic sprite no longer "exists" (refcount==0) as soon as dsFluid is reassigned, and so btnDisplay.NormalGraphic is invalid at that point. Of course, we're just about to update it in the next line.

Should AGS throw a warning (or actually, simulationSteps warnings) about that? Seems like it would clutter up the logs.
#282
Quote from: jumpjack on Fri 06/01/2023 08:47:50I think the main issue is that the engine should not go on with an arbitrary value for the sprite: a program should never act "on its own", inventing a pointer!

It's not an "arbitrary value," it's 0, aka null. (And it's not strictly speaking a pointer, but a table index.) That sprite 0 is bluecup, and that this is the default AGS sprite when no sprite has been set, is explained in the basic "How to use AGS" tutorial:

QuoteAs if by magic, a blue cup appears! This is the default sprite in AGS, and will appear anywhere that you haven't selected a proper image yet.

It wouldn't make sense for the engine to crash whenever a DynamicSprite is deleted that is used as a graphic by some in-game entity, because it could very well be that this entity is not currently visible, or is just about to update to use some other sprite, etc. Users would have to manually keep track of and remove any reference to its sprite ID before deleting it, which would be extremely tedious. The chosen solution is textbook, simple and effective, and requires only minimal competence with AGS to understand.

In any case, this is not the root of the problem here. But sure, keep blaming AGS for your own mistakes.
#283
The Rumpus Room / Re: *Guess the Movie Title*
Thu 05/01/2023 23:29:38
That second screenshot looks like a reference to the painting Christina's World by Andrew Wyeth, but that doesn't really help to identify it, since the movies the Internet mentions as referencing it—Forrest Gump, Oblivion (2013), I'm Thinking of Ending Things, Tideland, Days of Heaven—don't seem like viable possibilities.
#284
I'm seeing the right date and time when logged in, but get the March date if I log out.
#286
Though I don't think people in the UK were using traditional torches much by the time flashlights were invented. They had gas lamps or lanterns.
#287
Quote from: jumpjack on Wed 28/12/2022 19:35:43Yes, this is why it looks like a bug: because the character nonwalkable area behaves differently depending on what touches it: a solid body can't cross it, a solid wall can cross it.

It's not a bug, it's perfectly consistent behavior. Characters have a position coordinate. Walkable areas define where characters can walk, i.e. their valid position coordinates. The blocking rectangle has nothing to do with it; it is strictly about how close other characters can get to the character, and this is very clearly documented.

It is not a matter of collisions, as you seem to take it. For example, two characters' blocking rectangles can intersect without problem—no "solid body collision check" is made. It's just that their positions can't enter inside the other character's blocking rectangle (while walking normally).
#288
I suppose the pathfinder might be relevant for NPCs, but it's still not clear why you would need to customize it.
#289
Quote from: jumpjack on Tue 27/12/2022 10:48:55In other words, the non walkable area surrounding player's feet, currently used to avoid collisions with other characters, should be used also to avoid collisions with nonwalkable areas.

That cannot be done.

Quote from: Crimson Wizard on Tue 27/12/2022 11:49:06Cannot you make the non-walkable areas wider, giving them the extra "outline", so that the character walks at certain distance from the forbidden tiles?

... But this could be a workaround.

IOW, instead of extending the character's position coordinate e.g. 10 pixels in each direction, you contract the room's walkable area 10 pixels in each direction, and the end result is (more or less) the same.

None of what you have said provides an argument for why this solution is not workable.
#290
I felt the opposite: this gave me more Christie vibes than the first one. What do you see as the Dan Brown connection? He's not known as a writer of detective mysteries, is he? (Oh, I suppose you mean the puzzle boxes. Were you sorry they did not play a bigger part?)

It has also been pointed out that Glass Onion owes a lot to Stephen Sondheim's (and Anthony Perkins') The Last of Sheila (1973), which explains his cameo. I haven't seen that, but now I want to.
#291
No, AudioChannels are persistent throughout the game, so they can be non-null without any playing clips.

The analogy I use is that AudioChannels are like individual cassette players, and AudioClips are like tapes that you load and play on them.

As for your null checks, it depends on your logic. If you set things up properly, I would think that you could ensure neither Music nor music1 could be null (as long as audio is available at all; AGS does not deal well if the system does not support sounds).
#292
You would get this error if music1 is null, which you do not check for.
#293
CleanTalk now lets me post and even perform moderation, but it won't let me use search when I'm on VPN.
#294
After the disappointments of Amsterdam and See How They Run, I was thrilled that Glass Onion (now on Netflix) lived up to my expectations. It is ridiculously good fun, better than Knives Out; a real tribute to Agatha Christie (the setup is very similar to And Then There Were None, and there are elements of The Mirror Crack'd from Side to Side) and the star-studded Christie adaptations of the 1970s, with famous faces popping up in bit parts every other minute.

From the opening, where the world's greatest detective, Benoit Blanc, is spending the pandemic in the bath playing Among Us with real-life Angela Lansbury (username "MurderSheSolved"), Kareem Abdul-Jabbar, Stephen Sondheim and Natasha Lyonne—and losing—I was grinning throughout. The spoofing of the ultra-rich offers a wealth of great gags, and the jabs at its fictionalized Elon Musk, "Miles Bron," seem prescient in light of his recent Twitter debacle.

The case is not terribly complex or taxing (a plot point in itself), but it's a proper fair-play mystery with all the clues provided. In fact, you actually see the murder committed, though your eyes will probably be too distracted to notice.
#295
The Rumpus Room / Re: Merry Christmas ^^
Sun 25/12/2022 08:31:58
Have a happy Christmastime, all!
#296
Yeah, you may have to rethink the logic behind this code; I think you must have gotten confused. HasInventoryItem can only return true or false, so it won't work in a switch statement (with more than two cases). And if you want to branch depending on what inventory item the player has, you need to consider what will happen if the player has more than one item in the inventory, as arj0n says.

Did you perhaps mean to use Character.ActiveInventory? In that case, you could do something like:

Code: ags
if(player.ActiveInventory != null)
{
  switch(player.ActiveInventory.ID)
  {
    case 1: do this; break;
    case 2: do that; break;
    default: yadda yadda; break;
  }
}
#297
Quote from: lapsking on Wed 21/12/2022 12:45:41
Spoiler
the player has to put tinder on the wood in the room. Then scrape down the flint (item) with his dagger (item) to make sparks on the tinder (object) to start a fire.
[close]

I would suggest doing this in a pretty traditional inventory manner:
Spoiler
Combining dagger and flint creates spark item in inventory. (Ideally, spark item disappears after a few seconds if not used.*) Put tinder on wood, create spark, use spark on tinder. (If player uses spark on wood without tinder, give feedback that the fire doesn't catch.)

* You can use a Timer to remove it. And you can use some Ron Gilbert-style "elastic time" to make it feel more urgent while not making it too difficult. Say for example that the spark goes away after 5 seconds, but if you select it as your inventory item, that gets extended by another 5 seconds, giving you 10 seconds from creating the spark to using it.
[close]
#298
The Rumpus Room / Re: Guess the TV show
Tue 20/12/2022 17:28:32
Yep yep yep. Another time-travel show, with Dillahunt in the (T1) Arnold-analogue role. I suspect the fantasy movie playing on TV (his Terminator character takes on the identity of a B-movie actor) is in part a wink at Conan.

As I recall it was surprisingly decent.
#299
The Rumpus Room / Re: Guess the TV show
Tue 20/12/2022 12:41:30
Steady on:

#300
Quote from: LimpingFish on Mon 19/12/2022 21:03:51But, as I said earlier, if cloning video games (or movies, for that matter) is more or less accepted part of the video game industry, can you clone a song? Is Ray Parker Jr.'s Ghostbusters not just a clone of Huey Lewis and the News' I Want A New Drug?! 8-0 /s

I know a court thought so, but I've always found that a bit ludicrous. They're both ripping off Bar-Kays' Soul Finger, which to my ears Ray Parker Jr.'s track resembles more than it does Huey Lewis's.
SMF spam blocked by CleanTalk