PowerFliC 32bit v1.72 for Windows 95 by Yaron Gur http://bez.home.ml.org Introduction: Although the flic standard/format has been around for a VERY long time. I have not to date seen any worth while player for Windows 95. So... i have decided to take it upon myself to write one. And. . . Features: -. Native 32bit architecture (for the extra stability and speed) -. Optimized code (Borland Delphi 2.0 Compiler) -. Full screen playing/stretching. -. Cool Real-Time contrast and brightness support! (Gotta love that) -. Options for fast memory playing, or low memory disk playing -. Easy to control playback speed. -. Full support for keyboard control. -. Command line parameter control of all playback features. -. File parameter control for limited presentation scripting. -. 32bit Optimized Assembler code for FLC Frame Decoding (Manual optimization). -. Support for both NT 4.0 and Windows 95 -. Other stuff . . . Bugs? Problem: There seems to be a problem when you maximize the display window of a flic which is bigger than the screen size. Solution: 1. I really see no need to play a movie bigger than the screen, do you? 2. Try pressing "T" to remove the window title. Problem: The flic is all skewed but PowerFliC doesnt crash. Solution: This problem is caused by a windows bug that uses 32bit transfers of bitmaps, this means, that your image width must be a divide of 4, for example a flic with a width of 320 would work just fine, while a flic of widh 319 wouldn't cause 319 does not divide by four. This usually is not a problem since most animation's width do divide by four. The Interface: The Buttons: From left to right, the buttons are as follows: Load file: This button is used to load a file into memory (for memory playback) Play: Play a file previously loaded with the Load button or a file selected with the Play from file button. Play from file: Play a file directly from the hard disk. This way will not pre-load the FLI/FLC file saving a lot of memory, but will give a slower playback. This is idle for playing big files (bigger than your computer's memory can hold). If you plan to use this methud, it is recommended that you defragment your disk drive so that the Flic file will exist as one block on the hard disk. This will give smoother playback. By pressing this button, you will be allowed to select a file, and the pressing the play button, that file will be played from hard disk. Stop: This button will stop any playback in progress. Reset: The reset button will reset the Brightnes, Contrast, Delay & Image size to their original values. Which are: Speed Delay : Depandant on flic file (Usually 72ms) Brightness : 0 Contrast : 1.0 It will also disable the On Top checkbox, and enable the Title checkbox. Minimize: This button will minimize PowerFliC. About: Information about the program. Exit program: This button will quit the program. The Checkboxes: Title: Removing the check from the Title checkbox will remove the display window outlines. This is useful for full-screen (maximized) playback. Loop: The loop checkbox determains if the playback will loop until the Stop button is pressed, or until the loop box is unchecked and the flic completes it's playback. On Top: If checked on, the display window always be the top-most window, even when switching to other application. Not too much use for it, but it's here. Max Pal: When checked, the player will try to take over the default 20 color system palette, and reduce it to 2 colors. (Only useful at 256 color modes) This will give the player 254 colors out of 256 for flic playing, so that missing colors may appear. Still, if you want all your palette colors to appear, you must either render/draw your flic using less colors or play it back at higher color modes (16, 24bit). On some SVGA cards (Matrox Millinium for example) the 16bit modes are actually faster than 8bit. Go figure. Although color matching was introduced in version 1.40, this option will still give better color results in 256 color modes. The Track bars: The track bars can be controlled in real time! (While the flic is playing). Brightness Bar: The brightness bar controls the brightness of the flic. Where a value of 0 means that the flic is playing at it's original brightness. The maximum value for this track bar is 255 at which the playback is totaly white. Contrast Bar: The contrast bar controls the contrast of the flic. Where a value of 1.0 means that the flic is playing at it's original contrast. The maximum value for this track bar is 25.0. Delay Bar: The delay bar controls the delay in miliseconds between each frame, where none is the minimum and 999 is the maximum. However! since flic files have built in speed control, if you move the delay bar all the way to the right, it will turn to "original", which means that the playback will occur in the pre-designed speed. Furthermore, although you may tell the player to play at 10ms (100 frames per second), it may not be able to do so (due to computer speed), and no delay will occur. This means, that if the delay is 15ms, and decoding took 40ms, the player will move to the next frame without any delay. The small green arrows: These controls allow accurate control over the bars. Using the Keyboard: Key Function --------- ------------------------------------------------ ESC - Reset options F - Play from File P - Play O - Load File S - Stop Playback T - Title ON/OFF L - Loop ON/OFF N - On top ON/OFF ` - Max Pal ON/OFF M - Maximize/Normalize Display window + - Increase Playback frame delay by 50ms - - Decrease Playback frame delay by 50ms . - Increase Contrast by 0.5 , - Decrease Contrast by 0.5 ] - Increase Brightness by 5 [ - Decrease Brightness by 5 ? - Show about screen ALT-X - Exit program ALT-S - Statistics screen ALT-I - Information screen Ctrl-+ - Return frame delay to original setting Ctrl-- - Playback with NO frame delay (As fast is possible). Alt-Enter - Go to full screen mode. This is the same as removing the title and maximizing the window. Pressing again will go back to window mode. If you Normalize the window after going to full screen modes, then pressing ALT-Enter will go to full screen again rather than returning to the original flic size. Command line parameters & scripting: Basicly, the command line parameters and file scripting are the same thing. As parameters you just give the commands one by one on the command line, but as script, all you do is write each command on a different line. Anothing good thing to know is that the player executes the commands in the EXACT given sequence. That means, that you can play one flic at a certain contrast and brightness, and then change the brightness, and play a second flic. Another thing to remember is that command line is limited to 128 or 256 characters (depanding on the command interperter). So, if you're planning on playing a lot of stuff, you MUST do it via a script file. And the last thing you should know is that you cannot give more than one script file as a command line to the player. Also, you should never give both parameter commands and a script file, this can cause unpredictable results! The Commands (The commands are not case sensitive): Single parameter commands: ![Filename] - Run script file. If you are using this command to run a script file, you must NOT give any other parameters on the command line. /TITLEon - Turn Title on (default). /TITLEoff - Turn Title off. /LOOPon - Turn looping on (When looping is on the user must press the stop button to continue to the next command when a flic is playing). /LOOPoff - Turn looping off (default). /ONTOPon - Turn Display Window ON TOP on. /ONTOPoff - Turn Display Window ON TOP off (default). /MAXPALon - Turn Maximal Palette on. /MAXPALoff - Turn Maximal Palette off (default). /WINmax - Maximize display window. /WINnormal - Normilize display window (default). /CLOSE - Close PowerFliC (exit program). /BIGREADon - Reads entire frame at one go, then divides it into chunks in memory, might be faster on some systems. Default is OFF /HIDEMENU - Hides the PowerFliC interface menu /SHOWMENU - Not really used, mostly for order's sake. Multi parameter commands: /WAIT [wait in ms] - Wait a certain number of Milliseconds (1000 = One second) Max Value = 65535. /DELAY [Frame delay] - Delay in ms between frames, where 0 means no delay, and 999 is the maximum delay. A value of 1000 means original frame rate (Default = 1000). /BRIGHTNESS [Value] - The amount of pixel brightness, where 0 is pixel unchanged, and 255 is pixel totaly white (Default = 0). /CONTRAST [Value] - The amount of pixel contrast, where 1.0 is unchanged, 0.0 is totaly black due to lack of contrasting, and 25.0 is the maximum contrast (Default = 1.0). /PLAY [Filename] - Load the entire flic, and play it from memory. /PLAYFILE [Filename] - Play the flic file directly from the hard disk. /WAVFILE [Filename] - Play a wave format file (.WAV) in sync with the flic. The parameter must be passed before one of the play paramters. Examples: An example of playing a fli file (from memory) at contrast 5.0, then wait 5 seconds and play another flc file (from disk) at contrast 1.0, and then exit the player. This example should be one long line... "POWERFLC /CONTRAST 5.0 /PLAY CAMPFIRE.FLI /WAIT 5000 /CONTRAST 1.0 /PLAYFILE FOGYLAKE.FLC" Now, doing the same thing inside a script file should look like this: /CONTRAST 5.0 /PLAY CAMPFIRE.FLI /WAIT 5000 /CONTRAST 1.0 /PLAYFILE FOGYLAKE.FLC And to execute the script file you do: POWERFLC !MYSCRIPT.TXT Remember, doing something like "/WAIT 5000" in a script file WOULD NOT work!!! Some information: Firstly, a word on speed: The player decoding is fast, very fast on a pentium machine. However, windows is slow, which comes to that: it is probably faster to play a full screen flic, than to play a low res flic and stretch it. Actually, the decoder was timed to decode about 160fps at 320x240 on a P5/100mhz However, screen copying slows this down. And screen stretching brings it to a near stop (it was still smooth at 640x480x16bit :). This slowdown might not be so noticable on fast VGA cards, or VGA cards with hardware scaling (stretching). Secondly, about the doc: I am not much of a writter, and english isn't my mothertounge, so... live with it. Thirdly about coding: Believe me, if you want to start coding, try not to do it on windows, but if you must get Delphi from Borland, it's simply the best. I have been coding for quite a bit of time, but when i tried doing some fast direct screen writes i cursed micro$oft to coding hell, programming using the Windows API totally sucks. But hey, that's my problem. In any case, if you are going to code something that needs fast graphics under windows 95, look up the CreateDIBSection API command. It's the one to use, but it's hell to set up with a correct palette. Update: I've been messing around with direct-x, it's pretty good! Get Delphi 2.0 unleashed for some decent instructions on it's use. There are also some non-book related translations of the Direct-X headers. Forthly about time: It took me about a week to come out with the first version, and that was after several weeks messing around to get the bitmap and palette to work. Rant & Rave (The format wars): Here are some of my thoughts reguarding the currently available animation formats, Pros vs Cons, and why i think that the flic format, even though it's a 256 color mode format, is still one of the better ones to use for animation/rendering. AVI (Video for windows) You might find it funny, but at a certain point our old friend micro$oft told the world that flic would be their preffered format for windows animation, but ofcourse, in usual micro$oft fasion, they changed their mind. And what did they come up with? well, the AVI format, also known as Video For Windows. Well, their choise wasn't all that bad, The AVI format, is actually just a shell for other formats. And it does support sound and high color modes. But... SLOW AS HELL. Some of the more well known AVI compressions include: Intel Indeo (Probably the more widely used AVI frame format). Radius Cinepak. Microsoft Video 1 (At least i think they made it) Autodesk RLE. The pros for the AVI formats are : 1. True/High color support. 2. Internal Sound support. 3. Size (depands on Frame compression codec, intel & cinepak are best) The cons for the AVI formats are : 1. Slow as hell. 2. The better compression codecs are too lossy, even at maximum quality. 3. Slow as hell (did i mention that?) MOV (QuickTime) This format created by Apple, is basicly the same thing as the AVI format just with different headers. It is more diverse on the Mac though, but if you have a PC. It's the same thing more or less. The Pros and Cons of the MOV formats are exactly like the AVI format. MPEG (Motion Picture Experts Group) This is probably the best overall formats. It's compression ratios make all other formats look uncompressed. It's quality is better than all the AVI/MOV. This is the future of animation. The pros for the MPEG format are : 1. Tight compression. 2. Great high-color output. 3. Existing hardware that assist in playback. 4. CD Quality sound support. The cons for the MPEG format are : 1. Slower than AVI unless you own an MPEG Hardware player. 2. Compression is always lossy. 3. Many players/encoders are not really 100% compatible with eachother. FLI/FLC (Flic) This is the older format of the lot. The FLI format was created for their Animator product, and is limited to a 320x200x256 color mode. The FLC format was created for the Animator Pro prodcut, and has no size limitation. The pros for the FLI/FLC formats are: 1. Faster than a jackrabbit in heat (Depands on decoder ofcourse ;). 2. Compression is never lossy. The cons for the FLI/FLC formats are : 1. No internal sound support. 2. No support for high-color. 3. Compression not advanced as other formats. So, from what you see, the MPEG format is the future, but the AVI/MOV formats just don't cut it. They are only good for low quality movie playback, they truely suck at rendering compression. And no one can write a faster decoder because the actual formats are copyrighted up the wazzo. So, what do i recommend? 1. If you are going to create a Rendered animation, use the Flic format, as it is fast and allow you full-screen playback on even the average computer. 2. If you are going to record a real-world movie, use the MPEG format (if you have a hardware playback device, or use low resolution). If your computer is too slow for mpeg, use AVI or MOV. 3. Wait for the MMX Cpu command expansion from our friends at Intel. It will probably make mpeg playing fast and affordable to all. MMX is due to come on Intel CPUs sometime in the begining of 1997. Credits: Some credits for mentioned products: Delphi is the registered trademark of Borland inc. Windows 95 is a registered trademark of Micro$oft inc. Windows NT is a registered trademark of Micro$oft inc. Animator & Animator PRO are the registered trademark of Autodesk and Yost group. Millinium is the registered trademark of Matrox inc. Licence: PowerFliC 32bit for Windows 95 is released under the Shareware Concept. It may be distributed freely as long as no money is charged for it. It may not be used by any commercial company or product without a licence fee of 50$ The author DOES NOT give warrenty to the functionability of this program. It may, or may not work. If handled incorrectly, it may even cause damage (no damage has been should happen by this software, but i want to cover my back...). Furthermore, this program was designed to work with Windows 95 and NT 4, and not on any other Operating System. It will surely not work with Windows 3.11 (even with the Win32s). This software MAY NOT be distributed on any Shareware CD-Rom or any other sold media without a written permission of the author (Yaron Gur). Following the shareware conecpt, you have 30 days to evaluate this program. If after that time you choose not to register this software, you MUST erase it. Registeration: Single Copy for Personal use : 10$ (U.S.) Single Copy for Commercial use : 50$ (U.S.) 2-10 Copies for Commercial use : 35$ (U.S.) per copy *Unlimited copies for Internal Commercial use : 500$ **Unlimited copies for redistribution : 700$ * - The intent of "internal use" is that PowerFliC would not be resold on a CD at a value over shipping and printing cost. ** - The intent of "Redistribution" is that PowerFliC may be sold as an accompanied product on a CD. Notice: PowerFliC may never be sold as a stand alone product without prior consent of the author. For any order over a single copy, the money order must be made by cashier cheque. Money and Cashier cheque orders should be made out to: Yaron Gur 17 Hatishbi st. Haifa, israel 34527 Questions? feedback? flaming? the latest version??? If you have any questions, bug reports or you just want to comment about this software, send internet e-mail to: Yaron Gur at For links to the latest version, or just for kicks, visit my home page at: http://bez.home.ml.org On the page you will also find information on 3D design and rendering, and some of my rendering works.