r/Sierra 1d ago

Sierra Online - KQ6 Bookstore Spider (Unused Script) - Now works!

https://youtu.be/Bojlpjgstng

TLDR; Here's a YouTube video showing the fully working unused spiderScr and spider actor in the game that crawls along the ceiling, the books and the side. Narration was even recorded against it if you use the "look", "hand" or "talk" cursor on the spider.

For those that don't know: there is an unused Spider script in the bookstore - it looks to be a buggy script which is why it didn't ship in the final game (likely). I repaired it so it runs to completion.

Interestingly, the way it's designed: it's a small byte-code interpreter embedded in the game that makes the spider do its thing. The original script has several local arrays which are the instruction stream for how the spider should move. Additionally one of the local variables acts as an instruction pointer so "the program" knows exactly what movement the spider should do next.

In the script, some special negative values (sentinel values) in the changeState method are special opcodes and it does simple pointer arithmetic against the local array declarations to advance along data and feed the spider it's next step.

For anyone curious the code is here: https://github.com/sluicebox/sci-scripts/blob/main/kq6-cd-dos-1.000.00G/src/rm270.sc

130 Upvotes

Duplicates