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

#1
@alzabel
Press F7 so the game is compiled, then use the Windows Explorer to go to the game folder, then to Compiled/Windows. In there, run winsetup.exe and you can pick a scaling method for fullscreen and window mode.
Provided you didn't change the relevant setting in the editor's preferences, this configuration is now used when you run the game from the editor by pressing F5.

As for the resolution: 320 was the width used by games from like the late 80's till the early 90's roughly. If you want to recreate the classic/pixelated/retro look and yes, use pixel art, this is probably what you should pick. Use 180 as the height and you can use x4 or x6 scaling for fullscreen modes supported by pretty much all modern machines. (example: MI2)

For vector based graphics you'll want a high resolution, one where individual pixels are not visible. Same for hand-drawn backgrounds, or a cartoon style and the like. I'd probably pick 1280x720 in that case, since there's still lots of laptops with 1366x768 and similar resolutions around. (example: A New Beginning)
#2
Wordle 880 4/6

⬜🟩⬜⬜⬜
⬜🟩⬜🟩🟩
⬜🟩⬜🟩🟩
🟩🟩🟩🟩🟩

Bah

Edit: why does yours have black for the misses...?
#3
Another thing I want to make clear because you said you're very new to AGS:
If you just want to increase the window size, there is no need to increase the game's resolution.

The game's resolution should be based on the kind of graphics you want to use. A 320x180 game can be upscaled to Full HD when running it.

I'm primarily noting this because you seemed to want to upscale the GUI graphics automatically. There's no good reason I can think of to ever want to do this. Depending on the upscaling filter you'll either end up with extremely ugly sprites or needlessly upscaled ones.

What is your goal here? Why do you want to increase the resolution in the first place?
#4
AGS will just calculate a factor (or two I guess, if the width changes by a different factor than the height) and apply that to GUI sizes and positions and also GUI control sizes and positions.

You only have the option to do this automatically after changing the game's resolution, afaik.

However, increasing the resolution of the Sierra template to 640x400 will completely ruin the existing GUIs if you choose to also resize them. The button images will not scale up, so you'll end up with images that only cover the top left quadrant of the button.
You'll also want a bigger font. You can replace the small font used for the GUIs by opening the first font (0: Normal) and clicking the "Import over this font..." button. Pick a font and a larger size like 20. This should more of less fix the text aspect of the buttons.

If you want to simply upscale the button images for now, you have to do it manually. If you set up your image editor in the preferences, you can edit the sprites directly by double-clicking them. AGS will now open the editor and pass the image. Resize it, then save and close, and AGS will replace the sprite using the resized version.
#5
I just tried this with 3.6.0 and creating a new game from the Sierra template; right after changing the resolution I get this:



However this resizing is pretty useless anyway imo because you'll usually want pixel-perfect GUI elements that fit the actual resolution so for an actual game you'll rework the GUIs anyway.
#6
Can you give some information about your game?
What is the resolution? How big is the apk? How many sprites?
Etc.
#7
You can also take a look at the AddWaypoint() function. It should work with blocking walks, too.

https://adventuregamestudio.github.io/ags-manual/Character.html#characteraddwaypoint
#8
Hey Alexei, welcome to the forums  :)

Can you please re-read and fix your post? Because your code and your post says 1. walk 2. talk.
Is this the order you want or not? Or is something else not working as intended?

Quote from: Alexei101mercurio on Mon 13/11/2023 04:15:43So here I want June to walk first and start dialogue after and only after that. But she starts with walking towards the sea which is breaking the in-game rules so to speak.

What does that mean exactly?
#9
The third line contains the location of the user.config file. Delete this file, then try again.
(It is not vital at all, it just contains a few basic settings and a list of previously opened AGS games).

If that does not fix it, you can also try deleting the entire C:\Users\user\AppData\Local\AGS folder.

#10
@eminigalaxy
I'm not sure what the exact error was but it seems to be working now.

For anybody who is curious:
Spoiler
Code: js
// this causes nonNormal[1] to be undefined
const nonNormal = [...wordList].filter(was => was?.words[0].Type !== "Normal");

// this however works fine???
const nonNormal = wordList.filter(was => was?.words[0].Type !== "Normal");
[close]

Please try again.
#11
@eminigalaxy Can you PM me a link to your .ags file so I can test this?
#12
@eminigalaxy

Hmm, it works fine for me. Can you press F12 and switch to the Console tab, then try and import the text file? If there are errors, they should show up.
#13
Quote from: amigo240480 on Thu 09/11/2023 20:02:48Is this because I need to start using script now ?

Yeah, that's the gist of it.

To send an NPC to specific coordinates, use the RunScript action at the top the dropdown. Click the "Edit Script..." button, then write something like this in the script window that opens:
Code: ags
  NewRoomNPC(2, 3, 123, 45);
Now select "Save changes and exit" from the file menu.

This example command sends character #2 to room #3 at coordinates 123, 45.


AGScript has come a long way since then, version 2.7 was in fact released 18 years ago and featured a complete redesign of the language, allowing you to use cNPC.ChangeRoom(3, 123, 45); instead, among numerous other improvements.
I understand that it's hard for you, but the basic mechanisms haven't really changed at all. If you haven't already I recommend taking a look at version 3.4.3 for an experience much closer to the old editor but also much less outdated.
#15
The code that sets your flags based on the properties uses old coordinates.
You need to do
Code: ags
        context_x = mouse.x;
        context_y = mouse.y;

first. Move these two lines up, above the two blocks that check the properties.

Also, resetting the flags needs to happen right before they are potentially set.
Move up the three lines below interface.Visible = true;, also above the mentioned two blocks.

Referring to the first snippet, cut lines 36, 37, 53, 54 and 55 and paste them between lines 24 and 25.
#16
I'm going to go out on a limb and say it's your code that's causing this.
Could you post the relevant lines...?
#17
I don't think that's going to work.

But like I said, just change the code you yourself added to the script, the part where you set the three flags to true.
If you simply also set them to false if the condition isn't true, that should do it.
The code should be in the module's on_mouse_click function, in the block that ends with
Code: ags
        interface.Visible = true;
#18
In case it helps: I can reproduce the issue the 3.6.1 version has.

The 3.6.0 version runs fine for me, no audio delay / stuttering whatsoever (Nokia 7.2 / Android 11).
#19
You also need to reset your variables to false.

At the point where you do
Code: ags
  if (some_condition) ThingToPickUp = true;

do this instead:
Code: ags
  ThingToPickUp = some_condition;

Otherwise ThingToPickUp will remain true and unexpected results will occur.
#20
The problem seems to be this part:

Code: ags
        if (control == btnUse) {
          if (ThingToPickUp == true) {
            action_label.Text = String.Format("Pick up %s", context_text);
          } else if (DoorToOpen == true) {
            action_label.Text = String.Format("Open %s", context_text);
          } else if (PlaceToInspect == true) {
            action_label.Text = String.Format("Check %s", context_text);
          }
        } else action_label.Text = String.Format("%s %s", actionmap[control.ID], context_text);

Using proper indentation you can now see that if the execution enters the control == btnUse block but then neither of the three variables are true, the code simply does nothing.
You need to change the code so that some label text is always assigned. The easiest way to do this is to simply execute the default line first, then let the special handling overwrite the label:

Code: ags
        action_label.Text = String.Format("%s %s", actionmap[control.ID], context_text);
        if (control == btnUse) {
          if (ThingToPickUp == true) {
            action_label.Text = String.Format("Pick up %s", context_text);
          } else if (DoorToOpen == true) {
            action_label.Text = String.Format("Open %s", context_text);
          } else if (PlaceToInspect == true) {
            action_label.Text = String.Format("Check %s", context_text);
          }
        }

Also note that this can be refactored into:

Code: ags
        String action = actionmap[control.ID]; // default verb
        if (control == btnUse) {
          if (ThingToPickUp) action = "Pick up";
          else if (DoorToOpen) action = "Open";
          else if (PlaceToInspect) action = "Check";
        }
        action_label.Text = String.Format("%s %s", action, context_text);
SMF spam blocked by CleanTalk