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 - Crimson Wizard

#2161
Quote from: Gal Shemesh on Wed 21/06/2023 15:32:37on 'Voice Only' mode the cursor remains as it was instead of changing to the hour-glass, and once the sound finished playing you actually have to make another click before the mouse cursor can return to interact with the environment;

This sounds like a bug in the engine.
#2162
Quote from: Gal Shemesh on Wed 21/06/2023 10:03:16As you can see in the screenshot below, there's more 'gap' below the Hebrew characters - gap which is based of the English characters height. Moreover, some characters like punctuation marks are shared between both languages if they're both on the same font file, and so it makes their alignment to one of the languages to look odd as you can see.

Well, it's the general issue when using fonts that contain multiple languages, just like any Unicode fonts for instance. Of course, the font height is a fixed value, and engine uses it and not the particular letter sizes when aligning the text, or wrapping a text, breaking it in several lines with vertical gaps in between.
This is more a question of designing a font well.

If that bugs you, options are to redesign the multilang font, or use separate fonts per language, where you would adjust punctuation for each language separately.


Quote from: Gal Shemesh on Wed 21/06/2023 10:03:16The other problem I find is if say a game has more than 2 languages - everything regarding speech will be okay as the appropriate language font index number can be set in the translation file. But all the GUI elements will be based on font index 0 which has only up to 2 sets of language characters. So the 3rd language and above won't be able to reflect for GUI elements if I understand it correctly...

Yes, like I mentioned, GUI fonts are not remapped automatically by the translation's option. This is current limitation of AGS: if you add a language, which requires another font, then you need to also add this font into the game, and order GUIs to swap to that font depending on current translation in script (either on startup, or after the language is changed in game menu).

The existing alternatives currently are:
1) Switch to Unicode mode (this is default since 3.6.0, unless you imported an older project), and provide unicode fonts that contain multiple languages. Then these fonts could be used for all or most of the translations.
2) Provide a font file replacement by manually placing it in the game dir along with translation. This will of course "lock out" other translations, and require another manual replacement to play with another language. This method is commonly used with "unofficial" translations.
#2163
@Gal Shemesh I corrected my reply once more after you replied, with example, please re-read it again.
#2164
I believe that Display (and all its functions family) can play voice precisely the same way as Say command does, if you call your voice files NARRXXXX.

Correction: Display uses a character index set by game.narrator_speech. It equals default player char on startup, but if this value is -1, then it will use NARRX files.

See here: https://adventuregamestudio.github.io/ags-manual/Gamevariables.html

Code: ags
Display("&1 Bla bla bla");
will play voice file 1.

EDIT: the manual should be updated, this essential information needs to be added to "Display" article, and also to "Voice speech" article
#2165
Quote from: Gal Shemesh on Wed 21/06/2023 00:21:42Thanks for the workaround code. But won't it be a static solution only for the font that is set there? I mean, the idea I had in mind is that the GUI font will be different for either English and Hebrew - again, only so I could have taller / shorter letters for each language. Otherwise from what I had checked, if both languages are set on the same 256 characters font set, the height of the font will be based on the taller character in the entire set. So if I have taller English letters and shorter Hebrew ones, the Hebrew ones will look like they have a gap of empty space from top / bottom...

I'm sorry, I could not understand what you are asking about exactly?
The GUI are aligning text according to the font size, if a Font reference is changed in script, then it will recalculate text's position accordingly.
#2166
Quote from: Sinitrena on Wed 21/06/2023 00:13:35Doesn't // usually mean that that part of the script is commeted out and the editor therefore won't run this line? Try removing // in front of your code.

Translation files use comments to also have options.

https://adventuregamestudio.github.io/ags-manual/Translations.html#additional-options
#2167
I need to clarify, how do you see that the font is not replaced? Do you refer to the GUI?

If i remember right, the GUI fonts are not replaced by translation options at all. These options affect only speech and messages done using Display.
NormalFont is for general messages, SpeechFont is for the speech only.

If you need to replace fonts on GUI, you need to run over all guis and replace the font property on all eligible controls
Spoiler
Code: ags
function ReplaceFontOnAllGUI(int old_font, int new_font)
{
    for (int i = 0; i < Game.GUICount; i++)
    {
         for (int j = 0; j < guis[i].ControlCount; j++)
         {
              GUIControl* c= guis[i].Controls[j];
              Button* btn = c.AsButton;
              if (btn != null && btn.Font == old_font)
                   btn.Font = new_font;
              // and so on
         }
    }
}
[close]
#2168
This is a known issue in the old version of template, where the script logic relied on the human-readable text.
The newest version of template should be fixed since AGS 3.6.0.

Here's the fixed code:
https://github.com/adventuregamestudio/ags-template-source/blob/169184f96a559b392f5205054d218440f1b0cd46/Sierra-style/GlobalScript.asc#L384-L401
#2169
Sorry for the silly question, but have you recompiled translation after changing this?

Quote from: Gal Shemesh on Tue 20/06/2023 12:52:07As for the outline font question, since it's not mentioned in the translation file instructions, is whether there's a "//#SpeechOutlineFont=" option for setting up a custom outline font for the engine to pick if run in Hebrew from the game setup?

No, but you may configure this in the Hebrew font itself (in the editor).
#2170
I noticed this recently when investigating how RTL works in AGS. This is the original behavior, and I have no explanation to this. Could be an oversight of the AGS creator, or some hidden intent which meaning was lost in time.

I would also test other things, such as ListBox and TextBox.

This could be fixed in the upcoming version 3.6.1, or a patch to 3.6.0.
#2171
So, Morgan told me that the building process excludes all pages starting with underscore "_", therefore one may create pages like "_InventoryItems" and they won't get included.

Moved Game Features list and Inventory Items to the hidden names for now:
https://github.com/adventuregamestudio/ags-manual/wiki/_GameFeatures
https://github.com/adventuregamestudio/ags-manual/wiki/_InventoryItems
#2172
If I remember correctly, AGS has a hardcoded limit to 128 characters when importing SCI format.

If you upload this font, I might look if it feasible to safely load it without breaking 128-long fonts.
#2173
Quote from: cat on Sun 18/06/2023 20:17:12The "inside the treehouse" was because I think the main point of room 1 is to show how to open a door and change to another room, a very basic and very important feature that is used in so many games.

Ah, I see.

I wonder if this will be fine if the interior of a treehouse had 2 exits, both leading to room 1, but one placing character at a door and another at a balcony. That would illustrate that you may use ChangeRoom to enter in different places even if you come from one room.
#2174
Quote from: Snarky on Sun 18/06/2023 20:07:04I think it's worth pointing out that in the example shown, the easiest solution is to pad out the background with a black bar on top so that it's 320x200.

How is that easiest, compared with few lines in script?
(The easiest imo would be if AGS let you configure this in the editor)
#2175
Quote from: cat on Sun 18/06/2023 19:49:48I think the door should open to a different room, it could be inside the treehouse. The many paths also seem a bit complicated, different walkable areas will be covered in the next room with the bridge.

Hmm, I have an opposite opinion, imo it's fine to have a number of demonstrated features in one room so long as they don't disperse attention. This makes the demo more "condensed". If there's 1 feature per room, rooms will feel empty.

After all, rooms may be logically divided into visible sections, where each section has a noticeable feature.

If I understand correctly, the "bridge" room is the one where the walkable area gets disabled and enabled? This seems distinct enough to allow more than 1 walkable area in a previous room.
I.e.:
- room 1 shows that you may have several "locations" defined by walkable areas.
- room 2 shows that these areas may be manipulated with, turning them on and off, allowing to walk between; and then shows that you may have other kinds of regions too (looking at your feature list on the previous page).

That is, unless you insist on each room be dedicated strictly to 1 feature / game element and everything related to it.
But imo combining few things in one room makes a more curious exploration experience. This also makes things feel more natural, closer to real game.
#2176
Quote from: cat on Sun 18/06/2023 15:37:56But does this mean that the sprite file doesn't have to be checked in? I think this hugely improves collaboration. And size of the repository.

That is true, it does not have to be checked in.

Although, you have to keep in mind that the spritefile recreation is basically a full reimport, and takes time proportional to the number of sprites and their resolution.

EDIT: Somehow I have a copy of this full-length game source in my temporary possession (i was doing some engine bugs research in it):
https://www.adventuregamestudio.co.uk/site/games/game/2330-mage-s-initiation-reign-of-the-elements/
This is a 640x400 game, with roughly 300 MB amount of sprites in png format.
I made a test on it, first exporting all sprites and remapping "source" link to these exports, and then tried full sprite file recreation.
Recreation takes about 30 seconds on my PC.

NOTE 2: this does not help with room bgs though, unless you are using ags4 where rooms are split into multiple files.
#2177
Hello.
Yes, since AGS 3.5.0 you may freely set room position on screen using Viewports. Screen.Viewport is a primary viewport.

For example
Code: ags
Screen.Viewport.SetPosition((Screen.Width - Room.Width) / 2, (Screen.Height - Room.Height) / 2, Room.Width, Room.Height);

Will center current room in the screen.

You probably should do this in "on_event" function, on "eEventEnterRoomBeforeFadein" event, - then this will be performed each time a next room is loaded.

IMPORTANT
AGS automatically handles coordinate conversions (such as offsets) when using functions accepting screen coordinates like Room.ProcessClick or Character.GetAtScreenXY, and so forth, so you don't have to worry about that.
But if you're using functions that accept room coordinates and want to pass screen coords there (or vice versa),  then you should take offsets into account, or use Screen.ScreenToRoomPoint and Screen.ScreenToRoomPoint functions respectively. Same is true for scrolling rooms case.

For example:
Code: ags
// will work fine, AGS converts mouse coords to room automatically
Room.ProcessClick(mouse.x, mouse.y, mouse.Mode);

Code: ags
// Imagine you want to move character to the cursor pos
Point* room_pt = Screen.ScreenToRoomPoint(mouse.x, mouse.y);
player.x = room_pt.x;
player.y = room_pt.y;

Related articles in the manual:
https://adventuregamestudio.github.io/ags-manual/Screen.html
https://adventuregamestudio.github.io/ags-manual/Viewport.html
https://adventuregamestudio.github.io/ags-manual/Globalfunctions_Event.html#on_event
#2178
Quote from: cat on Sun 18/06/2023 10:33:18Btw, I haven't been using the newer versions of AGS (been some time since my last game) - how easy is it now to collaborate? Is there still that huge sprite file that is impossible to merge? I.e. we need one dedicated person to take care of importing sprites? Or has this improved?

No, nothing has improved. Rooms storage was improved but it's in AGS 4 alpha.

The only thing that makes it slightly easier with sprites is that now there's a "recreate sprite file from sources" command in the editor, which makes sense if the source images are stored inside the project folder.

And there's still a problem of sprite numbers: if they conflict then you cannot merge game.
#2179
Quote from: cat on Fri 16/06/2023 16:56:35I don't know if translation is a thing, but we should consider making the labels as separate sprites. The map could also be implemented as GUI with labels.

You may have GUI with labels, but also a room with objects.
In case of a room you could make a mini-character going around the map, similar to Monkey Island 1 or Hero Quest. (It's theoretically possible to do on GUI, but then you will have to implement your own pathfinding)
In case of GUI, it's easier to setup textual items (with objects you'd have to create sprites, or dynamic sprites with translated text at runtime).
#2180
I forgot to post this earlier, but here's a game I've been thinking about as of a reference:
https://archive.org/details/openquest

I don't remember all details, but iirc it's either 1 or 2 rooms game with a simple sequence of actions.
It was an original candidate for a new demo game back in mid-2010ies, at least in my mind, but it's made in AGS 2.72 and uses a number of obsolete features, so would need to be upgraded anyway.
EDIT: the archived version does not include the sources unfortunately, and I cannot remember if I had them anywhere.

Another example of a good "simple demo" style, at least imho, could be this game:
https://www.adventuregamestudio.co.uk/site/games/game/1208-awakener/

This is all just for the reference, to illustrate what I had in mind when proposing to make a simple demo game.
SMF spam blocked by CleanTalk