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

#1501
I do not remember if this is documented, but "When mouse moves to top of screen" style actually pauses the game, similar to "Pause game when shown". This is a hardcoded behavior.

So, the solution is to set it to "Normal" and script popup yourself, as Khris posted above.
#1502
Quote from: Baguettator on Thu 28/03/2024 12:14:41Also Windows Defender detected a Trojan just at this moment.

Yes, Windows Defender wrongly detects built AGS games as a Trojan:
https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/compiling-errors-due-to-virus-scanner/

For this reason it may block certain actions during game compilation, like changing icon to game exe.

In the short term this is solved by adding AGS program folder and your game's folder to Windows Defender exceptions.
In the long term, it's better to send a false positive report, as mentioned here, and hope that they will fix this in some of the future updates:
https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/compiling-errors-due-to-virus-scanner/msg636660137/#msg636660137
#1503
Quote from: Snake on Wed 27/03/2024 21:47:36The SFX still work, it's just the MIDI files for the background music that aren't playing (or muted somehow).

Hello.
Previous versions of AGS were using a sound library that relied on Windows own MIDI interface to play MIDIs, but since v3.6.0 it uses a Timidity library that requires installing patch files on your computer.

Following article explains this in more detail:
https://adventuregamestudio.github.io/ags-manual/MIDI-playback.html
#1504
Hmm, the list of all variables may be presented as a selection of what to add to the "watch" panel.

In other words, there's a watch panel which lists currently watched variables, and a separate panel or a dialog window, where user may choose from a full list of variables. Although this will work reliably for global variables. It may list known local variables too, except not all may be active in particular scope.

EDIT:
well, in any case, I think it should be as simple as possible at start, because the biggest problem is making the variable value extraction, and GUI may always be adjusted later.
#1505
Quote from: eri0o on Wed 27/03/2024 15:00:26About the issue of GUI, I think I imagine it would use a new panel for this with a TreeView and it would show each variable in scope as a node in the TreeView.

I must point out that having this for all variables at once will require editor to ask engine for all of their values each step, as editor does not know which ones of them change.
Otherwise there would have to be a mechanism that detects changes to the script memory, which we do not have at the moment.
This would also raise a question of convenience, as user will have to search for wanted variables in this tree view.
For a first iteration, I'd suggest to have a list where user inputs wanted variables by name, similar to how Visual Studio does this.
#1506
Quote from: Snarky on Wed 27/03/2024 13:05:51As I mentioned in another thread, I think this can be implemented fairly easily in a module without adding it as an engine feature—and therefore I don't think it should be added to the engine.

Well, the scaling property may be useful for dynamic effects, it's an expected feature of game objects in contemporary engines. In AGS 4 GUIs may already be rotated, added as a part of rotation feature support (with correct handling of click coordinates for interaction), I don't see why won't they be scaled.
#1507
Only for the reference, AGS 4 wip version now supports non-blocking video playback with sound (!), which may be a better alternative that this plugin, if you are not against using a wip version of AGS.

See: https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-4-0-early-alpha-for-public-test/msg636661716/#msg636661716
#1508
The minimal requirements for the variables watch are:

1. Script compiler generates a table that maps name of a variable to offset in script data. Such table must be done per each script, as variables depend on visibility scope, and each script has its own (just like types).
2. This table is saved either in a separate file, or as an extra data in a compiled script file (similar to rtti).
3. This table is read either by the Editor or Engine.
4. If this table is read by the Editor, then on user request it converts variable name to offset, and sends a command to the running engine through the existing communication mechanism. This command asks engine to return a value from the given data offset (there's more than that, but it's a general idea).
5. If this table is read by the Engine, then Editor sends a command with variable's name instead, and Engine is responsible for converting this name to an offset. From this moment p4 and p5 match.
6. After retrieving variable's value, engine passes it back to the Editor, and Editor displays it.
7. The rest here is mostly an issue of GUI.

Details.
   
Variables are identified within certain context (scope of visibility), because there may be multiple variables of same name inside different scripts, and even same script (think local function variables).
This means that the mapping is done in 2 steps:
   
    Context-dependent name -> Global unique name -> Memory offset
   
For global variables the unique name may be formed as "modulename.varname", similar to how global type ids are formed in RTTI.
   
Local variables are more tricky, because they have a limited lifescope, which may be a function, but also a section of a function (anything surrounded by brackets). This means that for them the table of variables should also mention first and last script line of their life scope. If a variable is requested, but there's no such variable found in the given context (script + current line), then such request must be denied.
   
With local variables in mind, the "global unique name" of a variable should also include their scope. Now, I don't remember if AGS compiler supports overriding variable names in the nested scopes, but I think we should assume that eventually it does (IIRC this was discussed on github once). So, I guess the global unique name should be something like "modulename.varname.scope", where scope could be a pair of numbers meaning the first and last line of code of their scope of visibility.
   
A conversion between a "Context-dependent name" and "Global unique name" possibly can be done like this.
We have a table of variable names for the given context (a script module), and for each key in this table we will have not 1 variable, but a list, sorted by the first line this variable is visible on. For a variable request, we find its name in the table and traverse this list until we find an entry which pair of first-last lines matches the location of current breakpoint. This is how we learn the "global unique name". This "global unique name" is passed further to find a memory offset.

Example of a list (only to demonstrate a potential case):
    module.myvar -> module.myvar.10.20 -> module.myvar.30.120 -> module.myvar.50.60
Here we have a global variable "myvar", some local one between lines 10-20, another local between 30-120, and a nested one which overrides previous for the duration of its life scope - between lines 50-60.
   
Noteably, memory offset should be paired with a memory type: either global memory or local memory (stack), so that engine knew where to look for it.
   
After receiving memory offset we need to interpreter the value stored on it, and convert to a string. For that we need RTTI which tells us variable's type.
   
    Editor                                                                                                              Engine
        Context-dependent name -> Global unique name -> Memory offset
        Displayed value <- Data Value <- Memory offset

Handling structs.
   
Reading a struct's member can be done by passing another, nested offset. Getting that offset requires RTTI, which tells which relative offset does a member of certain name has. Same as with variable itself, there are two alternatives here, one where a list of offsets is resolved on Editor's side, and second where it is resolved on Engine's side (and Editor passes just a sequence of names - "variable name :: member name :: member name ...").
   
Regardless, engine must know how to access each nested member. There are two variants here: plain struct and managed struct. A member of a plain struct is accessed simply by adding a relative offset to the struct instance's address. A member of managed struct is accessed by resolving the pointer first.

Handling arrays.

I suppose that arrays are handled like plain structs.

Reading values of attributes (aka properties).
   
Attributes are pairs of get/set functions in AGS. Reading a property would require to call a registered function. In theory it must be possible to do this even outside of a script vm, but the biggest issue is potential side-effects that such call may involve. I'd rather leave this out at least until the variable reading mechanism is developed and proved working.
   
   
#1509
Quote from: lapsking on Tue 26/03/2024 22:14:27* Can't engine developers come to a conclusion what they need to be in the demo. Why do engine developers have to do this?!

I suppose because you are making the engine. You know about the features better than anyone else. I mean in previous posts you were actually giving directions but got distracted by all this hustle and bustle. You don't make games but you know what to do, so others can make games. Nobody knows about the features of the engine as much as you do. You actually wrote what you think should be included in demo.

I can tell about the features and how to use them. I can have an idea of what could be in the demo.
But if I will be the one making requirements for the demo, then I will also have to take responsibility of overviewing the progress and result of this work, demand corrections, and basically do management tasks. This will be an additional responsibility for me, which I cannot take now. Besides other things, I'm not in the right state of mind to do this. I'm tired of worrying of things being not how I expected them to be, and have grown weary of arguing with people.

Quote from: lapsking on Wed 27/03/2024 08:21:12he almost wrote down which engine features he thinks should be there, but maybe he just needs to adjust it with AGS 4.0. I don't think there is much point in releasing a demo for AGS 3.6 anymore with 4 being in development.

The basics are still the same in AGS 4.0, and at least half of new features in 4.0 are meant for advanced users. The demo made for 3.6.* will still be usable and useful in 4.0. If a 3.6 version is created, making a 4.0 version would be a matter of adding more stuff to it, like new chapters.

Quote from: lapsking on Wed 27/03/2024 08:21:12To be honest actually there isn't much problem. But there are things that can be done to make our life easier. For example I remember when on Tumbleweed Timbleweed whatever template I changed the resolution to 1920x1080 the whole dialog GUI became a mess.

So, this is a whole different issue then. One problem is that AGS does not support scaling GUIs; that's something that may be added to the TODO list for AGS 4. If there are more problems with "user friendliness" like that, then they also have to be written down and discussed.
Here's a forum thread that I opened for gathering list of major problems that would be nice to solve in the future:
https://www.adventuregamestudio.co.uk/forums/editor-development/ags-4-roadmap-discussion/
#1510
Quote from: lapsking on Tue 26/03/2024 16:54:23In MHO opinion there are too many opinions and it seems that's why the demo is taking longer than the engine.

The demo is taking long, because a) nobody is in charge, b) nobody is working on it; simple like that.

Every project needs a director, who would take a responsibility of making a plan and organizing other participants.
From what I see, this demo project does not have a director. That's why it looks like "too many opinions", and having little progress.

Quote from: lapsking on Tue 26/03/2024 16:54:23Can't engine developers come to a conclusion what they need to be in the demo

Why do engine developers have to do this?!

For example, I am not even making games with AGS, I might be wrong about what's causing most issues with it, and don't know what troubles do beginners have. I could have made a mistake by participating in this discussion at all.
#1511
@PPAentertainment , @lapsking
Just a note, I merged the new topic with an older one, because it's practically same, so it's better to continue the conversation in the same thread, if there's a need to do so.

In regards to the issue, I actually do know that AGS lacks beginner friendly tutorials and demos. While there are some available, they are either old (and do not demonstrate newer features), or spread around the internet. Open source games are not always good example to learn for beginners either, because they were not written with a thought of teaching. Some have complicated code without much comments, others are frankly not written well. I've seen open sourced games which still use ancient and deprecated commands for no good reason (maybe the author was studying old tutorials).

It would be a good thing to have a collection of beginner-friendly materials available in one central location, like the wiki pages on this website.

But the problem with this, as I keep saying, is that this cannot be achieved without community effort, because engine developers cannot handle this all only by themselves.

So this may be solved only if some people from AGS community would be willing to organize such project, and either write wanted templates and demo games, or at least make a list of tasks, and recruit more people to perform these. This should not be a request to engine developers, but a request to a creative community.

Personally, I can only give some advice and recommendation, but I won't be able to do this organization work.
Not only I'm busy, but, frankly, I have low hope about success in this matter, seeing how little interest in such thing there was in the past years.

To summarize: I think this request would be best to post in a general forum section, addressing the community, not engine developers. And it's better to be more specific about what you want, that is, not just "better templates", but explaining what should be in these templates, or demo games in detail.
#1512
@PPAentertainment , I believe you have already made a suggestion about templates, and we had a short discussion about that:
https://www.adventuregamestudio.co.uk/forums/editor-development/suggestions-for-templates/

If it's the same thing, then i'd rather ask to continue that conversation instead of starting a new one.

Just like back then, all I can only say is that it's rather a task for the community and game makers to create templates and demo games, as people who work on the engine already spend enough of their spare time on it, and I don't think it's fair to also request them for making additional materials .

Unfortunately, there does not seem to be much interest from community members. Even with the new "demo game", after 12 years of AGS being "open source", the new demo game was only discussed a little, and afaik 1 room designed, and this is where it stopped:
https://www.adventuregamestudio.co.uk/forums/adventure-related-talk-chat/let-s-build-a-new-ags-demo-game!/

So, unless there is a good amount of participation from community members, this problem will remain.
#1513
Quote from: Alan v.Drake on Mon 25/03/2024 11:00:06If the project is recognized as "not upgraded" the Editor will retry again to upgrade from the CRM files, but this time there wont be the scripts, and this is how these problems arise.

We should probably force a save after an upgrade, or ask for confirmation before proceeding.

I wrote a ticket about this problem in the past:
https://github.com/adventuregamestudio/ags/issues/1596

Not sure if it's the same case though, as this problem occurs only if you close the Editor without saving nor building (or running) the game after upgrade.
#1514
Quote from: Baguettator on Mon 25/03/2024 08:42:08Copy/paste the .asc files from the back up seems to work. but upgrading deletes the asc files... Could it be fixed ?

I never experienced such problem when testing upgrading a project.
Which exact version of AGS 4 are you using? (this may be seen in Help->About)
Does this happen to any project you upgrade or only to a particular one?

room.asc is the only file that is moved to Rooms. *.crm files are not moved, and the rest is created anew. In theory this might mean that file copying or moving is not working for some reason. It may be worth investigating if this process is safe, in terms of checking wether copy operation is successful before removing old files.

Do you have any antivirus, or programs like Windows Defender active on your computer? If so, would it improve the situation if you disable them, or tell them to ignore your project folder before upgrading?
#1515
Quote from: Baguettator on Mon 25/03/2024 04:25:06Perhaps I could try to copy/paste manually the .asc files from my back up directly into rooms folder in the upgraded version ?

Yes, you could do that too.
#1516
Quote from: Baguettator on Sun 24/03/2024 21:27:40The scripts seem to be .crm files, but they are at the root of the game's folder (with othr scripts)

No, .crm files are compiled rooms. Room scripts must be called roomN.asc and located inside "Rooms".
From your post it seems like they are not there.

Do you have a previous version of the game backed up? Does it have roomN.asc files? If so, could you try upgrading once more from backup copy, and see if room scripts appear properly in ags4 version?
#1517
Were you able to check the "Rooms" folder in your project?
#1518
Quote from: Baguettator on Sat 23/03/2024 09:53:58I tried to upgrade my game with 4.0, but when I run it, it crashes and says for all my rooms "if you have deleted roomX.asc, use the Exclude From Game option". What is it intended ?

No, of course that's not intended. The "if you have deleted roomX.asc" is shown when the room script file is missing.
On a side note, that message is silly and should be changed.

Did you have any errors or messages during upgrade?
Is there a new "Rooms" subfolder in your project files, and what does it have inside?
#1519
Quote from: Baguettator on Fri 22/03/2024 05:38:18I'm sorry if I missed something, but are the jagged arrays available for custom structs too ? (I mean for structs I created myself).

There's no such thing as "custom struct" really, any struct acts the same.
The difference in behavior are only added by struct's modifiers, these are: "managed" and "builtin".

Jagged arrays only work with "managed" structs.
EDIT: I made a mistake, apparently they work with non-managed structs too. But I would need to test this to be certain.
EDIT2: Alright, I tested, and they work with anything: simple types (like "int"), normal structs and managed structs.
#1520
Quote from: Snarky on Thu 21/03/2024 06:41:0812. Game updates. In Ren'Py you can update the game and saves from older version will still work (though if you make major changes, you might have to write a "converter" to update the savegame). In AGS, almost any change to the project breaks all existing saves.

With VN game, I suppose, you should be better scripting your own save system in AGS.

EDIT: actually, I think that VN makes it easier to write your custom save format, compared to a classic p&c game.
SMF spam blocked by CleanTalk