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.

Topics - natbudin

Pages: [1]
AGI Development Tools / Operation: RECON
« on: February 20, 2022, 03:01:23 PM »
As a testbed for agikit development, I've reconstructed the source code for the Operation: RECON trailer and posted it to Github:

Operation: RECON was a game project created by Randy Dykstra in the mid-90s.  He posted on the MegaTokyo message boards looking for programming help and I volunteered to do it.  We got to the point where we released a trailer, and eventually Randy brought in Leigh Ann Frey as a third member of the development team.

I eventually ended up stepping back from the project without really communicating it to my collaborators, which in hindsight I strongly regret.  The README for the Github repository goes into my side of the story in more detail, but the upshot of it was that I had a lot of complicated feelings around the project, but as a high schooler, I wasn't very good at expressing them at the time, and I wish I had been able to do so better.

Anyway, I hope this release brings back as many memories for you as it has for me!

Hello everyone!  I've just released agikit version 0.8.0.  This is a huge release!  It contains the following changes:

  • AGIv3 extraction and build support
  • New format for .agipic files (a JSON list of commands). Reading the binary format is still supported; editing a binary .agipic in Visual Studio Code and saving it will automatically convert it to JSON format. This new format makes it easier to transition between AGIv2 and AGIv3 because they use slightly different binary encodings for PIC resources.
  • Added a new file called agikit-project.json at the root of a project. This currently allows setting the target AGI version and game ID, but in the future can be extended to support many other options.
  • Improved console output for build and extract, with automatic color support detection
  • extract CLI command now accepts -l, -v, -p, and -s options (like XV3 does) for extracting specific LOGIC, VIEW, PIC, and SOUND resources specifically
  • extract CLI command no longer outputs .dot or .agiasm files by default when decompiling LOGIC scripts. Passing the new -d option will cause it to output them for debug purposes
  • VSCode extension now supports using ScummVM as a "debugger". This doesn't actually add step-through debug support, because ScummVM doesn't expose an interface for external apps to do that, but it does allow the VSCode extension's build and run workflow to work more like VSCode users expect, with tasks.json and launch.json support.
  • Added the beginnings of an automated test suite using Jest. Right now, the only tested code is the LZW and PIC compression and decompression, but I hope to expand the tests in the future.

As usual, you can get agikit by following the instructions in the README at:

I was curious to see whether it would be possible to use this to upgrade an AGIv2 game to v3, so I pulled out one of my old projects, the Operation: RECON trailer.  The source code to this has been lost, but I'm attempting to reconstruct it.  I was able to extract the trailer as v2, compile and run it with ScummVM, and then change the agikit-project.json file to use v3, and compile and run it again.  It doesn't get very far (it shows the opening screen, then goes to the lab scene, but the sprites appear in the wrong places on screen and as a result the scene never really gets started).  I'm going to play with this more and see what it takes to fully upgrade it to AGIv3 and then publish the results as an example AGIv3 program.

Any feedback, wishes, questions, etc. would be most welcome!

Hey AGI pals!  After a long hiatus, I was spurred to do some work on agikit again (by a bug report from Nolen Scaife on Github, who noticed that agikit was broken on Node 17).  I actually had a fair bit of half-finished work sitting on the main branch, so I took the opportunity to get things into a releasable state.  0.7 is now out, and includes:

  • A new import entry point for the @agikit/core and @agikit/react-editors packages, which should make it unnecessary to do deep imports into these packages anymore
  • Better diagnostic error messages for the LOGIC language server (used by the VSCode extension)
  • A half-finished SOUND player, which currently only supports IBM PCjr SOUNDS (and doesn't yet correctly emulate the noise generator)

The SOUND player could eventually become a SOUND editor, but emulating the PCjr sound chip accurately turns out to be more problematic than I'd imagined (especially since multiple incompatible hardware implementations of it existed; e.g. the Tandy version which doesn't generate the same frequencies as the IBM one).  If folks have opinions about this, I'd love to hear them!

Hello AGI friends!  I'm excited to announce that agikit version 0.6.1 is available.  (Don't install 0.6.0, it doesn't work, sorry about that.)

The headline feature of this release is an editor for VIEW resources.  It's definitely not the most polished user experience ever, but it works and will provide a good base for iterative improvement.

For CLI users, there's a change that will affect you.  I've gotten an npm organization for this project, under @agikit, so you'll need to remove agikit-cli and install @agikit/cli instead.  This is (hopefully) the last time I'll be breaking the naming going forward.

One other important fix: the PIC editor previously had the wrong height for picture resources; this is now fixed (and fixes the display of some resources that did flood fills inside lines that reached the bottom of the screen, including one in the template project).

Screenshot of the VIEW editor:

Hello folks!  I'm back with another agikit release.  This time, the focus is on PIC resources!  agikit now includes a PIC editor:

Because Visual Studio Code is based on Chrome under the hood, this editor is usable on web pages too.  It's written in React, and released as a separate package called agikit-pic-editor.  The user experience is a little clunky right now but I'm hoping to improve it with your feedback!

To try it out, follow the instructions on (make sure you're installing version 0.5.0 or later).

Next up: VIEWs!

AGI Development Tools / agikit 0.4 + Visual Studio Code
« on: March 10, 2021, 04:47:10 PM »
Hello everyone!  I'm pleased to announce that agikit version 0.4 is out, and with it there are two major changes:

  • agikit is now split into multiple npm packages.  For the previous command-line functionality, you probably want to install agikit-cli.
  • We now also have a language server for LOGIC scripts and a Visual Studio Code extension built on it.

This means it is now (starting to become) possible to use Visual Studio Code as an IDE for AGI games (in a very very limited way that will hopefully become less limited over time).  Here's a screenshot:

Right now, agikit-vscode can:

  • Syntax highlight LOGIC scripts
  • Check for syntax errors in LOGIC scripts
  • Provide hover and "go to definition" inside LOGIC scripts
  • Build AGI games
  • Run built AGI games in ScummVM

If you'd like to try this out yourself, I've updated Peter Kelly's AGI Contest 2 Template game to work with agikit.  You can find the agikit version at, along with a set of instructions to get it up and running.  I'm sure there are plenty of bugs here, and I would definitely appreciate any feedback or bug reports anyone has!

AGI Development Tools / Introducing agikit
« on: February 20, 2021, 01:46:26 PM »
Hey AGI fans!  I'm pleased to introduce something I've been working on.  It's called agikit, and it's the beginnings of a cross-platform development toolchain for AGI.  agikit is written in TypeScript and aims to provide an extensible, flexible, open-source platform for building AGI development tools.  It is very, very early stage right now.  :)

NPM page:
Github repo:

It’s super early stage, it’s not yet compatible with WinAGI, AGI Studio, or other similar tools, but: it can decompile and recompile King’s Quest I, and the result runs in ScummVM.

Why do this, particularly when good IDEs are already out there?  Part of the reason was just nostalgia; I used to make AGI fan games back in high school and I wanted to revisit it now that I'm older and know more about software development.  Additionally, I wanted it to be possible to develop AGI games on non-Windows platforms and using your choice of text editor.  This isn't intended in any way to compete with the excellent tools that exist, but rather, to open up the world of AGI development to a wider audience.

Another big reason for this is that I wanted to learn about how compilers really work by building one, so the resulting app here is quite different from how Qt AGI Studio works, in that it does AST generation, control flow analysis, optimization passes, etc.  One interesting result of this is that the code it generates can't (yet) be decoded by Qt AGI Studio, because it can potentially reorder blocks in a way that doesn't guarantee that conditionals contain all their sub-statements in the assembled LOGIC resource.  I'm hoping to add an option to generate AGI Studio-compatible LOGIC resources in a future release, probably as a post-compilation reordering pass through the assembly code.  (I'm unsure whether all of this applies to WinAGI or not, because I don't have access to a Windows machine to try it on, but if someone would be willing to let me know, I'd greatly appreciate it!)

Right now all this compiler infrastructure doesn’t actually amount to much, because the script language it compiles is very structurally similar to the binary LOGIC format, but because it does these things, it should be possible to greatly extend it to include stuff like functions, loops, and even variable types AGI doesn’t natively support.  It also should make it easier to build a language server so someone could (for example) write AGI games in Visual Studio Code with full auto-completion and code navigation support.

Aside from this limitation, there are several other big ones right now that I hope to fix soon:

  • Only supports AGI version 2 for now
  • Doesn't fully support the LOGIC syntax in the standard:
    • Doesn't yet understand operators such as ==, <, >, +=, etc
    • #define (and therefore named variables) isn't yet supported
    • Probably other stuff
  • Doesn't decode or compile OBJECT files yet
  • Doesn't compile WORDS.TOK yet

As you can see, it is nowhere near ready for use, but overall I’m pretty pleased with how it’s turned out so far!  I'd love any feedback folks have.

Pages: [1]

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

Page created in 0.049 seconds with 19 queries.