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

#181
The Rumpus Room / Re: What grinds my gears!
Mon 14/10/2024 14:58:44
@Snarky I guess I just take issue with everything being called "AI" because the term loses all meaning. If I told a layperson that AIs have been around since the 90s when they moved units in Dune 2 or Warcraft 1, I don't think they'll know what I'm talking about.

Regarding the term "a bunch of if-else-statements", I don't think it's supposed to downplay the complexity of LLMs. The point is rather to clarify that there's no actual intelligence; it's still a CPU running a program. And no matter how much OpenAI might suggest it, there's simply no path to an actual consciousness, which is a prerequisite for intelligence.

My point is: laypeople have no idea how programming works. To them, ChatGPT is indistinguishable from Skynet. Buying into the hype by calling everything AI will reinforce this nonsense. That ship has sailed though I guess.
#182
CW meant that the opposite is the case: if only parts of the background need to be animated, you should use non-clickable objects instead. This also has the benefit that you are not limited to 5 frames of simultaneous animation (although it is easily possible to animate the entire background using a lot more frames if you code it yourself).
#183
The Rumpus Room / Re: What grinds my gears!
Mon 14/10/2024 00:26:08
I have a slightly different take on the "AI" situation and it fits this thread :-D

It is absolutely used as a marketing term. Ads and journalists keep calling things "AI powered" even (and especially) when the things they're referring to literally are a bunch of if-else statements. This is because laypeople and marketers do not distinguish between old-school AI and the ChatGPT type; the former because they do not understand that an AI is just an algorithm connected to a model / database, the latter because they want to deliberately blur the boundaries in order to sell more BS.

Also, social media is full of people who think that programs like ChatGPT are capable of gaining consciousness or have already gained it. That is because they do not understand that that is fundamentally impossible.

And soulless ghouls like Altman are pushing this misconception because one of the main objectives is to move culpability for workplace accidents and driverless cars killing people to AIs.

Quote from: Snarky on Fri 11/10/2024 20:53:44The mistake isn't that we're calling things AI that aren't. It's that we're not calling lots of things AI that are AI.
The correct name for 90% of things that are called "AI" nowadays is "algorithm". However this word is already used by laypeople to refer to the specific algorithm that picks the next video(s) / composes the "for you" feed. Unfortunately this is just how language works, but it still very much grinds my gears :P
#184
The Rumpus Room / Re: What grinds my gears!
Thu 10/10/2024 14:21:21
- failing at the most basic level of communication -

A client of mine wanted my help with increasing the limit for international wire transfers from currently 1000€. He showed me an email he got from the bank about how to do this.
We logged into his account at the bank and I saw that it was already increased to 7000€. I was puzzled by this but he didn't really address it...

Then he got hung up on the fact that the "Continue" button at the bottom of the form was disabled so I demonstrated to him that it only turns active once you actually change one of the values; again he wasn't really acknowledging this, as if that somehow didn't make perfect sense. (This alone is very irritating to me; you explain a simple mechanism in the most basic terms imaginable and the other person is incapable of giving a normal response like "I see" or "I still don't get it". Drives. me. up. the. wall.)

He then explained that this was what got him stuck, making me even more confused, given that a) the limit had already been increased and b) up to this point I was under the impression he hadn't done anything by himself yet. We increased it to 8000 and he put in his security code and it went through and we saw a massive confirmation message on the screen. I asked him how he missed this confirmation when he increased it to 7000 and he didn't know...

Getting more and more confused, I asked him why he wouldn't mention any of this and instead pretend as if he hadn't done anything yet after somehow receiving the email.
He then actually tells me he had already been on the phone with a lady from the bank who had guided him through the change, and he basically just wanted me to confirm it went through...!

How do you not mention this AT THE START OF THE CALL?

I mean sure, maybe he was embarrassed that he spent 15 minutes in the queue and a bunch more on the phone with somebody from the bank instead of simply calling me directly. But if the call keeps getting weirder because your support guy keeps asking about the situation, maybe get over yourself and "come clean?" Seriously.
#185
Found it, and I remember having found this before.

Open TemplateSettings.asc and find line 66:

Code: ags
  // walk to character before starting interaction
  Verbs.VerbGuiOptions[eVerbGuiApproachCharInteract] = false;

This option needs to be set to false, otherwise the template takes over the Give click and does not run the interaction function if the character fails to reach an automatically calculated target.

Edit: found the other topic; the error was just as frustrating; maybe the template should default to this being turned off
https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/character-walks-into-npc-when-talking/msg636513014/#msg636513014
#186
I used the BASS template that comes with AGS 3.6.1; I guess I should've posted the lines :-D

Anyway, simply edit your opening post to put [solved] in front of the subject.
#187
Open TwoClickHandler.asc and remove lines 235-248.
Then open the gInventoryBar GUI and set PopupStyle to "Normal" and Visible to "True".

Quote from: MiaWulf on Tue 08/10/2024 18:57:21I'm also trying to move the action bar GUI to be in a box beneath the inventory, and I'm assuming that I can just tweak the left and top variables in the inspector.
Yes, exactly :)
#188
1. is this your code or my code?
2. he makes an additional step when you click a second time, meaning that the character doesn't reach the target the first time around, which is most likely the reason the code doesn't trigger

Assuming this is my code, what happened when you ran your code with the blocking walk?

Also, feel free to PM me a link to the game so I can take a look. I have a sneaking suspicion that I can easily fix this if I have the source code.
#189
99% of the time, the answer is the usual one: the handler function isn't linked in the events table.

You copy-pasted the code, and I assume you also changed the function's name (hHotspot2_UseInv, hHotspot3_UseInv, etc.) but that code never runs unless you also put the new name next to the hotspot's respective event in the table.

There's also the issue of misplaced curly braces. The syntax is:

Code: ags
  if (condition)
  {
    statement1;
    statement2;
    etc;
  }
The braces are used to group the statements together so they all run conditionally.

In your code you did this correctly for iTomb but not the other items. It still compiles because without the braces only the statement right after the if() runs conditionally.

Finally, your approach creates a ton of duplicate code. Make sure the IDs of the inv items, hotspots and objects all have the same sequence, and you can simply add a number to the inv item's ID to get to the sprite slot. You can also use a single function for all nine hotspots.
Since AGS 3.6.1. the hotspot is passed to the handler, which means you can do:

Code: ags
function hole_UseInv(Hotspot *theHotspot, CursorMode mode) {
  int offset = 227 - iTomb.ID;
  if (player.ActiveInventory.ID >= iTomb.ID && player.ActiveInventory.ID <= iDancing.ID) {
    object[theHotspot.ID - 1].Graphic = player.ActiveInventory.ID + offset;
    player.LoseInventory(player.ActiveInventory);
  }
}

Say iTomb is inv item #14 and iDancing is #22.
The first hole's hotspot is #1 and uses object #0.
The second hole's hotspot is #2 and uses object #1.
And so on.
Assuming the sprites have the correct order, the offset between item ID and slot is 213. Adding this to for instance iHoldingOrb.ID (15) gives 228, and so on.

Since the hotspot is passed to the handler, we can use its ID to find the appropriate object ID (by subtracting 1 in my example) and the object[] array to address the room object.

If you follow all this, you can simply paste "hole_UseInv" into each hotspot's event table and you're done.
#190
Quote from: kursh on Sat 05/10/2024 17:05:51could you say how exactly do you convert? i start from a .mp4 video "Códec: H264 - MPEG-4 AVC (part 10) (avc1)" (maybe is the problem)
In my tests I don't really mess with the settings, just pick Video (Vorbis) and hit the button. Plus, if the ogv file plays fine in VLC, the issue is with AGS and needs to be fixed there.

I don't really have experience here; I simply knew that the free and very good VLC can convert video files, so recommended that instead of online conversion services with file size limits, etc.
#191
Two cents regarding this:

Spoiler
Code: ags
if(move==0){//run
        Runviewframe[limb]= Game.GetViewFrame(Skin_stuffed[limb], currentloop, currentframe);
        }
    else if(move==1){ ///idle
        Idleviewframe[limb]= Game.GetViewFrame(Skin_stuffed[limb]+1, currentloop, currentframe); 
      }
    else if(move==2){ ///atk
        Atkviewframe[limb]= Game.GetViewFrame(Skin_stuffed[limb]+2, currentloop, currentframe); 
        }
    else if(move==3){ ///kick
        Kickviewframe[limb]= Game.GetViewFrame(Skin_stuffed[limb]+3, currentloop, currentframe); 
        }
    else if(move==4){ ///Latk
        LHviewframe[limb]= Game.GetViewFrame(Skin_stuffed[limb]+4, currentloop, currentframe); 
        }
    else if(move==5){ ///sweep
        Sweepviewframe[limb]= Game.GetViewFrame(Skin_stuffed[limb]+5, currentloop, currentframe); 
        }
    else if(move==6){ ///jump
        Jumpviewframe[limb]= Game.GetViewFrame(Skin_stuffed[limb]+6, currentloop, currentframe); 
        }
    else if(move==7){ ///cry
        Cryviewframe[limb]= Game.GetViewFrame(Skin_stuffed[limb]+7, currentloop, currentframe); 
        }
    else if(move==8){ ///die
        Dieviewframe[limb]= Game.GetViewFrame(Skin_stuffed[limb]+8, currentloop, currentframe); 
        }
[close]

If you only run a single command, you can skip the curly braces. They are used to group commands together and not needed here.
You can also create the view frame first:
Code: ags
    ViewFrame* vf = Game.GetViewFrame(Skin_stuffed[limb] + move, currentloop, currentframe);
    if (move == 0) Runviewframe[limb] = vf; // run
    else if (move == 1) Idleviewframe[limb] = vf; // idle
    else if (move == 2) Atkviewframe[limb] = vf; // attack
#192
Try this:

Code: ags
function cNet_AnyClick(Character *theCharacter, CursorMode mode) {
  // approach character non-blocking
  if (Verbs.MovePlayer(cNet.x - 20, cNet.y)) {
    player.FaceCharacter(cNet, eBlock);
    // Check if the action used is GIVE TO
    if (Verbs.UsedAction(eGA_GiveTo)) {
      player.Say("Hey, do you want this?");

      // If I give him the soap
      if (Verbs.GetItemGiven() == iSoap) {
        // if NPC didn't receive soap yet
        if (!hodatosapone) {
          player.LoseInventory(iSoap);
          player.Say("Will this do?");

          // cNet's dialogue
          cNet.Say("For all surfaces, for stubborn dirt");
          cNet.Say("Muriatic acid");
          cNet.Say("Pure bleach");
          cNet.Say("Depleted uranium");
          cNet.Say("Emotoxin rattlesnake venom");
          cNet.Say("Strychnine");
          cNet.Say("Formaldehyde");
          cNet.Say("Palm oil");
          cNet.Say("WOW!");
          cNet.Say("PERFECT!");

          // Mark that you have given the soap
          hodatosapone = true;
        }   
        // If I have already given him the soap
        else {
        player.Say("I've already given him the soap.");
        }
      }
      // If I give him something else
      else {
        player.Say("I don't think he's interested.");
      }
    } else {
      Verbs.Unhandled();
    }
  }
}

It's a design choice whether the player character always approaches first or not, but this is the way all the LucasArts 9-Verb games did if, IIRC.

Anyway, you said only "give" didn't work, but this code has a blocking walk inside the handling of "give" (which is not really how the template is supposed to work) and I have no idea if that code is the one that caused the original trouble.

I fixed it in the way that I think works best with the template, and I also fixed the soap logic (you didn't check the hodatosapone variable first, so if the player can pick up more soap, they can keep giving it to cNet).
#193
This will never trigger. That function runs once after the room has faded in, but at that point Verbs.UsedAction(eGA_GiveTo) will never be true.

You need to actually click the give button, an inventory item and a character to properly test this (or simulate the action some other way, provided the template supports that).

(Also, this is why it is so important to always post your actual code. Testing it this way won't work, so getting stuck on this not working is a complete waste of time.)
#194
Once again, you need to put Display commands in your code to try and debug this.
Does the function trigger at all? Where exactly does AGS exit the function?

Edit:
I just checked my AGS 3.6 Tumbleweed example game and the "give to" action works without issue, same as the other verbs.
To debug this, we need to determine which of the two if conditions fails. I suspect it's the move part again, but if the other verbs do work, then it must be something else.

If you upload your source code and send me a link I will take a look.
#195
I recommended VLC, which has always worked fine for me. What exactly do you mean by "can't export correctly"?
#196
You were dealing with a cutscene, so the tween module took care of that. During the game, the original issue is again what's causing this. The solution is again the SmoothScrolling module, which simply fixes the scrolling of the room being directly tied to the player's x coordinate and therefore being choppy.
I want to point out that in my very first reply over two days ago I correctly identified the cause of the issue and already posted a working solution (a link to the module) that fixes both the original issue and the current one.
#197
Looks like you're using the player character for this. Walking characters usually do not move smooth because they do not have dozens of walkcycle frames and therefore will move a bunch of pixels every few frames. This will give a choppy result, which is why there are a bunch of modules that take care of this.
There's even a smooth scrolling module written specifically to address this very common issue: https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/module-smooth-scrolling-parallax-v1-7-1/
#198
Which size did you try? I once made a digital replica of my wall clock and imported a font at size 60.
This is how it looks in the 1080p game: https://i.imgur.com/fk23Gfq.png

#199
@eri0o True, but this means a 16:10 monitor will show a 16:9 game in the "correct" resolution with narrow black borders at the top and bottom (like we're used to from watching movies anyway), while a 16:10 game on a 16:9 monitor will have bars on the sides and more importantly will be scaled down to fit vertically by a factor of 0.9. This sounds way worse than the former.
#200
Can you show the code you're using? For instance, is the DynamicSprite created with an alpha channel? Are you clearing the DS using COLOR_TRANSPARENT, etc.

The issue used to be that drawing an alpha channel PNG to a cleared DrawingSurface ruined the transparency because there was no color to blend the semi-transparent pixels with. Afaik this has been resolved though, but I'm not sure.

If you're drawing the three sprites to a new sprite, try creating a copy of the first sprite and drawing the other two to its surface instead.
SMF spam blocked by CleanTalk