# Kubrick An engine for interactive movies ## Background I had a game idea whose design would require a lot of data. And I mean 'a lot'. Too much to host on my puny servers. So I thought, instead, of using YouTube to store and stream the data and controlling it via game code. To test the concept, before spending $$$ on the game itself, I found a YT clip of Dragon's Lair and thought I would recreate that with Javascript to see it's the YT API is viable to make such a project. Ultimately, I think the Dragon's Lair game presented here is playable, but flawed. And the YT API is currently lacking for my other game project. ## Dragon's Lair I'll let [Wikipedia](https://en.wikipedia.org/wiki/Dragon%27s_Lair) take the strain and explain this game to you, if you're unaware of it. The walkthrough I used to guide me as to keycodes and so on was created by Lafe Travis and can be found [here](http://www.thecomputershow.com/computershow/walkthroughs/dragonslairwalk.htm) (A prettier copy can be found at [IGN](http://uk.ign.com/wikis/dragons-lair/Walkthrough)) ## The code It's version 0 for a reason - I hate it! ### Things I don't like * The YouTube API and/or my code doesn't provide smooth changes when switching between different clips. If I were a video person I'd consider merging the videos into 1. It's probably also possible to * There's is little-to-no indication of the correct keys for many situations. This is why I've introduced the hint system. * I can't always be sure of the correct death sequence, so have guessed * The accuracy of the YT API is pretty bad in places, so what's accurate in one render is wrong in the next. * I used [Practise Mirror](http://marquisdegeek.com/practisemirror) to produce the timings, but I don't think they're perfect. * I got bored whilst generating the data set, so I made compromises: + Accuracy of some keys/timings are estimates + I looked at the last frame _before_ Dirk performs the action, and marked that as the final point where the key can be pressed. I then subtracted 1.01 second to give the time range. + Areas with are mirrored are repeated are a cheat (IMO) so have made the second version easier by either having longer time windows in which to press the keys, or reducing the number of keys required. * Save points are a bit arbitrary * The change-over between living and dead videos is problematic.