Community
AGI Programming => AGI Development Tools => Topic started by: MusicallyInspired on February 21, 2024, 11:41:26 AM
-
Did we know about this?
https://www.youtube.com/watch?v=f73oKyRl4tI
-
Cool!
Found the following related links:
- blog post about it: https://craftercms.org/blog/2024/happy-40th-birthday-kings-quest
- source: https://github.com/russdanner/craftercms-sierra-agijs
- game: https://let-them-eat-cake.com/
- game source code: https://github.com/russdanner/agi-studio-let-them-eat-cake
-
Impressive!
-
Really impressive! I didn't know about this project, but reading through the blog post, I have realised that I did come across the agi.js project previously (https://github.com/r1sc/agi.js), the one that he has continued the development of. So, the HTML5 version of AGILE won't be the first AGI engine written directly as an AGI interpreter targeting the web browser, as agi.js would hold that title by quite some number of years. It doesn't look to be particularly compatible though, both the appearance (e.g. text windows, animation), and I suspect it will struggle with some of the more challenging AGI games to fully support. I really like that Russ has highlighted the 40th anniversary of King's Quest. I plan to do the same when I launch the web version of AGILE.
-
Looking into it a bit more, Russ Danner, the author, is Vice President at CrafterCMS (https://craftercms.com/about/team) and cofounder of CrafterCMS. As he mentions briefly in his blog post, his version of agi.js reads the AGI resource files in JSON form, and indeed his repo for the source code of his demo game has the AGI resources stored in JSON form. Looking at the data though, it is still the same data, just in JSON form. I might be able to make AGILE support it then. Either that, or it should be possible to convert it back to original AGI format. Maybe the later would be a better approach actually. If we did this, it would be yet another AGI fan made game.
-
Watching the Youtube video again, and paying close attention this time, I see that the compile button will actually compile to DIR, VOL, etc. files, so I started thinking that that is probably the best way to get the Let Them Eat Cake game in original AGI format. I'm really struggling to get the game loaded into the AGI Studio site within CrafterCMS though. I did eventually manage to get CrafterCMS installed and running, and also successfully added the "AGI Studio" site into CrafterCMS, but it appears to hang when I try to load the game into it. I may have to contact Russ for tips, as it isn't clear.
I have noticed though that the running game in the browser is loading the data files with original AGI file names. It must only be in the CMS that it stores in JSON, i.e. prior to export to AGI format. The VOL and DIR files appears to load fine into WinAGI, but the OBJECT and WORDS.TOK files don't appear to be. Likewise, AGILE is struggling with these two. Need to dig into it a bit more to see what the difference is. Obviously agi.js is able to decode them, as the game runs fine in the browser, and I've played about 1/4 of the way through, but it doesn't appear to be standard with regards to those files. I'm sure things will reveal themselves after digging into it a bit more.
I'll also have a go at reinstalling CrafterCMS, which seems to be necessary every time after it hangs on a failed game import. Can't see any other way to recover from this hanging state at the moment.
-
The first issue is that the first two bytes of the OBJECT file are around the wrong way, which is what holds the offset to the start of the inventory item names, or, if you prefer, the length of the section that contains the offsets to the start of each inventory item, and from which we can also calculate the number of inventory items. So it falls over right at the start with those two bytes being around the wrong way.
I manually swapped the two bytes. The next issue is that the section containing the offsets for the start of each inventory item is all 00s, so hasn't been included. This is bad news for AGILE, because it uses that to get the name of each inventory item. I assume WinAGI might be doing the same. It isn't so trivial to manually fix that one in a hex editor, but as the file isn't too long, then maybe I'll give it a go this evening. The agi.js code that Let Them Eat Cake is using is loading the OBJECT file by jumping straight to the start of the inventory names section and then loading each one in the order that it encounters them, which makes the assumption I guess that the inventory item offsets will always be in that order.
-
Would it be possible to write a second function to read the CrafterCMS OBJECT file and detect if the target game is a standard game or a CrafterCMS game?
-
I suspect that Russ was intending to export a properly formatted AGI OBJECT file but may have misinterpreted the AGI spec documentation. I've found another difference in the Let Them Eat Cake OBJECT file and that is that the "Avis Durgan" encryption is used in a non standard way. The 0x00 between words is not encrypted, but the word text is, and the XOR encryption resets to the start of "Avis Durgan" for every word. The whole of the header section is not XORed with "Avis Durgan". All of that is non standard, but the attempt to make use of "Avis Durgan" makes me think that the CrafterCMS AGI Studio is intending to produce a standard OBJECT file and that the differences are bugs in that export rather than a deliberate choice to produce a different format. I will make contact with Russ soon, once I have worked out all the differences in the exported files when compared with standard AGI files.
Looking at the OBJECT file that it currently has, I can't see how it could successfully read in one of the item names. There is an item called "Invitation", but the "n" at the end when XORed with the "n" in "Avis Durgan" has produced 0x00, and then there is an unencrypted 0x00 after that to end the word. It isn't possible to tell the difference between these two 0x00 bytes. I will have to play through to the part of the game where the "Invitation" item is to see if it has successfully read the whole word in.
The differences in the OBJECT file are such that it is quicker to simply recreate the OBJECT file in WinAGI using the same item names and starting rooms than to fix the original file. So that is what I have done. I'll start checking the WORDS.TOK file now.
-
The WORDS.TOK file appears to load fine into AGILE, but there are encoding issues with other resources. Several LOGICs, VIEWs, and SOUNDs fail to load, and the same is true in WinAGI when it tries to import it. It would be quite time consuming to identify every issue in the encoded files. I like the concept of the CrafterCMS AGI Studio though, i.e. that it has editors than run within the web browser. I can see it pairing well with the web version of AGILE, when it is released. To make that work though, I'd either need to directly support the JSON format that CrafterCMS stores the data in, or I'd need to write an in between encoder that produces 100% compatible AGI resource files. They both seem to be non-trivial tasks.
-
My vote would be the in between. It would be nice to see cross compatibility that would load games regardless of source.
-
I've been in email contact with Russ and he says he would like to join in the discussion with regards to this thread, so he has submitted a sign-up request. Could an admin user approve his account, if not already approved? Thanks.
-
Should be done already.
-
Cool, thanks. I suspect he might join in soon then. Just wanted to confirm he was all set up.
Has anyone else played through much of his game? If you finish it, then let him know, as he plans to do a special release acknowledging those who finish the game by a certain date.
-
russdanner? if so it looks like he is in.
-
Hi everyone.
I am pleased to e-meet you. I had no idea this site (or all the games and discussion) existed. Awesome! Thanks for the "add."
A quick thank you to anyone who has or is playing the game. I am happy to make improvements and fix bugs, etc, as long as it doesn't change the points/plot. I added some basic analytics on what people enter as commands in each room, which has been educational. I clearly need to improve my vocabulary, Also every bit of the game and the tools that built it are open source if that helps anyone. Thanks again if you have given the game a go. I hope you got a few chuckles and moments of nostalgia from it.
Lance and I briefly chatted about the game's "compatibility issues." Some of these are compiler bugs and should be easy to address. I'll do that ASAP. There may be [are] other issues that are true engine compatibility issues because I "built to" AGI.js. These may take a bit more effort, but I think it would be worth it to address them as well.
I suppose a whole other topic is AGI.js. The project felt dormant when I found it, but I revived and extended it enough to meet my goals. It sounds like there are alternatives with more robust adoption. I'm not married to keeping AGI,js alive if there's a better answer. I do appreciate all the original work that went into it. The lot of you who are keeping these games and game engines alive are heroes <3
-
Hi Russ. Welcome to the site! Congrats again on the interesting approach to a suite of AGI development tools. Thank you for all the hard work you have put into it. As @AGKorson (author of WinAGI) will know from a chat I had with him a few months ago, one of my longer term goals was/is to build a web based AGI development "IDE". My current project (web version of AGILE) is meant to be a step towards that, in addition to what I think will be well received as a standalone interpreter. When I saw your tools, I thought, "Wait a second! This is almost exactly what is needed for the editor side of things". I haven't yet played around enough to see how polished it is, as I was struggling to load a game into it, but given you used it to build Let Them Eat Cake, then it must be a long way towards something that other people can also use.
As I mentioned via email, both myself and @AGKorson should be able to help you debug some of the export issues. Earlier messages in this thread covered the OBJECT file already. A good resource for technical information, in addition to the AGI specs, is the help section of the WinAGI tool. It contains the biggest collection of technical information about AGI and how it works. Andrew has put a massive amount of effort into that. I just checked and it does indeed have very detailed pages covering the various file formats. Looking at what it says about the OBJECT file, I don't think it specifically calls out the order of the first two bytes. I think with AGI though, it is generally LO byte then HI byte (@AGKorson may know of exceptions to that), so the following code has it the wrong way around:
https://github.com/russdanner/craftercms-sierra-agijs/blob/master/sources/studio/plugin-agi-studio/src/packages/agistudio-components/src/agibridge/AgiLogic.tsx#L799
I see from the source that the code to populate the header section with the pointers to each item is commented out. That would explain why it is all 00s then. Regarding the use of "Avis Durgan" (interesting side note, if you do not already know, is that this is Jeff Stepheson's wife's name, who also worked at Sierra Online for a while, and whose name he also hid in a number of the hires text adventures that came out prior to the AGI era), it is the whole file that is encrypted. So rather than XORing the bytes as they're being added to the byte array, you should leave it as the final step, i.e. write all the bytes unencrypted then encrypt the whole byte array from the start, where every 11 bytes starts again with the "A". I would recommend either the WinAGI source or VisualAGI source as a reference, both of which have OBJECT file encoding logic, if it were not for the fact that neither repo is publicly available at the moment. I'm sure that either @AGKorson or @Collector would set you up with access to the relevant code though.
btw, if you have analytics set up on your game site, do you know yet how many people have finished the game? Or are close to finishing?
-
HI Russ! Welcome! It's great to find more people who are interested in keeping the spirit of AGI alive.
I haven't played through the entire game yet, but I did check out the first room, and also scanned through the source code for both the game and your tools. I too noticed a few things regarding incompatibility along the lines of what Lance has mentioned. I see you based your work on the older version of the AGI specs. Unfortunately those haven't been updated in a LONG time. Since those were written, we've learned a lot more detail about AGI, including file format, interpreter operation, glitches and bugs in both the interpreter and the games that need to be considered, etc. I've fully disassembled all v2/v3 MSDOS AGI interpreters, and documented the results in the WinAGI help file. It's probably better to start there than with the older AGI Specs - at least unless/until someone does a full update of them.
I don't have time to do a detailed analysis of your code, but I'm happy to answer any specific questions you might have about any particular game or interpreter issue. I'm up to my eyeballs in C# code right now, as I'm trying to learn it on the fly while porting WinAGI from VB6 to C#. It's taking a lot of effort to teach this old dog new tricks! If you want to follow along, the repo for the port is available here: https://github.com/AGKorson/WinAGI-GDS. None of the editors are working yet, but most of the code for handling game files and resources is complete, and so far it seems to be able to open and preview all game resources error free. So you might find some useful code in there. Or maybe not- I'm still quite new to C#, so I'm probably not writing real efficient, clean code yet. but it is (will be) functional.
When I do get around to the editors, I will certainly look at including support for CrafterCMS/AGI.js versions of resources.
Oh, and here's a plug for WinAGI: you can download the latest version here: http://agiwiki.sierrahelp.com/images/c/c6/WinAGI_2_3_6.zip. If you want to create a full featured AGI game in the old Sierra style, there's no better game development system out there.
-
I wanted to take a look at how far you have come along with the C# port, but it fails to build 'EngineResources.resx'
MSB3103 Invalid Resx file. System.Xml.XmlException: An error occurred while parsing EntityName. Line 319, position 50.
<data name="4067" xml:space="preserve">
<value>Invalid character in define name: !" & QUOTECHAR & "#$%&'()*+,-/:;<=>?@[\]^`{}~ and spaces are not allowed</value>
</data>
-
yeah, I was editing that one outside of VS, and forgot that some symbols can't be included as literals - '<' and '&' for example. I just fixed it about 10 minutes ago. Give it a try now.
-
Hi AGKorson,
I'll take a look at the WinAGI source code. I am not a .Net developer. I code Java and React/Typescript on the regular. I have a background in C and C++, so I should be able to fake my way through it.
Once I get my bearings more on what's useful long-term, I'll decide what to do with the JSON source formats I came up with, the logic files (which should be pretty close to other AGI source files), the tools, and the engine.
There are a lot of parts here:
1. the source formats
2. the tools that build them/CrafterCMS
3. the AGI.js engine
4. the Let Them Eat Cake game
I know I'd like the resources game to run on any AGI engine and be loadable in any tools.
It seems like there's a major bias toward Windows in the tools community. I'm over here with my Linux box and Mint :) I can sort of run the tools in the community with WINE but it's pretty dodgy.
-
@Lance
I've just introduced them. I added event hooks on said(...) that put/sub events that the web page can listen for. My goal was to learn what updates were needed to WORDS.TOK to make the game more accessible. I should add a lot more events (but I don't want to impact anything for the user)
I have about ~500 players in the last 2 months across the following counties and one person in Poland who has a bot or something running constantly.
Poland
United States
Canada
Australia
France
Sweden
United Kingdom
Norway
Germany
Greece
China
Netherlands
Austria
Czechia
Denmark
New Zealand
South Africa
Belgium
Chile
Finland
India
Italy
Mexico
Argentina
Bolivia
Brazil
French Polynesia
Israel
Portugal
Spain
T?rkiye
Only a handful of people have contacted me to say they won.
I don't see any rooms in the last week and a half (since I've been collecting room data) that indicate a win.
-
It seems like there's a major bias toward Windows in the tools community. I'm over here with my Linux box and Mint :) I can sort of run the tools in the community with WINE but it's pretty dodgy.
These days, my main machine is a Microsoft Surface Pro 7+ tablet running Windows 11, and as of a few days ago, I've got Linux running on there with the Windows Subsystem for Linux, as per your CrafterCMS instructions for setting that up as a requirement.
I've also been aware that the tools are mostly for Windows. It is partly why I decided to write the original version of AGILE in C#, despite Java being the language I know best, not only to learn C# in the process, but also so that it would be available for others in the AGI/SCI community to pick up and further extend. Now that AGKorson is porting WinAGI over to C#, there might be a way to integrate the C# AGILE interpreter into WinAGI more easily. Visual AGI is a partly built AGI tool suite that is also written in C#, so that could also be completed one day with AGILE integration.
There is QT AGI Studio that runs on Linux (https://git.cromer.cl/cromer/qt-agistudio/releases). I haven't tried that much myself. There is also the Java version of my PICEDIT tool that can run on Linux, but that is a standalone tool that modifies the PICTURE files directly. It isn't integrated with anything and you need to manually import the created/modified pictures into another IDE, such as WinAGI or AGI Studio.
This is one of the reasons that I see a lot of promise with the online tool suite that you're working on, since it would be available to people regardless of platform. I assume that you will probably run an instance of the tools somewhere online once you have it working well? If so, then people could sign up and start building AGI games on there, and it would keep a backup of the files in the database, ready to continue development the next time they log in. It is the ultimate really, similar to these modern web based sites like Construct3 or Scratch. I see that as a long term way to gain some interest in AGI again, from a different generation, one that is used to using online visual tools to build webhosted games. We might even be able to get the tool used in some school lessons ;D.
Big dreams.
-
yeah, I was editing that one outside of VS, and forgot that some symbols can't be included as literals - '<' and '&' for example. I just fixed it about 10 minutes ago. Give it a try now.
I didn't realise that you had the repo of the C# version available yet. I'm keen to give this a try as well. Adding it to my list to hopefully try out this evening.
-
I have about ~500 players in the last 2 months across the following counties and one person in Poland who has a bot or something running constantly.
Wow! That's quite a list of countries. I'm surprised by some of them. Sierra On-Line must have been known almost everywhere.
I'm originally from New Zealand, so I know that they were popular there. I'm currently based in the United Kingdom, so I'll be one of the hits from there.
There were certainly a few phrase combinations that didn't work for me. I can't recall them now, but it sounds like you would have them in your list. As I mentioned in my email, I most recently got up to the part where I crashed the space shuttle ******* ******* * ********. That's probably a spoiler, so won't say what actually happened. I think that must be roughly half way through. Hopefully I'll get a chance to continue playing this evening.
-
yeah, I was editing that one outside of VS, and forgot that some symbols can't be included as literals - '<' and '&' for example. I just fixed it about 10 minutes ago. Give it a try now.
That fixed it. The fix was what I was about ready to try if I had had more time to mess with it. More remnants of VB than I would have thought, but I guess not too surprising given it seems to be more of a port. One point of curiosity is that I was under the impression of is that you were going to use the FastColoredTextBox control for the logic editor and it looks like you are using just a RichTextBox, or is that just place holder?
-
I was under the impression of is that you were going to use the FastColoredTextBox control for the logic editor and it looks like you are using just a RichTextBox, or is that just place holder?
Yes, that's just the preview window - no editing yet. I still got a ton of work to do on basic game and resource handling before I will start on the editors. (I'm in the middle of fixing the logic decode functions right now, so the Import function is pretty fouled up at the moment. But it will open and display games from a v2.3 wag file just fine.
-
Understood. Just curious, no rush.
-
@russdanner, I played your game again for a bit last night. Died again a few times. There's a lot of ways to die! Reminds me of the original KQ. Is there a save game feature yet? I got as far as obtaining the cake, which must be getting close now, then stuck my head in somewhere I shouldn't have. I'll try again this evening.
-
@russdanner, I played your game again for a bit last night. Died again a few times. There's a lot of ways to die! Reminds me of the original KQ. Is there a save game feature yet? I got as far as obtaining the cake, which must be getting close now, then stuck my head in somewhere I shouldn't have. I'll try again this evening.
You are getting there but there are several difficult puzzles in front of you and one major easter egg so to speak.
You can type SAVE and RESTORE top open the dialogs for those actions.
I should hook up F5 and F7 like the good ol days. I was asked by a speed runner to make the game more speed-run-friendly but my guess is that the speed runners will want it to run on SCUMVMM
-
Ah, I see. I'd been trying "save game", which didn't work. I'm in the habit of using that, so perhaps that is one of the phrases supported by the original games. Just checked KQ1 and it works in there, but not "save" as it turns out. I didn't want to check your logic scripts to see what was being used, as I'm trying to avoid spoilers for now.
It should definitely help me complete the game, now that I can save. I was previously starting from the beginning each time :D
-
OOF That's impressive! I would expect to be lit up for that.
I will add support for Save|Restore Game to the WORDS.tok
-
It should definitely help me complete the game, now that I can save. I was previously starting from the beginning each time :D
It took my father and me one year to finish KQ1 because we didn't know how to initialize disks and so on. It was our first adventure game. I would say it was enough copy protection in itself.
-
OOF That's impressive! I would expect to be lit up for that.
I will add support for Save|Restore Game to the WORDS.tok
I'm up to about 28 out of 40 in the score now. I think I may have hit one of those more tricky puzzles that remain. I have an idea what to do but so far haven't worked out the right word combination, assuming I'm thinking along the correct lines. I will continue exploring and trying things out.
I think as long as the remaining puzzles are not as hard as that infamous reverse alphabet puzzle that the first releases of KQ1 had, then I'll hopefully be finished by the end of the weekend.
-
It took my father and me one year to finish KQ1 because we didn't know how to initialize disks and so on. It was our first adventure game. I would say it was enough copy protection in itself.
I can't remember now what Sierra game I was stuck on for the longest. I do remember that I finished SQ3 in a single weekend. The puzzles seemed obvious for that one. But for SQ2, it was about two months before I finished it. I don't recall any other "finish lengths" from my first play throughs.
Regarding copy protection, I remember using my original SQ2 disk to get past the copy protection check for an installation of KQ3 that happened to be on the hard disk of a second hand IBM PC XT that we had inherited. No idea who actually installed it but it was my first experience with KQ3.
-
I think as long as the remaining puzzles are not as hard as that infamous reverse alphabet puzzle that the first releases of KQ1 had, then I'll hopefully be finished by the end of the weekend.
@russdanner, it turns out I was only 20 minutes from finishing the game. I have now completed it and have emailed you a screenshot of the final screen as evidence. I assume you also got the analytics event to say another person finished it.
It was really fun to play. Thanks for all the hard work. I'm looking forward to when the data files are in 100% AGI compatible format so that I'll be able to include it in my AGILE web launch.
-
Does the https://let-them-eat-cake.com/ version include the most recent bug fixes? I'm running into a lot of seemingly obvious issues on Chrome that aren't mentioned on the game's github. I couldn't make progress after the tube control room, but I documented the bugs I ran into up until that point - attached below.
Also, this might be a personal preference thing, but I'd really prefer the messages to use the system font instead of the raster fonts. Seems so out of place.
-
I couldn't make progress after the tube control room, but I documented the bugs I ran into up until that point - attached below.
I got stuck there for a bit, but then tried to retrace my steps shall we say.
Also, this might be a personal preference thing, but I'd really prefer the messages to use the system font instead of the raster fonts. Seems so out of place.
Yeah, I agree with this. This will be a feature of the agi.js interpreter that Russ forked to use for the execution of the game. This is one of the reasons I'm keen to get the game up and running within AGILE, since, in theory, many of those issues would be fixed automatically by running it in an interpreter such as AGILE, NAGI, scummvm, or obviously the original AGI interpreter.
After seeing your post, I realised that I should also have been reporting bugs to Russ. I saw many of the same bugs that you mention in your list. My assumption is that all the priority issues, of which there are many, is also a "feature" of the agi.js interpreter and not the PICTURE data files, as the priority issues occur in pictures that are obviously copied from original Sierra games. Now that I've finished the game, I have loaded it into WinAGI (as much as successfully loads in, the PICTUREs appearing to load fine) and the priority screens themselves look fine to me. Nothing in them to explain the priority issues in the game. Hmmm... just noticed a few PICTUREs I didn't see during my play through. It looks like I might have to play through again to find those rooms. Apparently visiting them isn't required to finish the game, but perhaps it explains why I finished with only 38 out of 40.
Issue #1 and #2 would also be bugs in agi.js. For issue #4, I assumed that this was deliberate, as it is fairly obvious. I thought that perhaps that captures the nature of sweeping, which sometimes involves moving backwards. - Yeah, I also noticed issue #5. I need to play through again and make a list of bugs... anything I can see that you haven't already mentioned. - Regarding issue #9, I saw in many rooms that certain word combinations that I tried did not have any response at all. In some cases actually, the same word combination worked fine in the room next door, even though the sentence related to what I was carrying rather than what was in the room. - Issue #17 would be related to a bug in agi.js.
I also saw issues in some places where the drawing of certain VIEW cells appeared to be corrupted. It kind of gets drawn static-y, where the pixels are jumbled up a bit.
-
I'm only pointing out bugs Russ may or may not have noticed. These were intended as constructive criticisms from what I saw in my play through. I wouldn't hold it against him if re-writing the message handling was out of scope for this project. Honestly how does anyone keep personal projects in their head with all this work bullshit?
-
Yeah, I realise that, and I'm sure Russ does as well and would really appreciate the constructive feedback.
I know what you mean about work getting in the way. I envy Russ, as it seems that he's found a way to combine his work and Sierra game development together. It's a nice proof of concept for the CrafterCMS. Wish I could think of a way to incorporate a Sierra fan project into my work ;D
-
I finished the game. Had to look at the source code to figure out a step in the final puzzle. I probably missed a bunch of stuff considering I never used one of the inv items (not counting the glitched item). Added a bunch of bugs in the file below, but nice work over all.
-
I finished the game.
Cool! :) So that makes two of us now.
Just wanted to double check with other people reading this thread: Are any of you playing through the game? If so, I'll hold back talking about things that might be a spoiler. Or are we free to start discussing parts of the game?
I probably missed a bunch of stuff considering I never used one of the inv items (not counting the glitched item).
Yeah, I missed a couple of points, and when I loaded the game into WinAGI after having completed it, and started looking through the pictures, I can see at least three rooms I didn't go into, assuming they're linked up to the rest of the game map. I haven't started looking through the logic scripts yet, but will do when I get some spare time. Will be interesting to see what I missed.
-
It's very weird seeing AGI.js used for... well, anything! It's probably 10 years ago I did any work on it whatsoever. It was left in a very early and bug-prone state and it was eventually left to rot. :/
I touched on the AGI engine again a couple of years ago with TinyAGI, for the Raspberry Pi PICO. That went much further and got pretty much feature complete as I remember it. Seeing AGI.js actually being used kind of makes me want to start "working on it" (read: rewriting it) again though :)
Btw, from what I remember, AGI.js actually packed the IBM VGA font and the rendered text would look identical to how it was drawn in the original AGI engine. However the message box functionality itself could have had so many problems that the OP was motivated to replace it.
-
Hey! Welcome back r1sc! I had forgotten that you'd previously posted to the forums, or that I'd replied back then. My memory must be getting worse. Nice to see you back! :)
tbh, I had forgotten about agi.js when I started out on the web version of my interpreter, otherwise I would also have considered forking your repo as a potential starting point for what I have in mind as a long term goal. But when CrafterCMS was discovered recently, I thought.. "Oh, yeah... I remember now, trying agi.js out in the past". I had even starred your repo!
A few years back, I started on a pure JavaScript port of my AGILE interpreter (by hand) called agile-js. One of the reasons I didn't end up completing it was that the process of manually converting C# to JavaScript was a bit laborious and error prone.
Then fast forward to around the end of November last year, I had the idea to convert the C# version to Java, as a stepping stone to transpiling to JavaScript using libgdx and GWT, and that went really well. Java is more similar to C#, so I could literally copy and paste a lot of the code and then work through all the bits that needed Java equivalents quite quickly. The cool thing is that the C# version already had a high level of compatibility, and so the Java code also should, in theory, have high compatibility.
Long story short, I could have saved myself several months if I'd remembered agi.js and forked that instead. If you are planning to continue development of agi.js, perhaps in conjunction with what Russ is adding, then I could potentially also help here and there.
-
It took my father and me one year to finish KQ1 because we didn't know how to initialize disks and so on. It was our first adventure game. I would say it was enough copy protection in itself.
I can't remember now what Sierra game I was stuck on for the longest. I do remember that I finished SQ3 in a single weekend. The puzzles seemed obvious for that one. But for SQ2, it was about two months before I finished it. I don't recall any other "finish lengths" from my first play throughs.
Regarding copy protection, I remember using my original SQ2 disk to get past the copy protection check for an installation of KQ3 that happened to be on the hard disk of a second hand IBM PC XT that we had inherited. No idea who actually installed it but it was my first experience with KQ3.
Space quest I.. the glass. I was trapped by that for MONTHS!
-
I think as long as the remaining puzzles are not as hard as that infamous reverse alphabet puzzle that the first releases of KQ1 had, then I'll hopefully be finished by the end of the weekend.
@russdanner, it turns out I was only 20 minutes from finishing the game. I have now completed it and have emailed you a screenshot of the final screen as evidence. I assume you also got the analytics event to say another person finished it.
It was really fun to play. Thanks for all the hard work. I'm looking forward to when the data files are in 100% AGI compatible format so that I'll be able to include it in my AGILE web launch.
Thanks for playing. I have a couple of priorities to knock out, and then I'll come back and jam on compatibility. In a busy stretch here.
-
Does the https://let-them-eat-cake.com/ version include the most recent bug fixes? I'm running into a lot of seemingly obvious issues on Chrome that aren't mentioned on the game's github. I couldn't make progress after the tube control room, but I documented the bugs I ran into up until that point - attached below.
Also, this might be a personal preference thing, but I'd really prefer the messages to use the system font instead of the raster fonts. Seems so out of place.
Thank you for capturing these!!
-
It's very weird seeing AGI.js used for... well, anything! It's probably 10 years ago I did any work on it whatsoever. It was left in a very early and bug-prone state and it was eventually left to rot. :/
I touched on the AGI engine again a couple of years ago with TinyAGI, for the Raspberry Pi PICO. That went much further and got pretty much feature complete as I remember it. Seeing AGI.js actually being used kind of makes me want to start "working on it" (read: rewriting it) again though :)
Btw, from what I remember, AGI.js actually packed the IBM VGA font and the rendered text would look identical to how it was drawn in the original AGI engine. However the message box functionality itself could have had so many problems that the OP was motivated to replace it.
Finding this project literally made my day. I compiled it and loaded up KQ1 and SQ2 and hooked!!
-
Hi @Lance,
Quick question for you regarding the fixes for the CrafterCMS tools, targeting agile-gdx here:
My baseline assumption is that if the resources work properly in AGI Studio for Windows (running in WINE in my case), they will largely work in AGIle-dx.
After that I think I am going to need to build and test in Agile-gdx to see how well the computer matches regarding the logic files.
Is that a fair assumption?
Time to get going.
-
@russdanner, yes, that is correct. If it loads into AGI Studio or WinAGI without any issues, then it will import into agile-gdx. I noticed that you have forked the agile-gdx repo. Were you able to build it fine? There is a github action that builds it and currently deploys the HTML5 version to Cloudflare Pages. It includes setting up a couple of HTTP response headers that are required in order to use certain JS APIs in the browser. I'm currently using a script to password protect the website, so that it doesn't get shared around much while I'm still working on the finer details, one of which will be deciding on what the long term domain name will be, but I'd be quite happy to set people up with access to it. You could also build the project using gradle (using the html:dist task) and then the output under the html/build/dist folder is the generated static web content. To run it locally though, you'd need to set up your webserver to set the required HTTP response headers.
I'm not far off doing a first release for testing. I'm looking for testing volunteers. I'm currently tweaking some of the usability aspects, such as the virtual keyboard and virtual joystick. I'm guessing that a lot of people out there will try visiting the website using their phone, so I'm putting a lot of the focus into making that as easy to use as possible.
-
I haven't had luck getting WinAGI via WINE on Mint/Ubuntu, but I did get an older (I think) program called AGI Studio. I'm going to work towards getting the resources to load in it.
https://www.loom.com/share/3d965d5f66aa48d283dd1316a830b77f?sid=c0581eee-7669-43fb-b6bd-47225e7bd491
I haven't tried a build of AGILE yet, but I am excited to try it :)
-
@russdanner, how are you getting on with this?
As mentioned to you via email (for other people's info), I have next week off and am planning to use it in a concerted effort to close down the remaining items on my todo list in preparation for making an initial testing version of agile-gdx available for people to try. That would then be 1 month before the 10th May 2024 King's Quest 40 year anniversary, so I'm hoping that anything that people find during that 1 month I can then fix prior to "launching" it to the wider world.
It would be really great if we had a working build of Let Them Eat Cake that is 100% AGI compatible by then, so that I can package it up in that first public release.
A question for @AGKorson: Is there any chance that you could release a version of the Power Pack demo game that doesn't rely on the Power Pack? I think it would be great if I could include that as well. Unfortunately, I don't think I'll be able to support the Power Pack itself from day one, which is why I'm asking about a version of the game that doesn't require it.
-
The Power Pack Demo intentionally contains a lot of content that only works with the power pack. But I will take a look at it to see if I can strip out those parts. The exploration parts can probably be converted to true AGI without too much effort.
-
The Power Pack Demo intentionally contains a lot of content that only works with the power pack.
Yeah, I realise that. I wish I had the time to implement all the Power Pack features before the 10th May, but as you would know, its far more involved to do so than the various other AGI "hacks". I was surprised at how easy it was to implement support for the other hacks, i.e. AGI Mouse, AGI PAL, AGI256 and AGI256-2. I wanted to give you the opportunity to include a version of the Power Pack demo game with the initial launch of agile-gdx, but I fully understand if you think it isn't viable. I realise that the whole point of the demo game was to show off the Power Pack features.
But I will take a look at it to see if I can strip out those parts. The exploration parts can probably be converted to true AGI without too much effort.
If you could, that would be awesome. I really like the setting off the Power Pack demo and it ties in quite well with the whole idea of a 40th anniversary. From what I've been able to work out so far, it was around September 1984 that Sierra moved into the "redwood" building that your game is set in. Hmmm, I guess if we are not able to include something in the initial May release of agile-gdx, then we could target September as a 40th anniversary of the move in to that building and that gives me a target to work towards to add Power Pack feature support.
My week off has just begun, so I'm going to be focusing on agile-gdx a lot this week and will probably be quite active on this site.
-
[quote author=AGKorson link=topic=9202.msg75191#msg75191 date=170906137
Oh, and here's a plug for WinAGI: you can download the latest version here: http://agiwiki.sierrahelp.com/images/c/c6/WinAGI_2_3_6.zip. If you want to create a full featured AGI game in the old Sierra style, there's no better game development system out there.
[/quote]
I haven't been successful getting WinAGI to run on Linux/Mint, but I was able to push it further than it was (I think)
I was getting:
0024:err:module:import_dll Library MSVBVM60.DLL (which is needed by L"Z:\\home\\russdanner\\winagi\\WinAGI.exe") not found
Which seems to have been solved with:
winetricks vb6run
Unfortunately, the program now launches and exists without a peep. I'll update if I figure anything out.
-
The Power Pack Demo intentionally contains a lot of content that only works with the power pack. But I will take a look at it to see if I can strip out those parts. The exploration parts can probably be converted to true AGI without too much effort.
I moved all my assets into WinAGI GDS, running on a Windows box (in AWS), to try and help Lance's effort.
But After I restarted the IDE, I am now getting Invalid resource data at ##### VOL.0 for all PICs and VIEWS, including the assets that came with the sample. Is this recoverable or do I have to remove and re-add all of the assets?
I will try and start a new project an copy everything back in. I already tried removing everything except for what I need for the Title Screen. When I build and run that it says please insert Disk 1. I assume there's something fundamentally off with the VOL files.
I committed my garage to this branch https://github.com/russdanner/agi-studio-let-them-eat-cake/tree/WinAGI-GDS/ltec-gds/src and I plan to start over again with an empty template and see if I can get things running again.
-
The Power Pack Demo intentionally contains a lot of content that only works with the power pack. But I will take a look at it to see if I can strip out those parts. The exploration parts can probably be converted to true AGI without too much effort.
I moved all my assets into WinAGI GDS, running on a Windows box (in AWS), to try and help Lance's effort.
But After I restarted the IDE, I am now getting Invalid resource data at ##### VOL.0 for all PICs and VIEWS, including the assets that came with the sample. Is this recoverable or do I have to remove and re-add all of the assets?
I will try and start a new project an copy everything back in. I already tried removing everything except for what I need for the Title Screen. When I build and run that it says please insert Disk 1. I assume there's something fundamentally off with the VOL files.
I committed my garage to this branch https://github.com/russdanner/agi-studio-let-them-eat-cake/tree/WinAGI-GDS/ltec-gds/src and I plan to start over again with an empty template and see if I can get things running again.
I rebuilt the game and I've found that so long as I do not remove any of the example assets I don't get into the situation. As a workaround I've move them all high ID numbers.
-
Thanks for your efforts Russ. I'm really looking forward to hearing back on whether you're able to get the game fully converted. Let me know before Friday next week if you're able to get it working and I'll drop everything to make sure it is packaged up into what I release for agile-gdx on the 10th May. I'm going to be focusing on preparing my GitHub readme, and a supporting blog post, over the next week, and fixing any major issue that anyone happens to report between now and then.
-
Russ, I took a quick look at your repo. It's a bit confusing, as there are two different WinAGI project folders, one in bins, and one in ltec-gds. It looks like the one in bins was your first try, as it's older - the other I see you were working on it last night.
I'm not sure exactly what trouble you're having. I checked, and WinAGI shouldn't throw disk/file related errors when deleting existing resources. What I suspect is that when you deleted them, logics that reference them will throw a compile error if you try compiling the game. All of the resources in the template game are used somewhere in the game, so if you delete one or more of them, you will also need to edit the logics where they are referenced.
For what you want to do (create a new game based on your existing resources), the best path would be to create a new blank game. Then import all your resources (I'm sorry I don't have a bulk import function - maybe that's something I need to add in a later version). If your logics are fully compatible with original Sierra, they should then compile with no errors. But I suspect there will be a bit of tweaking required to iron everything out. WinAGI will help you with that- if you try to compile a logic (or the whole game, which automatically recompiles all the logics), it will identify errors (displayed in red and indicate that the logic can't be compiled until you fix the condition) or warnings, which offer helpful advice on how to improve your code or avoid game runtime errors. You can ignore the warnings if you want - you don't have to deal with them to compile and run your game.
I did notice that in your first try (the files in the bins folder), you had your defines file listed as logic zero. That would indeed cause a problem. Logic zero MUST be the main logic - the one that runs every cycle and never gets unloaded. It looks like you got that straightened out when you tried using the template.
It also looks like you figured out how to use the global defines file. That makes it very easy to manage defines that are used across multiple logics. Here's a tip for you - you don't need to include defines for logic, view, picture, sound resources; their IDs are considered global defines by default. So if you've given your resources IDs that match what's in your globals.txt file, you can remove all those defines from the file.
There is a ton of helpful information in the Help file that should show you how to do all the things you need to finish adding all your resources and getting things running. And you can also always contact me, either here in the forum, or by PM, and I'd be happy to answer any questions you have - either about how to use WinAGI to do what you want, or generic AGI related questions.
-
Russ, I took a quick look at your repo. It's a bit confusing, as there are two different WinAGI project folders, one in bins, and one in ltec-gds. It looks like the one in bins was your first try, as it's older - the other I see you were working on it last night.
I'm not sure exactly what trouble you're having. I checked, and WinAGI shouldn't throw disk/file related errors when deleting existing resources. What I suspect is that when you deleted them, logics that reference them will throw a compile error if you try compiling the game. All of the resources in the template game are used somewhere in the game, so if you delete one or more of them, you will also need to edit the logics where they are referenced.
For what you want to do (create a new game based on your existing resources), the best path would be to create a new blank game. Then import all your resources (I'm sorry I don't have a bulk import function - maybe that's something I need to add in a later version). If your logics are fully compatible with original Sierra, they should then compile with no errors. But I suspect there will be a bit of tweaking required to iron everything out. WinAGI will help you with that- if you try to compile a logic (or the whole game, which automatically recompiles all the logics), it will identify errors (displayed in red and indicate that the logic can't be compiled until you fix the condition) or warnings, which offer helpful advice on how to improve your code or avoid game runtime errors. You can ignore the warnings if you want - you don't have to deal with them to compile and run your game.
I did notice that in your first try (the files in the bins folder), you had your defines file listed as logic zero. That would indeed cause a problem. Logic zero MUST be the main logic - the one that runs every cycle and never gets unloaded. It looks like you got that straightened out when you tried using the template.
It also looks like you figured out how to use the global defines file. That makes it very easy to manage defines that are used across multiple logics. Here's a tip for you - you don't need to include defines for logic, view, picture, sound resources; their IDs are considered global defines by default. So if you've given your resources IDs that match what's in your globals.txt file, you can remove all those defines from the file.
There is a ton of helpful information in the Help file that should show you how to do all the things you need to finish adding all your resources and getting things running. And you can also always contact me, either here in the forum, or by PM, and I'd be happy to answer any questions you have - either about how to use WinAGI to do what you want, or generic AGI related questions.
Thanks for the response, I think I've got things rolling. The project will definitely needs some folder cleanup but I'll do that after the madness. For now I'm rolling. I've done as minimal a refactor as needed. I'll go back again and take advantage of some of the capabilities AGIJS and my compiler didn't support once I've got all the rooms in. .... only ... 30 to go :D
-
There is a ton of helpful information in the Help file that should show you how to do all the things you need to finish adding all your resources and getting things running. And you can also always contact me, either here in the forum, or by PM, and I'd be happy to answer any questions you have - either about how to use WinAGI to do what you want, or generic AGI related questions.
So far I am only really running into one issue:
pic.ControlRoom and pic.OuterBay PICTURES are so large that I run out of memory with AGI.EXE in DOS BOX. These work fine in AGILE. Is there any way to tell DOSBOX/AGI.EXE to give me more memory? These are not any bigger than SpaceQuest 2 PICTURE files so I am kind of surprised -- but I would like to be able to run in DOSBOX for all this effort. Any ideas?
-
Remember that DOSBox already gives you all or at least nearly all of the 640KB base memory, more than any real machine. Any memory issue loading resources would be more likely internal to AGI, but I would imagine that Andrew could say better than I.
-
Remember that DOSBox already gives you all or at least nearly all of the 640KB base memory, more than any real machine. Any memory issue loading resources would be more likely internal to AGI, but I would imagine that Andrew could say better than I.
I assumed the same. I tried loading that room right away without any other resources without much luck just to make sure it's not a slow leak. I'll go back and actually look at the asset in the vol file in a bit but for the moment I am have it on hold while I port the rest of the game.
-
You've got 30 Kb of 0x00s at the end of your pic.outerBay file for some reason. You can probably remove the empty data with a hex editor and the pics will work fine.
Edit: 30 KB, not Kb
-
Yeah, 30kb of extraneous data would probably be enough to overwhelm available memory in MSDOS AGI.
The memory model for AGI is very simplistic- a 64kByte block is allocated for the game (not counting the picture buffers- they are located in a separate segment), but the agidata.ovl file occupies the first ~8K, leaving only ~56K for actual game data. The room.0 portion will typically use another 7 - 10K depending on the size of your game. Each room also needs some memory to handle displaying objects on screen. So best case scenario is around 45K or so for resources in each room. The WinAGI help file includes a detailed discussion on memory management if you want to learn more.
There is no way to adjust available memory in AGI. You get what you get. (OK, there IS one way, by using the AGI Power Pack, but that's a hack, not a built-in capability of AGI. And it's an entirely separate topic.)
If you need to know how much space a resource takes up in your game, it's displayed on the property pane beneath the resource tree. Select the resource you are interested in and the 'Size' property will give you that info. Most of your pics have sizes that seemed too big to me given the displayed output - I checked, and every single one of them has the extra bloat. You may need to check your save function to see why your pics are getting extra data appended.
You have shown me a minor bugfix that I need to make sure gets added to the next version. WinAGI should detect cases where unused data exists in resources and provide a warning to the user. And also include a way to fix the problem. In the current version, you will need to export the picture resource to a file, use a hex editor to remove the extra data, then re-import them.
-
Thanks guys!
That last part about exporting, fixing outside, and reimporting is what I needed!
I'll start with the ones I MUST do and then worry about the others (given that I just got done porting a ton of rooms into the game, and I'm crunch'n.) I never noticed the issue when I built these binaries from the JSON commands -- and I only worried about problems that presented themselves. Bringing the game into the "real" world definitely shows where the compiler and engine I worked on differed from the spec.
-
@russdanner, have you played through version 0.7 of LTEC, i.e. the one you sent me?
If you find any issues, let me know and I can upload a new version of the ZIP for you.
I did try just now and couldn't seem to get out of the first SQ scene. It looks like I've swept the whole deck, the message has appeared from my watch, I've read through that, but I don't seem to be able to walk out of that room to the right. I'll try again this evening but just wanted to check with you if everything is okay in that room.
-
I think the issue is the following line:
if (posn(ego, 145, 135, 160, 160))
I can't seem to get any closer than X = 144. Oh... is it because I'm holding the broom? :D ;D
Yeah, that was it. I didn't need to do that in the other version, so didn't realise that that was part of the puzzle.
-
I have just finished a full play through of Let Them Eat Cake running in AGILE, with 37/40 points.
-
The latest build of Let Them Eat Cake is here: https://let-them-eat-cake.com/ltec-1-7-1.zip
There are some bug fixes in there, and ... I added Cedric to a scene per request of Ricky on the Sierra Universe forum :)
How is traffic to the AGIle site? There are a lot of games there. I've tried a bunch but haven't gotten to far in many of them.
-
Thanks Russ. I'll try to get the new version of LTEC on the site over the next 24 hours.
The traffic to agi.sierra.games has died right down now. It got a big boost after I posted the article about the original AGI interpreter source code, and the github repo for agile-gdx ended up on 30 stars after that, an increase of about 25. I don't think many people are going back to it regularly. Most requests to the site came from France so far, and I think that was mainly due to one particular post someone there did with regards to my article about the original AGI source. You'll notice that many of the AGI fan games were made by Robin Gravel and he generally supported French in his games. I'm not sure if that might be why it has been popular there. The main reason I made sure I got the various AGI hacks working in the web version of AGILE is because Robin's games tended to use them, e.g. the AGI Mouse hack.
-
It would be great to see AGILE support AGK's PowerPack down the road. Threepwang has already used it to create a French translation of SQ1 (with SQ2 nearing completion) that supports extended characters in player inputs. That was a big limitation in Robin's French games.
Plus, the PP demo game is pretty good in its own right.
There are some bug fixes in there, and ... I added Cedric to a scene per request of Ricky on the Sierra Universe forum :)
lol
-
Thanks Russ. I'll try to get the new version of LTEC on the site over the next 24 hours.
This has now been updated to the new version.
-
It would be great to see AGILE support AGK's PowerPack down the road. Threepwang has already used it to create a French translation of SQ1 (with SQ2 nearing completion) that supports extended characters in player inputs. That was a big limitation in Robin's French games.
It would be much more involved to add support for the PowerPack, but I do hope to implement it at some point.