Community
AGI Programming => AGI Development Tools => Topic started by: zephyern on October 03, 2022, 06:52:28 PM
-
Firstly, WinAGI is amazing. I'm new to the AGI space and this program is allowing me to make the game I've always wanted to make. Thank you so much!
I've been working on a game for about a month now and had some questions about WinAGI. I think this is the right place to get the answers.
Questions:
1. How to edit View Descriptions in WinAGI?
In the help file for editing Views it says that "View Description" is a read-only property of a view. I'm just curious how we set a custom view description? Without a view description, showing a view via show.obj() crashes ScummVM.
2. Is there any way to Log() from ScummVM?
This may not be the right forum, but just wanted to check if anyone was able to figure out which interpreters implement Log()? According the to spec, Log() writes to a local log file. While testing the game with friend and family, it would be super useful to me if I was able to capture all the text that they've typed that I didn't handle responses for. Just curious how best to do this? :)
I've tried calling Log() when running my game in ScummVM, but I don't see any output anywhere. :)
Bug:
3. When right-clicking on a view and choosing "Renumber", I get an error when I click on view #5 or higher. The error is "617: Invalid Resource Number". This happens only when clicking on a view numbered 5 or higher and happens always -- even if I create a new project.
Thanks again! Everything else I've tried works perfectly. This app is so amazing. :)
-
Just found this in ScummVM. Looks like log() in a no-op in their interpreter.
https://github.com/scummvm/scummvm/blob/90f2ff2532ca71033b4393b9ce604c9b0e6cafa0/engines/agi/op_cmd.cpp#L787-L788
boo.
-
Hi zephyern, welcome to the site! Thanks for the compliments. (I'm the creator of WinAGI!) And this is the place to ask questions.
The ViewDescription property can be edited when you have a view open in the View Editor. It cannot be edited from the Resource list property box (that's what the Help file is talking about). If you have a view open in the editor, click on the top item in the tree list (it will have the same name as the viewID). The editor property window has a 'ViewDesc' property. Double-click the property (or click on the arrow) to get a text box where you can insert whatever text you want.
I hardly ever use ScummVM, so I can't offer much help there. It looks like you found your answer though.
Regarding that bug, can you provide more specifics? I am not able to reproduce it, and I don't think there's any code in the renumbering function that would display an error message such as that. Maybe a screen shot showing the exact error? And the exact steps you are taking that causes it?
In the meantime, try moving to version 2.2.5 - it's available on the wiki:
http://agiwiki.sierrahelp.com/index.php?title=File:WinAGI_2_2_5.zip
I'd be curious to see if the error is still there for you in that version.
-
Just found this in ScummVM. Looks like log() in a no-op in their interpreter.
Have you tried NAGI? It looks like the log file is implemented in that one:
https://github.com/sonneveld/nagi/blob/master/src/log.c#L34
Also, the source code for the original AGI interpreter suggests that it should work if you try a genuine AGI interpreter with Dosbox. I may have tried this at some point in the past... we're talking 25 years ago, so can't remember now if it worked. It is obviously a testing feature, so it is possible they may have disabled it in some releases, but given that NAGI has it, which is based on a disassembly of the original interpreter, then I think the original should also support it.
Since you've made a request for this, I am now thinking about putting it into my as yet unreleased AGI interpreter. I did the same as scummvm and commented this log command saying something along the lines of it not being required, but I can see how it might be useful. I could either implement it exactly as the original AGI interpreter did it, or could in theory log additional detail. I've been tinkering away at my interpreter (AGILE) over the past few weeks thinking that I should really tidy it up and put a release out, so watch this space.
-
Good to see you again, Lance! Stick around.
-
Also, the source code for the original AGI interpreter suggests that it should work if you try a genuine AGI interpreter with Dosbox.
The log command does work in DOSBox with original Sierra interpreters. Simple to prove by a) viewing disassembly [which I have, and can confirm it is in every v2/v3 version], or b) use it in a game - it does in fact work as described. It's included in all the template games if you want to give it a go.
Also, to echo Collector, it is good to see you active again. I'm interested in seeing your new interpreter. After I finish my current project, I need to get back to porting WinAGI, and your work on AGILE might be helpful for that. At least it'll be motivational!
-
Good to see you again, Lance! Stick around.
Also, to echo Collector, it is good to see you active again. I'm interested in seeing your new interpreter. After I finish my current project, I need to get back to porting WinAGI, and your work on AGILE might be helpful for that. At least it'll be motivational!
Thanks both. I'm currently looking at the options available for releasing a C# winforms app with an installer. This is something I've never done before, in fact, as mentioned right back at the beginning when I started this interpreter, this is also the first time I've written something in C#. My commercial experience is mostly in Java, with a bit of Javascript. So the coding might look a bit like a Java dev is writing C#. Anyway, this afternoon I'm going to play around with the Visual Studio Installer Projects Extension, and perhaps the Wix Toolset Visual Studio 2022 Extension, to see if one of those might serve the purpose. I may try both to get a comparison and then make a decision as to which to go for.
-
Thank you all for your responses! Sorry for the delayed response.
- How to edit View Descriptions in WinAGI?
The ViewDescription property can be edited when you have a view open in the View Editor.
Oh, this is perfect - I didn't see it there! Thank you!
- Is there any way to Log() from ScummVM?
I hardly ever use ScummVM, so I can't offer much help there. It looks like you found your answer though.
I've actually just submitted a PR to ScummVM (https://github.com/scummvm/scummvm/commit/a03b25a61a1c71c22ddd639c14a2e52ed8e81ed4) to implement this functionality. All good now!
- Bug: When right-clicking on a view and choosing "Renumber"...
In the meantime, try moving to version 2.2.5
Updated to 2.2.6 and the renumber bug appears to be fixed. Thank you!
Great to see such an active AGI community. :)