Author Topic: CrafterCMS (Online AGI tools)  (Read 10091 times)

0 Members and 1 Guest are viewing this topic.

Offline MusicallyInspired

CrafterCMS (Online AGI tools)
« on: February 21, 2024, 11:41:26 AM »
Did we know about this?



Brass Lantern Prop Competition

Offline OmerMor

Re: CrafterCMS (Online AGI tools)
« Reply #1 on: February 21, 2024, 12:58:43 PM »

Offline AGKorson

Re: CrafterCMS (Online AGI tools)
« Reply #2 on: February 21, 2024, 04:21:08 PM »
Impressive!

Offline lance.ewing

Re: CrafterCMS (Online AGI tools)
« Reply #3 on: February 21, 2024, 07:22:47 PM »
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.

Offline lance.ewing

Re: CrafterCMS (Online AGI tools)
« Reply #4 on: February 22, 2024, 02:59:08 AM »
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.
« Last Edit: February 22, 2024, 06:51:45 PM by lance.ewing »

Offline lance.ewing

Re: CrafterCMS (Online AGI tools)
« Reply #5 on: February 23, 2024, 09:50:45 AM »
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.

Offline lance.ewing

Re: CrafterCMS (Online AGI tools)
« Reply #6 on: February 23, 2024, 12:36:01 PM »
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.

Offline Collector

Re: CrafterCMS (Online AGI tools)
« Reply #7 on: February 23, 2024, 12:52:46 PM »
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?
KQII Remake Pic

Offline lance.ewing

Re: CrafterCMS (Online AGI tools)
« Reply #8 on: February 23, 2024, 04:59:10 PM »
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.

Offline lance.ewing

Re: CrafterCMS (Online AGI tools)
« Reply #9 on: February 23, 2024, 06:57:44 PM »
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.

Offline Collector

Re: CrafterCMS (Online AGI tools)
« Reply #10 on: February 23, 2024, 07:38:09 PM »
My vote would be the in between. It would be nice to see cross compatibility that would load games regardless of source.
KQII Remake Pic

Offline lance.ewing

Re: CrafterCMS (Online AGI tools)
« Reply #11 on: February 26, 2024, 08:14:41 AM »
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.

Offline Kawa

Re: CrafterCMS (Online AGI tools)
« Reply #12 on: February 26, 2024, 08:23:59 AM »
Should be done already.

Offline lance.ewing

Re: CrafterCMS (Online AGI tools)
« Reply #13 on: February 26, 2024, 08:38:45 AM »
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.

Offline Collector

Re: CrafterCMS (Online AGI tools)
« Reply #14 on: February 26, 2024, 04:29:47 PM »
russdanner? if so it looks like he is in.
KQII Remake Pic


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.025 seconds with 21 queries.