SMUSH is a video/audio codec used in many lucasarts games initially designed and maintained by Vince Lee. --------------------------------------------------------------- some games that use smush (probably quite a few more) Rebel Assault Rebel Assualt II Rebel Assault II demo (codec 37) Full Throttle (codec 37) The Dig (codec 37) The Curse Of Monkey Island (codec 47) Outlaws Outlaws demo (codec 47) Grim Fandango demo (codec 47) Grim Fandango X-Wing Alliance Shadows of the Empire (PC) Star Wars Racer LucasLearning's Star Wars DroidWorks Indiana Jones and the Infernal Machine Jedi Knight: Mysteries of the Sith Mortimer and the Riddles of the Medallion Making Magic CDROM (not a game but still uses smush) Monkey Island 4 apparently has smush headers but uses bink --------------------------------------------------------------- "interesting use" meaning drawing scumm things like actors on top of a running animation. from http://lucasfans.mixnmojo.com/features/interview_vincelee.html Both Full Throttle and The Dig used the INSANE engine, originally designed for the Rebel Assault games. How much were you involved with these two games, and what exactly did INSANE accomplish in those titles? INSANE was primarily used as a cut scene engine for both The Dig and Full Throttle, but the latter made more interesting use of it in the mineroad sequences. Fortunately, by the time both these products came around, I had broken up the INSANE engine into reusable modules, so the programmers for those respective games were able to integrate my code with little input from me. One could assume that the INSANE engine and SMUSH movie codec will still be used in future LucasArts games. How does it feel to know that your code will continue to be used at the company long after you left? It's kind of funny. I think four or five times in my career there I had anticipated the death of INSANE as an internal cut scene codec. Outside companies kept bringing in codecs that just seemed amazing. But many times, when the decision had to be made, we found the the outside codec wouldn't run on our target platform, or I found that I could tweak my codec to get better results. This was the case with Indy and the Infernal Machine. They had originally planned to use Windows DirectPlay to handle their cutscenes, but switched to INSANE after they found DirectPlay couldn't meet their needs. Will it continue? I left the code in good hands, so it certainly could. I'm sure it won't last forever, but I do get a little bit of a kick knowing that it might go on a bit without me. Just out of curiosity, what does INSANE stand for, anyway? INSANE sounds for the INteractive Streaming ANimation Engine, and originally referred to the streaming video engine from Rebel Assault. Nowadays, it's made up of some 18 code libraries which encompass most of the code I wrote in 8 and a half years at LucasArts. --------------------------------------------------------------- from http://www.gamasutra.com/features/19970601/optimizing_cdrom_perf.htm mirrored at http://jsg.id.au/scumm/optimizing_cdrom_perf.html Case Study: Rebel Assault II Rebel Assault II: The Hidden Empire from LucasArts is the sequel to the action-arcade game Rebel Assault. Set in the Star Wars universe, it features 15 chapters of play and uses high-quality cinematic video sequences to advance the story and mood. The game play features various flying, dodging, and shooting sequences set in front of interactive streamed backgrounds. The minimum platform for Rebel II is a 486/50 with a 2X CD-ROM drive. To achieve acceptable performance and image quality on this platform, LucasArts wrote a custom animation system. This system, the INteractive Streamed ANimation Engine (INSANE), is a collection of code libraries designed primarily to compress and play back video sequences. The system is modular, easily portable, and will be used in a majority of LucasArts's upcoming titles. In Rebel Assault II, noninteractive sequences are 320-by-200 pixels, while interactive sequences are rendered in 424-by-260 resolution. Both use 8-bit, 256-color imagery and appear full screen. For higher-end machines, optional interpolation up to 640-by-400 resolution is available. High resolution is more CPU-intensive, so this may result in a slower frame rate than low resolution, even on a moderately-powered system. To account for this, the system was designed to elegantly handle a less-than-optimal frame rate. Each frame of video typically consists of 13K of video and 2K of audio. With a data rate of 225K per second, this allows a frame rate of 15fps. Due to the large quantity of video generated for the game, it would have been unreasonable to generate multiple copies of the video streams, each running at a different frame rate. Instead, all video sequences are designed to run at the machine's maximum speed, capping the rate at an optimal 15 frames per second. For high-end systems, the extra CPU time can be used to run in high resolution. To account for possible synchronization problems due to variable frame rates, two approaches were taken. For sequences without onscreen speech, music and sound effects are linked to specific key frames and designed to accomodate up to a 15% variance in frame rate. For sequences with on-screen speech, rigid synchronization is used. For these sequences, every other frame of video can be optionally omitted, saving decompression and display time and allowing the animation engine to catch up to lip-synched audio. For some interactive sequences, smooth branching must occur. To achieve this, the system allows video segments to be interlaced into the data stream and preloaded before a possible branch point. When the branch point is reached, the preloaded segment is played to cover up the seek delay to the new animation. The INSANE library performs reads through DOS for portability. To achieve smooth, uninterrupted animation, it uses a hybrid preemptive cooperative multitasking system, in which data reads are performed within a mainline DOS thread; decompression and game logic run in time slices granted via the timer interrupt. Decompression time can vary from frame to frame depending on the layers of imagery and compression options used in a particular frame. To achieve best overall performance on all video sequences, the system dynamically varies both CPU time-slice allocation and decompression frame rate based on CD-ROM read performance and decompression time. --------------------------------------------------------------- exports of lecsmush.dll from outlaws demo on sampler cd Name: LECSMUSH.dll Characteristics: 00000000 TimeDateStamp: 33774D8C Tue May 13 03:04:12 1997 Version: 0.00 Ordinal base: 1 # of functions: 17 # of Names: 17 Adresses of functions: 000070A8 Adresses of name ordinals: 00007130 Adresses of names: 000070EC Entry Pt Ordn Name 00001090 1 Allocate 000013B0 2 Close 000011E0 3 Configure 00001000 4 DLLEntryPoint 00001140 5 Free 00001590 6 GetFrameBitmap 00001010 7 Initialize 000011F0 8 Open 00001160 9 Pause 00001400 10 ProcessFrame 000011D0 11 Restore 00001190 12 Resume 000011C0 13 Save 00001080 14 Shutdown 00001060 15 Startup 00001040 16 Terminate 000015C0 17 UpdateFrame --------------------------------------------------------------- exports of tgsmush.dll used in X-Wing Alliance 3rd party standalone player that uses it can be found here http://www.geocities.com/v_d_d/snm_play.zip Name: tgsmush.dll Characteristics: 00000000 TimeDateStamp: 36D5C981 Fri Feb 26 09:06:57 1999 Version: 0.00 Ordinal base: 1 # of functions: 5 # of Names: 5 Adresses of functions: 0001DDB8 Adresses of name ordinals: 0001DDE0 Adresses of names: 0001DDCC Entry Pt Ordn Name 000012F0 1 SmushGetFrameCount int SmushGetFrameCount() 00001090 2 SmushPlay int SmushPlay(char* pathtofile) 000012D0 3 SmushSetVolume int SmushSetVolume(int volume) 0-127 000012B0 4 SmushShutdown int SmushShutdown(int param) 00001000 5 SmushStartup int SmushStartup(int param) --------------------------------------------------------------- Star wars racer Name: Smush.dll Characteristics: 00000000 TimeDateStamp: 36D753BB Sat Feb 27 13:08:59 1999 Version: 0.00 Ordinal base: 1 # of functions: 4 # of Names: 4 Adresses of functions: 0001DDB8 Adresses of name ordinals: 0001DDD8 Adresses of names: 0001DDC8 Entry Pt Ordn Name 00001090 1 SmushPlay 000012E0 2 SmushSetVolume 000012C0 3 SmushShutdown 00001000 4 SmushStartup ---------------------------------------------------------------