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

#1621
Quote from: cat on Wed 07/02/2024 19:44:32I have a very weird issue with 3.6.1 (RC2 and RC4) related to "ShowPlayerCharacter". When I set this to false in my starting room (a title screen) the mouse cursor is invisible.
<...>
I can directly relate this to the "ShowPlayerCharacter" setting of the starting room. I searched the manual but wasn't able to find anything related to this setting. Is it even accessible in code?

According to the engine code, "ShowPlayerCharacter" disables the "Walkto" cursor mode.
Accidentaly, BASS template uses "Walkto" mode as default, even though it's just a pointer graphic.

Possible solutions are:
1. Fix BASS template to use another default cursor mode instead, like Interact or Pointer.
2. Enable "Walkto" mode right after room is loaded (using Mouse.EnableMode().
#1622
Updated to RC4
(Please use download links in the first post)

Editor:
 - Fixed "Auto-number speech lines" and "Create voice acting script" operations failing if a Character's name contains underscore.

Compiler:
 - Fixed escaped character literals not being parsed correctly. This makes character literals like '\n' and '\t' actually work in script.

Engine:
 - When Texture Cache is comparable in capacity to the Sprite Cache, the engine will skip storing raw sprites in the cache when creating textures from them, in order to avoid meaningless duplicate memory usage.
 - Ensure that when Overlays have identical ZOrder they will be sorted in the order of their creation. Besides convenience, this is also meant to restore historical behavior from before Overlay.ZOrder property was introduced.
 - Improved OpenGL texture management, which should result in less system and video memory spent on sprite textures.
 - Fixed OpenGL renderer causing scaled sprites to have colored outlines sometimes while using Linear filter.

Windows:
 - 32-bit Windows engine is now built as "large address aware" program, which will allow it to use up to 3 GB of RAM on 32-bit systems and 4 GB of RAM on 64-bit systems (was 2 GB previously).

WinSetup:
 - Added options to disable particular graphic drivers and graphic driver selection.
#1623
All the blocking Say functions are controlled by Speech.SkipStyle and other properties from the Speech group:
https://adventuregamestudio.github.io/ags-manual/Speech.html#speechskipstyle

When you need to apply this setting only for particular Say* call, it may be more convenient to write a custom extender function that toggles setting, calls SayAt, and toggles setting back, for example:

Code: ags
function SayAtNoSkip(this Character*, int x, int y, int width, const string text)
{
    int old_style = Speech.SkipStyle;
    Speech.SkipStyle = eSkipTime;
    this.SayAt(x, y, width, text);
    Speech.SkipStyle = old_style;
}

and used as
Code: ags
WhateverCharacter.SayAtNoSkip(100, 50, 200, "bla bla");


Of course there are other solutions that do not use character speech, such as: text overlays and displaying text on GUI label. These would require to make your own blocking timer using Wait command, like:

Code: ags
SubtitleLabel.Text = text;
SubtitleLabel.Visible = true;
Wait(time);
SubtitleLabel.Visible = false;

Above also may be put into a custom function for easier use.
#1624
Quote from: Alice24 on Sat 03/02/2024 14:17:431) I got one sprite that's a bit too small but I don't want to reupload/recreate sprite, just wanna scale it. Trying to follow the example of 'character.scaling' but no luck.

guard.ManualScaling = true;
guard.Scaling = 50;

Gives me a parse error: unexpected "guard"

This is not a issue with scaling, but likely you put this code in an incorrect place. All the commands in AGS script must be placed inside some function. For example, you could do this in "game_start" if you want to set this up only once for the rest of the game, or particular room's event "before fade-in" which is called when room is loaded.


Quote from: Alice24 on Sat 03/02/2024 14:17:432) I'm using continuous scaling at the moment, but is there a way I could also scale the characters in the editing window before I click play? Because right now they're taking up a huge amount of space.

https://ibb.co/c6jb42m

No, unfortunately, Editor does not scale characters at the moment.
#1625
AGS as software is free of charge to use for any purposes, both commercial and non-commercial.

More detailed license information is present in the manual:
https://adventuregamestudio.github.io/ags-manual/Copyright.html
#1626
Quote from: imagazzell on Sat 03/02/2024 01:42:46Sidenote: Is there an easy way to package the build files into an Install Wizard style installer to load onto other people's systems like most programs, or is it better to just have them handle placing the files wherever and putting a shortcut on their desktop?

We use InnoSetup for AGS itself, it's free and may suit games too:
https://jrsoftware.org/isinfo.php

although it may take some time to learn, because it's script based.
#1627
Quote from: imagazzell on Sat 03/02/2024 00:19:56It's pretty big (6+ GB).

(Could the large file size be the issue? Should I try splitting the resources? If so, what MB-sized chunks are good?)

This is not usual for AGS games to be that large...

If that helps I might suggest to disable "Attach game data to exe"; with that you likely won't have to split resources. I would suggest it anyway, even if not for this case, because sometimes Antiviruses don't like when some data is appended to game.exe, and game keeps reading from its own executable.

Another thing regarding antiviruses is that when exe is big, they may scan it for a pretty long time, making game launch with a visible delay.

Now, as for why did that cause problems... very large game files (> 2 GB) are theoretically supported starting with AGS 3.5.1. So unless there's some case which we missed, maybe there's additionally some system restriction... Not sure about that though.

Quote from: imagazzell on Sat 03/02/2024 00:19:56PS: I chose 1024 MB (1 GB) as the resource chunk size. Is that good or would another size be better? Interestingly, that setting only resulted in two split resource files, the larger still being over 5 GB, where I was expecting ~6 files of 1 GB each... Hmmm.

Some data in game cannot be split in parts so it must stay in one chunk, usually this means that you have a very large spritefile.

EDIT: I just noticed that you do not have enabled Sprite compression in settings. I might recommend try enabling it and see how much that reduce the game size.
Although TBH in pre-3.6.0 sprite compression was rather lame, mostly suited for low-res old-school gfx.
#1628
Quote from: imagazzell on Fri 02/02/2024 21:05:11I guess it must be something to do with my game, but what? Are there any specific settings I should be checking in General Settings or Default Setup that I may be missing?

I cannot think of any setting that would prevent an exe to at least start with "not a valid Win32 application" error, or similar. The game may fail later if something is missing in files, or not correct in script etc, but that would be after it runs, and it would display a respective error message.
I don't see anything unusual in the settings either.

Could you upload your game.exe somewhere to let us check it out?

Have you been able to run some other ags games, made by other people, on the same computer?
#1629
Quote from: imagazzell on Fri 02/02/2024 20:06:48My attempt to compile the game in AGS 3.6 on the Win 10 PC has also failed. Windows Security blocked what it detected as a threat ("Trojan:Win32/Bancteian!pz" affecting the file "RCXD099.tmp" in the Compiled\Windows folder), and AGS reported: "Unable to set EXE name/description: LoadLibrary failed".

So, this is something that started happening relatively recently, after one of the Windows Defender updates, and been affecting other people too:
https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/compiling-errors-due-to-virus-scanner/

It's theoretically possible that the same reason is preventing from running game exe made by AGS 3.5.1.

The solution is to add your game folder to the list of exceptions in Windows Defender. Also it would be nice if more people sent "false positive" reports to Microsoft using this address:
https://www.microsoft.com/en-us/wdsi/filesubmission
#1630
Quote from: imagazzell on Fri 02/02/2024 20:06:48
Quote from: Crimson Wizard on Fri 02/02/2024 19:42:50Can you run the game from Compiled/Windowed folder at all after you compile it with AGS?
As mentioned in my last post, I'm getting errors trying to run it on the source computer as well ("not a valid Win32 application").

Were you able to run the game at all, for example, as a test run from the Editor? Have it run before?

Maybe the engine exe got corrupted in the AGS program files, and reinstalling AGS then recompiling the game might help...
#1631
Only AGS Editor requires .NET Framework. Games made by AGS do not require .NET at all to run.

Which version of AGS are you using?
Can you run the game from Compiled/Windowed folder at all after you compile it with AGS?
Which files are present inside that folder after compilation?
#1632
The engine we distribute is a 32-bit program, this will make games run on both 32-bit and 64-bit Windows.

Looking for a description of this error message, it seems besides other things it may be displayed if Windows does not trust the downloaded files.
#1633
Quote from: TheVolumeRemote on Fri 02/02/2024 07:43:43I'm currently in a rabbit hole trying to figure out what to do about 3.6 chopping the top of my text off in GUI's, which isn't an issue for me in 3.5.1

Please give more details; what kind of gui do you have where the text is being chopped? Is it a regular gui, textwindow gui or standard dialog options gui? Is the text on some control or drawn on a DrawingSurface?
Is the text's position changed compared to 3.5.1, or it's the same?
Post a screenshot of both 3.5.1 and 3.6.0 looks perhaps?
#1634
Updated DragDrop & DragDropCommon modules to 1.2.0

* Added DragDropCommon.GhostZOrder attribute, letting you define which ZOrder to use in GUI and Overlay representation mode.
* Added DragDropCommon.GhostOverlay readonly attribute for accessing active "ghost overlay" (in respective drag mode).
* For AGS 3.6.0 and higher, "ghost overlay" representation now will use ZOrder setting, which makes this mode usable for dragging inventory items, because overlay will be able to stay above guis.
* Updated Demo Game, made it compile in newer versions of AGS without problems.

Download links:
DragDrop 1.2.0
DragDropCommon 1.2.0
Demo game 1.2.0
#1635
Quote from: Snarky on Wed 31/01/2024 07:27:09How about supporting negative values to allow users to switch the up/down directions (including diagonals)? (Typically for things like walking down hills.) I think that would greatly simplify this usecase.

I pushed a change, with the given implementation it's simply a matter of allowing negative values.
A test build will be available here after a short while:
https://cirrus-ci.com/task/6292291015409664

Although this makes me wonder whether it makes sense to support horizontal loop swap somehow.

Another thing that I've been wondering is, if we need a setting that defines a diagonal loop range, in other words, the angle in which engine will choose diagonal loops over "straight" ones. From my understanding, the diagonal loops are taking half of the sector between vertical and horizontal direction.
#1636
I actually had to do this for Overlays in upcoming 3.6.1 update.

The problem with Overlays is that their sorting was originally incidentally bound to their creation order. That was simply due the way their storage was implemented in the engine, and the fact that they were never really sorted at all prior to introduction of ZOrder property, and simply drawn in the order of their position in storage.

In 3.6.1 we did an optimization to overlays storage, for speed, but I did not realize in time that this may break old games which relied on overlays drawn in the same order as they are created.
Coincidentally, my "TypedText" module demo had this case (it was done in AGS 3.2.1), and I noticed the effect while updating and testing my module.

So, I pushed an experimental fix, which assigns each overlay an internal "creation index", which is used as a second sorting factor, after ZOrder, similar to how GUI use their IDs.
#1637
Right, AGS has this old problem that it loads sprites only on first demand when they are displayed. Which means that if an animation plays for the first time, then it will be loaded simultaneously. Then the loaded sprites are put into the "cache". If the animation plays again, then the ready sprites are taken from the cache, and displayed momentarily. Actually, since 3.6.1 there's now a second "texture cache" that improves this even further, by spending more video memory.

The cache is limited by settings, and system RAM. Low-res games rarely reach this limit, but games with huge amount of assets, as well as high-res games, will eventually will. When this happens, the engine discards the sprites that were not used longest (it keeps record of that). If the sprite is requested again after, then it will have to be loaded again.

Quote from: Custerly on Tue 30/01/2024 16:58:36- Why does AGS default to a 40 FPS limit?

Purely historical reasons, I think this is how classic adventure games were run.
I must also note that unfortunately at this point in AGS FPS is both rate of render and rate of logic update. This should not cause much issues with 60 FPS, but may if you like to have higher (or very low) speed of game update for some reason.

Quote from: Custerly on Tue 30/01/2024 16:58:36- Why is there a greater frametime impact on the first run of these animations, and is there a way (other than the aforementioned pre-running of animations) to mitigate this?

Historically people used various hacks to trigger sprite preload during some "loading" screen. E.g. something like sequentially displaying these sprites on an object behind a opaque gui, or drawing small parts of them into an arbitrary DrawingSurface (the latter hack does not require to display anything).

Since 3.6.1 there's are explicit functions called Game.PrecacheSprite and Game.PrecacheView.

Quote from: Custerly on Tue 30/01/2024 16:58:36- Is a 512 mb cache sufficent for 1080p graphics?

I guess it may be. But in practice this depends on how many different sprites you display at the same time (or in short term).

There will always be limits, if not for you then on some player's computer. It's better to not push as much as possible in the game, but try to optimize things, especially if it uses high-resolution assets. Keep the resolution to a minimal suitable level. If there are too many sprites then try to reuse them for multiple purposes. Do not make fullscreen animations if only a portion of the screen needs to change, animate only parts that need to change instead, etc. Well, this is a big topic on its own.

Quote from: Custerly on Tue 30/01/2024 16:58:36- I have been saving the graphics, after editing, via Photoshop 'export as PNG'. Is there a more size/performace optimal way of doing this?

AGS converts imported sprites to its own format, which is basically raw RGBA. But it also compresses them according to the options in General Settings -> Compiler section. In 3.6.0 the choice is "No compression", "RLE" (good for simplistic low-res gfx) and "LZW". Since 3.6.1 there's also "Deflate" which is same compression that PNG uses.

For long fullscreen animations I'd suggest try video instead.
#1638
Quote from: Kastchey on Tue 30/01/2024 11:32:22Ah I see, sorry I missed that in the changelog then. I was looking at the help files within the editor which still list the property as included.

Unfortunately, we do not have a proper manual for 4.0 yet. No one have bothered to write articles about new features yet, and also our manual source currently has a problem that it's somewhat inconvenient to have version branches. Hopefully this will be resolved.
#1639
Updated TypedText modules to 1.0.0

After several years of not touching this module, I fixed couple of known bugs, added fixes for changed script commands to ease usage in AGS 3.5.0 and later, and replaced download links from bitbucket to github (where my script modules now reside).

* Fixed that if text does not end with any of the "split" characters (any punctuation by default), then the last word will be unnecessarily wrapped onto the next line.
* Fixed if drawing surface or control's height is too small, there will be no text typed at all, which may confuse users.
* Provided compat fixes for compiling with AGS 3.5.0 and higher.

Download module pack: https://github.com/ivan-mogilko/ags-script-modules/releases/download/typedtext-1.0.0/TypedTextPack.zip
Download demo game: https://github.com/ivan-mogilko/ags-script-modules/releases/download/typedtext-1.0.0/TypedTextDemo_1.0.0.zip

On another topic, the original documentation for this module is probably overcomplicated (as most of my attempts to document my work). A while ago I did an effort to write better docs for my DragDrop module, perhaps if I manage to find spare time I could do same for this module.

Also, this module maybe should be rewritten for AGS 4.0, where scripts have more features, and many things could be scripted easier and in a more elegant way.
#1640
I don't remember if this question was asked before.

Are there any plans to update Game DB and add more optional fields for the game info?
There have been a number of requests in the past, namely to have info which operating systems and which languages are supported.
Besides that, in my opinion, it would be beneficial to have custom tags for the game, to let gather lists of games of certain style or content.
SMF spam blocked by CleanTalk