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

#661
Quote from: Mehrdad on Sat 04/01/2025 16:00:52When we zoom in on a scene, the front of the scene moves faster than the back layers (like in a 3D engine like Unity3D). That means we still have parallax.

If I understand correctly, you mean the effect when parallax layers change their relative speed depending on how close or away they become to the "viewer" after we change zoom? I suppose that might be possible to configure too.
#662
Quote from: Marion on Sat 04/01/2025 15:39:39Hello ! I tried to download AGS v4 again but I got a message error : {"code":500,"message":"There was an error processing your request. It has been logged (ID 80f17f52cc69eb54)."}

Please tell which download link did you use?
#663
Quote from: Mehrdad on Sat 04/01/2025 14:42:49Is it possible we make a parallax when we have zoom?

Please, elaborate?
#664
Quote from: Laura Hunt on Sat 04/01/2025 13:30:46Are there any use cases for dynamic audioclips apart from loading external audio files? I'm asking mostly because I don't see why any dev would include separate mp3/ogg files with their games. Do you have any examples in mind?

Loading external files is for either modding support, or dynamically constructing the game without recompiling in the editor, or allowing to modify the game more rapidly during development, I suppose. I do not have an actual list of examples. @Baguettator was the user who reminded me of this, so perhaps he could explain his use case.

Besides extern files, dynamic audioclips could be used to store results of runtime modified sounds maybe, if we ever support that in AGS. Although filter chains applied to a playback instance would be better.
#665
Speaking of having Parallax feature in the engine, first of all we'd need to write down a list of requirements for such feature, in order to make it flexible enough for variety of use cases. It may not be difficult to support multiple background images with automatic offsets, but users may expect more from that.
The first example that comes to mind is animation. We might want to have animated things on parallax layers, in which case they cannot be done just with a single background image. Another idea is a looping layer. There may be something else.

In the meantime, script modules may be a good way to test parallax system interface.
#666
Hmm, there are couple of comments I'd like to make:

1. I don't think there's much conceptual distinction between sprites loaded from "spritefile" and standalone sprite files. In the first case their "path" info is maintained by the engine based on spritefile's meta info, in another case it's maintained by the user scripts. I see this as 2 separate methods, but similar result. For example, engine may be modified to package sprites as files and reference them by filenames. OTOH, we could add a way to configure sprites' table of contents from script, by adding src file references, and let these act as "normal static sprites" (with the only difference that they may get unregistered, probably).

2. We may support editable or programmatically generated AudioClips as well, it's a matter of expanding the type. AudioClip is just a front (interface), what's behind may vary. In the end both sprites and clips could be just the same system: a resource items that either have an underlying asset, or only data in program memory.

What you say about iteration is true, if AGS had proper Container and Iterator types, then we could have Container reporting both real number of valid elements and number of slots, and a kind of iterator meant for going through only valid elements.



In regards to my own question, I am starting to lean towards a half-solution under option 1:
Support dynamically created AudioClips that get connected to a external file, but not placed into the Game.AudioClips[] array, and have ID -1. This has downside of not being able to learn its own index; in case users would like to have it identified with a number they would have to put it in a custom array, and maintain custom range of indexes.

The upside of this is that this gives us more time to figure out other issues without causing any new restrictions or compatibility issues. What I mean is that, as soon as we figure out what to do with the clips array, these dynamic AudioClips may also be added there without breaking anything.

BTW, in AGS 4 AudioClips can have custom properties, which in theory may be used to add custom identification too.
(speaking of which, they would have to be kept in mind when serializing dynamically created AudioClip struct)


On the other topic, previously I mentioned that ViewFrame is connecting sounds using their IDs. I got reminded that in the script API it actually lets assign sounds by AudioClip* pointer, and only has numeric id internally.
I suppose that this may be reworked into storing something else interally, something that would let attach these dynamic clips as well.
#667
Quote from: lapsking on Sat 04/01/2025 08:37:35I have another question. Are you guys as a "community" having "picnic" together? Or are you into something more serious? Because I have no intention to ruin your picnic which I do all the time and which is why people avoid inviting me to their picnics. I don't mean to be "traffic".

I did not want to reply to this thread, as I've never had anything to do with the website, ratings etc, but the further this goes the more disgusting this becomes. This thread is no longer the issue of the ratings, it's the issue of your attitude. It is perfectly clear at this point that you have zero respect for other people here, and you keep emphasizing this with nearly every new comment, towards ones who did nothing wrong to you.

This "community" is simply people who enjoy making games with certain game engine and playing them, nothing else. Nobody here ever tried to claim that it's anything bigger.

Just above you said that, I quote, "silly excuses just makes AGS look more like a ridiculous circus".

I think that the only thing ridiculous here is you. You are an annoying, tedious, overly pretentious <removed by moderator>, who got triggered by a hobbyist community rating.

#668
Quote from: Baguettator on Fri 03/01/2025 20:10:46Have you looked into the sprite rendering issue ? (no pressure, just to know if you indentified at the problem)

I did reproduce the problem, but did not have time to investigate this yet.
#669
Quote from: Baguettator on Fri 03/01/2025 15:17:43EDIT 2 : new problem I encounter in AGS 4. If I attach a function On_Click on a button called "Objectif", the function is by default called Objectif_OnClick. If I rename it, let say Fouille, then in the editor I click in the "..." button of on_click function in the right panel of the gui's window (with the Objectif button selected, so in this box there is the name of its onclick function, so in my case it's written Fouille), the editor creates a new function called Fouille. Previously in AGS 3.6, he knew that there was a function called Fouille, and he didn't create a new one, he jumped to the right function directly.

This may be the case with AGS 3.6.2 too (will need to test this), because this is where some additions to event creation and linking were done first.
#670
There's again a case when I must other people for any ideas, because I am in doubts or might not be seeing a good solution.

AGS does support creating and loading sprites dynamically.
In the old versions of script API it also supported playing an external sound file: PlayMP3File function. Since the new audio API was introduced in v3.2, all the imported clips are registered as AudioClip object, and they return AudioChannel when run. But there was never a way to register one dynamically at runtime, and PlayMP3File became inconsistent with the rest.

Now, in AGS 4 we cut out lots of deprecated API, and PlayMP3File among them, but there's no substitution for it yet. There was an open feature suggestion to support playing external sound files in AGS 4. The simplest solution is to have another function like that, except it would return AudioChannel. But this solution has a problem, as external clips will still be outside the system, and things normally applied to AudioClips would not be applied to them.

Thus I thought that a better solution would be to support dynamically created AudioClip objects instead. Similar to how sprites are created as DynamicSprite.CreateFromFile, there would be AudioClip.CreateFromFile returning AudioClip* pointer, which you would have to store in your own variable.

This solution seems good, but there's a problem: normal AudioClips are stored in Game.AudioClips[] array, where Game.AudioClipCount is there number. And they have a numeric ID, which tells their index in this array. And these IDs are used in some cases to attach a clip to something else, like ViewFrame.
You see where this is going: that's just another case of AGS relying on numeric IDs...

If AudioClip is dynamic, then just like a dynamic sprite it may be deleted in any time. If it's deleted, its ID becomes unused. What happens to array in such case? In case of sprites, they are all kept on their places. So internal list of sprites contains gaps (well, it contains gaps also because you can import sprites under arbitrary number). We could do same for AudioClips too, but then it's not obvious what to do with AudioClipCount: is it going to be a real number of available audioclips, or a number of elements in array, where some elements may be gaps?...

It looks like this problem exists in multiple instances, like Rooms, which I've been discussing only recently.


I'd wish there was a consistent solution to this. It could be that AGS requires overhaul of object storage and cross-reference, that would be essential if we want to support dynamic creation of everything (gui, characters, etc). But that's a lot of work, and may be a separate future task. For now I'd like to find something suitable at least in the short term.


Here are the possible approaches that I see, and all of them have their downsides.

1. Do not add dynamic AudioClips to the main list, have them only referenced by user's pointer variables. This means that their IDs will have to be unused (-1?). That's the simplest dumb solution, but it's bad, because it creates a discrepancy between objects of same type but different origin (imported at design time vs loaded at runtime). Dynamic AudioClips won't be found when iterating AudioClips[] array, and they cannot be attached where script or engine expects a ID - such as ViewFrames.

2. Have dynamic AudioClips in the list, and shift the list when a clip is deleted to avoid gaps. This helps AudioClipCount property stay meaningful. But this breaks clip IDs, although technically could be worked around, but makes their reference by ID prone to mistakes.

3. Have dynamic AudioClips in the list, and replace with null pointer when they are deleted. The next loaded clip will be assigned the first available ID from the gap (that's how sprites work).
This keeps IDs intact. But AudioClipCount's meaning becomes dubious. Also users will have to test the list's elements for null when iterating, but only if they use dynamic clips in their game.

4. The variant of 3, replace deleted clips with a dummy AudioClip object that contains no data, and serves only to avoid null pointer errors. This *seems* safer at first, but there is now a problem of not being to test an element for validity, unless we introduce some way to distinguish this "dummy clip". So maybe it's actually going to be more confusing than helpful.



Does anyone have opinion over those? Or any other ideas?
#671
Quote from: Joacim Andersson on Thu 02/01/2025 14:00:55Today, you can add several backgrounds to create an animated background, but what about different layered backgrounds to create a parallax effect?

You can do that with room objects and room overlays.

There are couple of script modules existing which implement this effect:
https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/module-smooth-scrolling-parallax-v1-7-1/
https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/module-rellax-0-2-2/
#672
Quote from: Baguettator on Thu 02/01/2025 15:00:41I encounter a problem with the upgrade of AGS 4.0 : my game places tokens like in a tabletop game, it's gui's buttons with a dynamicsprite.CreateFromFile as visual. Sometimes it has to be rotated.

In AGS 4.0, all the sprites look "grey", like with black lines on them. And the larger sprites (supposed to be tiles, larger than tokens) are not displayed at all (only full black squares, I tested with a script that displays a text if I click on these buttons, and the text is well displayed. So the button is here, it has correct width/height, but it's full black instead of its intended picture).

https://drive.google.com/file/d/1IOlLnlPJ1-rahRnH7AoCIa-tobb5RlSe/view?usp=sharing

Please upload an example of image, and post an example of a script command that loads this sprite into the game, so that I could test this.
#673
Quote from: Baguettator on Thu 02/01/2025 19:30:03Perhaps the File.Open command wasn't containing any tag for the path of the file ? it was just the name of the file, and I don't know if by default, if no path is indicated, AGS pointed to its game's directory.

The thing is, now in AGS 4, it's a crash, it wasn't before. I don't know if it's intended ?

You should always insert a location token into the path. When you do not, AGS assumes "game's directory", which is forbidden for writing files.

In AGS 3 there was a backwards compatible mode, where in such case it would remap the path to "$APPDATADIR$" instead.

Initially it was supposed to work only for older games, but someone persuaded me to change it and make it work for new games too, which is a mistake in my opinion. Anyway, it seems people might be using this in 3.* versions without realizing what is going on.

AGS 4 is strict about this.
#674
Quote from: Joacim Andersson on Thu 02/01/2025 14:10:43How is the list box filled when you call Debug(3. 0) (or press Ctrl+X)?

This is a built-in dialog that engine fills reading the room names from the game data.
#675
Quote from: Baguettator on Thu 02/01/2025 12:43:28In AGS 4.0, is there a way to play MP3 files (or audio files) placed in the game's directory ? Before, I used to use the PlayMP3 function (with an old-style scripting enabled in general settings if I remember well).

No. We have discussed a possible replacement, but it was not done yet.

Quote from: Baguettator on Thu 02/01/2025 12:43:28Also, it doesn't seem Tween module is compatible with AGS 4.0 ?

It may require fixing some syntax mistakes.

Quote from: Baguettator on Thu 02/01/2025 12:43:28And last question : is it normal that each time I want to launch my game, all the rooms are recompiled ? (even if I didn't change any Header script files)

No, it's not normal.
But this is a known problem if you have just upgraded your project, then all rooms will be recompiled after fixing any mistake in script.
If that's the case, one way to fix this is to open Game.agf.user in a notepad and change value of "<RequiresRebuild>True</RequiresRebuild>" to "False".
#676
I was not able to make the game crash. I tried saving again after loading this save, or walk around the game a bit, but did not experience any crashes. Maybe there is a specific condition for this, which i could not get... Could you clarify which steps do I have to make to experience this?


On another hand, from the looks of it, the game is already corrupted when you load this save. You may notice the GUI texts are missing or shifted around if you open various menus. And also text messages are displayed in a wrong way. One known case which may cause this is if the save was made in a too old version of the game with different number of contents. In which case the engine cannot handle this automatically.
#677
Quote from: cOdy_The_HUN on Thu 02/01/2025 11:56:43This is not the STEAM problem.

I know that's not the Steam problem, but this game has its authors, and I suggested you to let them know about this problem.
I am saying this, because this forum is dedicated to the engine, not the particular game.
Even if we fix the engine (or if this bug is already fixed in the newer versions, which is theoretically possible, as 3.6.0.52 is not the most recent version of this engine), the game won't be fixed unless its authors update the game.


Quote from: cOdy_The_HUN on Thu 02/01/2025 11:56:43Here is a link to the save game prior to the save crash event.
I mean after this the save games will be corrupted (unloadable) and the next auto save will crash the whole game on my system.
https://mega.nz/file/Mo0l1ITR#wriDTRmDlY4KVoVoqzavcKqf90sOdHskAGN_l77XHIU

Alright, I will try this out.
#678
@cOdy_The_HUN have you tried contacting the game authors on Steam game's page first? They are the first responsible for their game, and may have better understanding of how to test this case.

I'll poke @Radiant for this, in case he's around.

Unfortunately, I've never played this game through, so names like Svartalfheim and Nidavellir tell nothing to me...
Do you have a save made anywhere prior to the crash, which could be used to get close and reproduce this crash?

#679
@eri0o this is a beginner user, who cannot tell why the code is invalid, and likely knows nothing about "ags3" or "ags4". It's worth explaining WHY is the code invalid too.

@SlinkyB,

FollowCharacter function orders one character follow another, but it's not suitable for checking whether it currently follows or not. It will always start following, so all that you will accomplish with this is that whenever this condition runs cChar2 will begin following cChar3. Also, AFAIK it does not have a return value, so the result of checking if "(cChar2.FollowCharacter(...))" will be always false.

Prior to AGS 3.6.2 there's no character's property that would tell that one character follows another. Well, strictly speaking, there is, but it's a part of deprecated API, and is hidden now. You could enable old API, but I would not recommend, as that will also enable lots of other things which are no longer recommended to use.

There are 2 options:

OPTION 1. Upgrade to AGS 3.6.2 Beta, which has Character.Following property (as mentioned by eri0o above). This option may be easier if you're just starting your game. "Following" property is used like this:
Code: ags
if (cChar2.Following == cChar3)
AGS 3.6.2 download may be found here:
https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-3-6-2-beta-1-a-wip-3-6-update/

OPTION 2. If you prefer staying in a previous version, then create a boolean global variable, for example - "char2IsFollowingChar3", and assign it along with calling FollowCharacter (where you do this), like:
Code: ags
cChar2.FollowCharacter(cChar3);
char2IsFollowingChar3 = true;
and when you stop following, like:
Code: ags
cChar2.FollowCharacter(null);
char2IsFollowingChar3 = false;
then check that variable in a your hotspot condition, like:
Code: ags
if (char2IsFollowingChar3)

Global Variables panel is the easiest way to add global variables in AGS for beginners, it may be found in the project explorer.
#680
Updated to Alpha 17
(Please use download links in the first post)

Contains all the new features and fixes from 3.6.2 Beta 5 (excepts ones related to backwards compatibility).


Own changes:

Editor:
- Fixed incorrect default values of GUI color properties (BackgroundColor, etc). This is a regression in 4.0 Alphas since we support full 32-bit color range values.
- Fixed default value of ListBox's SelectedBackgroundColor is being treated as "transparent", for the same reason.

Scripting:
- May omit struct's name when addressing a static member from within a struct's member function.

Script API:
- Added Game.RoomCount, RoomNumbers[] and RoomNames[] properties.
- Added Room.Number and Name properties.

Engine:
- Fixed program exception when Character.AddWaypoint() is called in script.

SMF spam blocked by CleanTalk