I really love the AGI/SCI time-lapse PIC videos I've seen around the internet, but it bothers me that the VIEW resources that complete the picture are missing. None of the doorways have doors, etc. So, today I finally did something about it. I had written an AGI resource library in java a couple years back, and I added some code to guess at the right views to add to a scene. It works way better than I thought it would, so I thought I'd let people know.
I've started a youtube playlist with a couple examples:
https://youtube.com/playlist?list=PLPig13hgBqE7NA05UqPcE5JKGbgUuomxtTo add the views, I wrote a partial LOGIC evaluator, and I initialize it like this:
- Load the logic resource by the same number as the PIC. Thankfully this is almost always the right.one
- Set flag 5 (initial room load)
- reset all other flags
- set Variable 0 to the pic number (current room)
- set Variable 1 to the pic-number minus one (previous room), as some game scripts have logic that depends on where you came from.
- All other variables set to zero
Then I just run through the script one time, and draw any non-ego views it asks to either "draw" or "add.to.pic". I only actually interpret a handful of the logic codes (like arithmetic and if/then testing). Any other opcodes just get skipped. I implemented the "random" instruction, which means especially in games like KQ3 you can get different forest animals on different runs of the extractor.
So far I've tested it on KQ2 through KQ4, PQ1, SQ1 and SQ2, LSL1, and Black Cauldron. It's not always perfect but basically always gives a reasonable result, as long as the pic number and logic number match. When they don't match (like the night-time pictures in AGI KQ4), you obviously get nonsense. It lives here:
https://github.com/rwtodd/org.rwtodd.agi.. Anyway, I've just hacked it together in the last couple days, so the partial evaluator is all crammed into one file. I need to clean that up, but the overall java library is in OK shape and I plan to put it on maven/sonatype once I get all the javadoc written. One day I plan to write a hobby AGI interpreter on top of it. There are also Clojure, Go, and C# versions of this library in my github somewhere... it's a sickness