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

#541
For the reference: it turned out that 3.6.0 engine has a bug where assigning any non-existant sprite number to a game object (such as a cursor) causes engine to corrupt the sprite cache, after which it may crash at any random point (even if the cursor is fixed afterwards).
(idk how the invalid number got there in the first place, but that's another issue)

Given this is affecting a game in beta stage, when it's too late to update to the next 3.6.1 version, I might release a new small patch for 3.6.0 with the safety fix.
#542
I just randomly pressed "Edit Game" on a random game in database, and to my surprise it opened game description for editing. Is it a bug, or I somehow have permissions to do that (then why)?
#543
@Grundislav I checked this out with the game exe, and situation is following.

What I can see is that the crash occurs when the game is trying to get sprite 23994, which is presumably set as a active inventory's cursor graphic.
If I am correct, it looks like the topmost normal sprite in game is 23974, which means that 23994 is a dynamic sprite. But for some reason, the location of crash is pointing to an attempt to load the sprite of this number from game assets, which should not happen. I can't tell if that's a mistake in engine logic that I cannot see, or the crash dump not pointing to a correct place in source code.

In any case, this must be related to a dynamic sprite that was deleted but not removed from the inventory item.

Do these users who reported the bug have any save made just before the crash? If they do, I could use it to see what happens exactly under the debugger.
#544
I cannot read much of the info from this crash dump without the original game.exe, apparently. Is there a way I could get one?

Other than that, the dump mentions a "invalid memory access" error.
Judging by the context, a common case is when you use dynamic sprites assigned to a game object, delete that sprite but forget to replace the graphic assignment. The older engines could crash trying to draw that non-existing sprite on screen. That's just one possibility that I may mention.
#545
What is "Roger base game" exactly? If that's one of the default templates (Sierra, BASS etc), then the hotspot text is located on some GUI with a label. The name of that GUI varies between templates. For example, in Sierra-style template it is "gStatusbar", in BASS and Verb Coin that is "gActionBar".
If that's the case, then simply edit GUI's position properties (X,Y,Width,Height) in accordance to your game's resolution.
#546
Quote from: Tarnos12 on Mon 03/02/2025 20:00:09Is it possible to go back if something happens in this new version?
I will give it a go tomorrow since I need to make a build today and can't risk it :D

Yes, for now, because there are no changes to the project format since Alpha 18 release, only changes to how engine works.
#547
@homelightgames I'd like to add you to the credits, since we are going to use your variant of the cup pic, would you prefer to be mentioned by this nickname, or by a real name?
#548
@blaholtzen I tried your game, but it just works well when I run it with F5 or by pressing "run" button from the Editor.

I wonder if this problem may be related to an antivirus or Windows Defender program locking editor up?
#549
Quote from: blaholtzen on Mon 03/02/2025 16:14:09It doesn't happen with a new template game. Trying patch 8 now and the crash does not happen with that either.

I do not have many ideas about what to look for. Do you use breakpoints when running your game test, for example? Do you have any plugins in your game?

Perhaps, if you could PM me a game project, I would try reproducing this problem and investigate.
#550
Quote from: blaholtzen on Mon 03/02/2025 16:14:09I realized I forgot this other part which is probably also relevant. If I, after having had the crash, try to run the exe in _debug manually, without the editor open I get this error:

This is simply because the exe in _debug does not have anything packed in, it's a raw engine executable. When the Editor runs _debug/game.exe, it also passes few command-line arguments to it, including paths to game resources.
#551
Engine Development / Coroutines in AGS
Mon 03/02/2025 13:52:02
I have recently rewrote a engine's script executor in the AGS 4 branch (see PR #2621). While the script format and basic execution remains exactly same, this rewrite changes the way the script execution state is handled. Among other things, it introduced an improved concept of "script thread". AGS had a sort of a "script thread" idea before, there has been 2 threads: normal one which run most script, and non-blocking one which run "repeatedly_execute_always". But this system was very limited, and not convenient to expand. The new system allows to do 2 following things relatively easily:

1. Create new (temporary) "script threads" dynamically. The "script thread" contains its own stack memory (for local variables) and callstack queue (for remembering nested function calls).
2. Saving script thread's state and restoring later. This means that the whole local state of a script's execution is saved at a current point, kept recorded for an undefined duration, and then later may be run from the same point again.

In my opinion this opens a potential for implementing coroutines in AGS. Coroutines are types of functions that can pause, then wait for something (either some event, or a external command) and resume.
I have spoken about my vision of what coroutine may be in AGS earlier here:
https://www.adventuregamestudio.co.uk/forums/editor-development/feature-request-behavior-of-hotspot-that-results-in-a-room-change/msg636665195/#msg636665195
But that was never meant to be a final plan, and when I think about this now I have doubts about few things.
Then I made a dirty experiment here:
https://www.adventuregamestudio.co.uk/forums/editor-development/feature-request-behavior-of-hotspot-that-results-in-a-room-change/msg636668451/#msg636668451
Again, this was merely a technical proof of concept, not a feature suggestion.

I'd like to open a proper conversation about how coroutines may be designed in AGS, both from the point of view of script syntax and internal implementation.

For the reference, following is technically possible to do with "script threads" now:
- script threads may be created anytime, and stored by the engine; they may be identified by something (whether string name or numeric index);
- script threads may be paused at any or almost any instruction in script, and resumed by the engine (resuming means simply that engine runs previously recorded script thread again);
- running a saved script thread may be done either by engine's updating the game (i.e. if there's a list of script threads which are checked on each game update), or by a direct command from a script.
- script threads may be cloned (copied and saved as a different thread object); idk if that is necessary, but it's possible.
- saving or cloning a script thread may be full or partial. For instance, we may record/copy only the latest nested function call and its local data, but ignore everything that preceded it.

What cannot be done:
- as far as I can tell, we cannot save script execution that have nested engine calls in them. What I mean is, suppose there's a engine function that can be run from the script, but also calls another script. Then you have an interleaved nested script and engine calls: engine -> script -> engine -> script -> ...
This kind of nested call was not possible before, it is possible now with the new executor system, but we won't be able to save such callstack nor restore it, because engine own functions cannot be restored by the script executor. I suppose there may be ways around it, but this seems too complicated, so perhaps not worth trying.
Then, perhaps the engine should not make such nested calls on the same script thread, but always create new temporary script thread whenever it has to run another script callback while being inside one script callback already (like what happens when it runs rep-exec-always, while being inside a Wait called by a script).

Above should be kept in mind when designing coroutines feature.


#552
Quote from: Tarnos12 on Mon 03/02/2025 10:01:02How do I reload a room? Rebuild all files?

For example, open another room, then back the previous one.


There's a fixed version here:
https://cirrus-ci.com/task/6571235825418240

but it also contains some major rewrite in the engine, so if you use it, please keep an eye on anything strange.
#553
Quote from: blaholtzen on Sun 02/02/2025 16:57:04Already wrote about this in the support channel on discord while i was trying to figure out what exactly was happening but putting it here too just to make sure its been noted.

I haven't been on ags discord for a long time now, and afaik other devs are not on discord either, so likely nothing posted there in the last month or so is noticed by us.


Quote from: blaholtzen on Sun 02/02/2025 16:57:04When I use this I seem to have some kind of issue with the debugger.
If I try to "run" the game via the button ie with the debugger, no game window shows up, the editor freezes entirely and can only be closed by ending the process.

<...>

I can still compile the game just fine and run it without the debugger with no problem, and I have no issue with this if i go back to trying it with 3.6.0.

Does this occur with any game? For example, what if you create a blank game from template and try to run it?
What about previous 3.6.1 versions, could you try few of them too? They may be found in the "Engine & Editor Releases" list of topics.
#554
Quote from: Tarnos12 on Sun 02/02/2025 15:09:05I couldn't make it work by reloading a room, in my case it's a regular room with blank template.
I have to manually create a script in a room.

I just tested again, and it does work if you reload the room. But you need to actually reload it, not just close the tab and open again.
This has to be done each time there are new objects, because each new object won't have a script module reference, and reloading a room only fixes already created objects.
#555
Uploaded to imgur instead.
#556
I finally found some time to look into this.

Here's an example of looks, using images provided by @homelightgames:


In case of a smaller wizard size (depends on pages):



In the above dialog there are 2 separate picture controls, where background is scaled to fit the page's height, and cup pic is fixed in size.
The cup may be adjusted (position and size) separately.
#557
Quote from: Tarnos12 on Sat 01/02/2025 09:20:23Hey, I have an issue with adding an event to the object:
https://gyazo.com/a37867db67a0b6312ba0484f1a56543f

So, the issue is that the object is not referencing a script module.
And this happens in 3.6.2 too!
For how long is this problem present, how come nobody reported this earlier?

EDIT: it fixes itself when you load the room for the second time.
I suppose this problem either appears when creating a new room from template, or upgrading an existing room to the new version.

EDIT: looks like this affects only room objects, other things like hotspots are fine. Maybe that's because these are allocated all at once when the room is created, and objects are created later.
#558
Quote from: MrGreen on Thu 30/01/2025 20:07:09I know that only Theora code is supported. My question was only about the extension of the file name not the decoding. For example ".dat" (or whatever) instead of ".ogv" to "hide" the videos from the players.

I thought that should work, I recall a few games that did that trick. Maybe there's an oversight in the player logic.
I will check this out later today.

EDIT: here's a fixed build:
https://cirrus-ci.com/task/5190246486245376


Quote from: MrGreen on Thu 30/01/2025 20:07:09Also, are there any plans to package all videos (or all external source material) into an uncompressed database in the future?

Videos are already automatically packaged into the main game pack (game.ags), if the Editor finds them in the game project folder (but for that they must have "ogv" extension). Any custom files may be also packaged into the main pack using an option in General Settings ("Package custom data folders").
https://adventuregamestudio.github.io/ags-manual/GeneralSettings.html#compiler

Are you asking about creating a separate pack for videos? Moving selected files into a separate pack is mostly a matter of providing a setup option, and telling engine where to look for.
#559
You could use objects or room overlays for each firefly, instead of raw drawing.
That would have significantly better runtime performance, and then these may use their Scaling and Transparency properties.
#560
Quote from: Radiant on Wed 29/01/2025 14:48:05Question: What is the minimal version of MacOS that this AGS build runs on?

Please clarify which AGS build are you refering to?
SMF spam blocked by CleanTalk