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

#1
Hello, I am not suggesting myself for this, but I'd like to note this:

The contemporary version of AGS Editor can create a APK for Android itself (not iOS though), and there's Android port of the engine. While the latest 3.6.2 engine can still run old games (so in theory it's possible even to bundle old compiled game files with the new engine), ideally you should upgrade your game project to the latest AGS (to version 3.6.1 or 3.6.2): that will make it much easier to work with and port to other platforms.

The upgrade process may require tweaking some "backwards compatibility" options in the game settings, and maybe fix few things afterwards.
Also, if there are any issues if upgrading from 2.62 to 3.6.2 directly, then you may try upgrading in steps: 2.62 -> 2.72 -> 3.6.2
#2
Hello. The errors that display a "Illegal exception" text are caused by the mistakes in the engine, not script mistakes. They have to be fixed in the engine.

"program pointer is +32" is a secret code that tells that the error happens when trying to draw a room object.

I assume that there's something unusual in the View 345 that you are trying to animate.

1. Does the view exist?
2. How many loops does it have and do these loops have valid frames?
3. Do you have regular sprites in this view, or do you assign dynamic sprites to it?

If you have a crash dump, I will need both the dump and also your game's exe file in order to read it. Sometimes it's enough to understand the problem, but sometimes that will still require additional investigation.
#3
Quote from: eri0o on Tue 01/07/2025 16:35:47I don't have a target use for this now, but if there was a way to load a shader from a string, with somehow accounting for the different graphics driver, it would be possible to have shaders in script modules without packaging them separately.

I don't know yet, but as a workaround you may write files from script, and then create shaders from them.
#4
I was unsure what to reply...

For me, personally, today the situation is complicated, or maybe I should say "strange". I don't have a full-time job for a while now, and on another hand do not have any immediate financial issue (i have got savings). So it's not a lack of money or spare time that prevents me from working more. In the past there have been prolonged periods where I worked on AGS every day for months.

My problem today is that I have no real interest in continuing this work, and for some time have an increasing belief that it was not a good idea for me to participate in this project in the first place. The reasons why I'm still here are again complicated, but probably also nonsensical.

Given that, it's best to not assume my presence in the core dev group in the future.
#5
Quote from: Grundislav on Tue 01/07/2025 19:47:24I found some odd behavior, not sure if it's exclusive to 3.6.2 or has existed before:

When using goto-dialog in dialogue scripts, it doesn't register that a new dialogue is starting, so the on_event function for eEventDialogStart doesn't work. The workaround is to use eEventDialogOptionsOpen.

These dialogs events were introduced in 3.6.2, so all related behavior is new.

[REDACTED] (posted wrong explanation at first)

Regarding the issue, these events intend to work as explained here in this topic:
https://adventuregamestudio.github.io/ags-manual/Globalfunctions_Event.html#on_event

The eEventDialogStart is only ran once the game enters a dialog state. A "dialog state" goes from when the dialog is called from script to the point when it returned back to the normal game.
For any further change you should be using eEventDialogRun, it's triggered whenever any dialog entry is run, including "@S" entry of a new dialog. Which means that it should occur when you use goto-dialog as well.
The manual may be clarified for this bit.
#6
Quote from: ryu on Tue 01/07/2025 17:33:22As a side note, maybe it would be a good idea to have something like this directly in the AGS editor. The TRS file format is not very convenient for i18n teams to work with.

AGS 4.0 works with PO format now:
https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-4-0-early-alpha-for-public-test/
#7
DirectX 5 is no longer necessary since at least AGS 3.6.0. (And it's been long deprecated by Microsoft)

Memory depends on the game and configuration (such as sprite cache size). Some low-res games may easily fit in 50-100 MB.
2 GB sounds like a safe variant: it's unlikely today that a player has less, and that's actually the maximal amount that AGS engine used to be able to use (today it's 3 GB for a 32-bit engine, and much more for 64-bit engine).

Storage: afaik it should include not only the size of the game but the average size that game saves can take?
#8
Quote from: chip on Sat 28/06/2025 15:13:22It only shows stereo, 48.0000 khz, codec or format is not even mentioned, cant give more infos about the video, because it was years ago somehow reencoded to an ogv file for the purpose of using it in this game. Playing the sound file seperate beside this (muted) video was my try for a work-around, but it was desync after some time afair.

You could maybe try the MediaInfo software:
https://mediaarea.net/en/MediaInfo

Or perhaps the person who reencoded it could tell which settings did they use?


Quote from: chip on Sat 28/06/2025 15:13:22Regarding the upgrade test:
Setting script compatibility to 3.6. seem to fixed alot and it let me enter the game, but the mouse-hover-over-hotspot-texts were all black. The dialogtexts when characters speak are fine, but the Dialog texts in the dialogoptions-box are invisible. Do you know how to fix that too?

In AGS 4 we changed how the colors are set in script. Previously they were encoded as 16-bit numbers, but now they are 32-bit numbers (ARGB), and using old numbers result in transparent colors (with alpha = 0).

AGS is supposed to convert the colors set in the Editor (on the GUI and Character properties), but if ones are set in the script, then the only way to fix this is to go around scripts, find where they are assigned, and either convert number by hand (you can use Color Finder panel for the help in converting, its in the Colours node in the Project Explorer), or use Game.GetColorFromRGB() function.
#9
Quote from: chip on Sat 28/06/2025 11:55:13Cannot share the video file, its a private movie, other sounds are working in game.

Did you make this file yourself in a video rendering software, or took a ready file from somewhere else?

Can you look into its properties and tell what are the audio properties: codec, format, etc?

If you made it yourself, you could perhaps make another one which does not contain private material, but has similar issue?


Quote from: chip on Sat 28/06/2025 11:55:13Made a quick test to open a project-copy in AGS4, but it was not working at all

Upgrading to AGS4 may require to:
- Set Script Compatibility level to 3.6.* in the general settings.
- Replace or remove certain deprecated commands. For example, HasAlphaChannel property is deprecated and should be removed completely.
This may take some time to figure out depending on a project.
#10
Quote from: chip on Sat 28/06/2025 11:08:15I've already tried all the flags for the code to play the video, but nothing helped; the sound was always muted (unhearable in game).

What about other sounds, do they play in your game at all?
If they do, then could you upload your video file to some file hosting to let us test it out?

Quote from: chip on Sat 28/06/2025 11:08:15I wasn't familiar with AGS4. Can I update my AGS3 project to it, and is it stable?

You may, but there are number of serious changes, so I recommend doing a project backup before upgrading.
It's relatively stable, it's still in active development, but we fix the mistakes as they are reported.
#11
Try calling this MoveMap() in the room's "before fade-in" event.
#12
Please post the exact command that you use to play the video. There are options that disable video's sound, could be you have that by mistake?
https://adventuregamestudio.github.io/ags-manual/Multimedia.html#playvideo


About non-blocking videos, as @eri0o said, that works only in AGS 4. This is a version in development, but if you're interested to try, here's the forum thread with links and list of changes:
https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-4-0-early-alpha-for-public-test/

Here's the forum thread that discussed non-blocking videos in particular, with a number of very simple code examples:
https://www.adventuregamestudio.co.uk/forums/engine-development/feature-request-videos-non-blocking-playback-with-guis/msg636661328/#msg636661328

#13
Godot is a highly successful project (as well as other successful projects) because it's been led and organized by highly dedicated people, who have a well defined vision about what they want to make, and continuously pursue their goals.

AGS, as an open source project, had not been led by dedicated people, never had well defined goals, nor concept, and much of its inner problems had not been solved for many years. Plus it's still have a pretty bad code base, which is difficult to work with.

That's a comparison in a nutshell.

I don't know if anything can be borrowed in this case. The AGS, as a project, is in a very bad state overall. It cannot be improved by a small fix, it has to be redefined, but in order to do so, it first of all needs dedicated people, or a person, who would lead this project properly.
#14
Quote from: edmundito on Tue 24/06/2025 19:10:16I may have found a compatibility issue that is not well documented in the migration steps:

If I call `lstSaveGames.FillSaveGameList();` for an older game where I save to slot 0, I now have to call `lstSaveGames.FillSaveGameList(0);`. The previous versions of AGS started with save slot 0, now it begins with save slot 1. The migration doc wasn't very clear about this.

This may be a mistake in default values. I have fixed the default behavior to match old games in the engine, but did not fix the default values in the function declaration in script. I might change that to the classic behavior (0..99).
#15
I keep getting distracted..., but I suppose this issue has to be dealt with somehow, at least by making a draft.

Still must sit down and think, and get a full picture in my head.

Meanwhile, as a few quick notes...



I remembered a "audio mixer" I've coded for the tzachs's MonoAGS project. Tzachs did not want to have AudioChannels also iirc, so I wanted to see how a engine's user could code ones themself. The mixer was written as a separate library, here's its code (it's in C#):
https://github.com/ivan-mogilko/MonoAGSGames/tree/master/Libs/AudioMixer

Its structure is this:

A Mixer allocates a number of AudioChannels; their number is dynamic and may be changed whenever.
A Mixer also has a dictionary of "Audio Rules" attached to Tags. Audio Rules include things like default priority, default volume, and so on. A Tag is just a unique string.
AudioClips may have any combination of tags.
AudioChannels may have tags.
A clip may be only played on a channel that has no tags or that match tags with the clip (If channel has tags, then the clip must have at least one matching tag). If it's allowed, then Mixer creates a AudioPlayback object and places on a suitable channel.

In the above concept the AudioTypes that we know in AGS are replaced by AudioRule objects associated with Tags. Reserving channels is done by applying tags to them: e.g. you may create "Music" tag, create 8 channels, and then assign "Music" tag to 4 of them. So it's kind of done other way around.

There's a "demo game" which uses this system:
https://github.com/ivan-mogilko/MonoAGSGames/blob/master/Games/AudioMixerGame/Rooms/MixerRoom.cs

I am posting this here just as an additional thought.



Then, I did not reply to some notes left by @Snarky above:

Quote from: Snarky on Sat 29/03/2025 13:09:38For example, with a looping or repeating sound, is it always the same playback instance, or a new one each time? And how would you configure frame-linked audio (volume, etc)? If there was a persistent playback instance, that might offer a good API.

I think that looping sound should be same playback instance, it works like that internally now, and that's how VideoPlayer works in AGS 4.0 too. I doubt if an opposite approach would work well.

About frame-linked audio. Naturally one would need to configure the future playback instead of doing that repeatedly every time one plays (and that won't work stably). OTOH I do not think that having a "persistent playback" - in the sense that it exists always and just have different sounds played - is a good idea. I believe that playback object should be valid only until the sound stops. Also, character frames may run several sounds in quick succession - and these may be different sounds, even played simultaneously.

I'd rather suggest to classify objects that may play linked sounds as a Audio Emitter, and have "emitter properties" on them. I've been following this principle when adding Character.AnimationVolume in AGS 3.6.0:
https://adventuregamestudio.github.io/ags-manual/Character.html#characteranimationvolume
https://adventuregamestudio.github.io/ags-manual/Object.html#objectanimationvolume
#16
Quote from: JanetC on Tue 24/06/2025 15:44:14Is there a version that works with AGS 3.2.1? I'm trying to compile a very old game.

Is there a reason why don't you upgrade to 3.6.0-3.6.2? Old games should import and compile fine with the backwards compatibility settings.
#17
I think "CopyTransparencyMask" is what you need:
https://adventuregamestudio.github.io/ags-manual/DynamicSprite.html#dynamicspritecopytransparencymask

The algorithm approximately is:
1. Create a dynamic sprite from the selected "static" animation frame.
2. Get a number of current character's sprite
Code: ags
ViewFrame* vf = Game.GetViewFrame(ch.View, ch.Loop, ch.Frame);
int charSprite = vf.Graphic;
3. Copy character's sprite transparency mask over to the dynamic sprite:
Code: ags
staticSprite.CopyTransparencyMask(charSprite);
4. Now you have a dynamic sprite with a "static" frame carved as a shape of character's silhouette.
5. Assign this frame to another character following exactly the first one, or as a graphic to a Room Overlay above the character, etc.


EDIT: I was not able to understand, if you want to overlay effect over the character, or completely replace the character with one. The above solution will be same up until the last step.


EDIT 2: in AGS 4.0 this may be now done using object shaders, - I'll leave this note here for the future readers.
#18
An update: the saves compression is now a part of the AGS 4, and possibly there will be a minor update to 3.6.* in a future which will also have it. It's possible to get a post-3.6.2 engine with an optional saves compression and use it to run older games too if the size of their saves gives too much trouble.
#19
Do you mean this message?

QuoteGUI (3) gPanel's event OnClick function "gControl_OnClick" not found in script GlobalScript.asc.

There was a mistake in older versions of Sierra template, where gPanel had a unused OnClick function. Simply remove it from events and the warning will be gone.
#20
Quote from: ironhide1975 on Sat 21/06/2025 13:17:18Upgraded to the latest version and got an error saying gControl_OnClick was missing from the gPanel?

Please post exact message that you get (you may right click on it and select "Copy" then paste here), and tell under which circumstances this happens.

I may guess you are referring to a warning (yellow icon) that is printed when compiling the game if some of the functions mentioned in the control's events is not present in script, or on contrary a function is present in script is not linked to the control's event.

You can double click on the message and that will bring you to the location in script or the GUI that has this mistake.
SMF spam blocked by CleanTalk