© epikur - (2004-2005)
MENU(press ctrl+home to get back to the menu area) |
TITLE
kfc_mplayer - epikur (c) freeware* (learnware, testware) * the java source code is freeware, the images are not!![]()
ABOUT
A kungfuchess movieplayer Quick implementation-test Further development, requires redesign Source code is included! (1) I take no responsibility of any damage you might get from using this (2) The original images are 'basic' images, which I believe has no copyright, use it as you like (3) The Shizmoo image shown below is (c) shizmoo.com, I don't think they will mind that I've included it here (There is no profit from it, and they get advertisement by letting me include it) (4) You can do whatever you like with the Java source code
NEW IN THIS VER 0.7d - 1maj2005
- Added: Buttonmenu - Changed: arrow-graphic are now arrows
INSTALL
you need Java installed, if you don't have Java installed get it from http://www.java.com/en/download/windows_automatic.jsp Unzip the kfc_mplayer file and use the batfiles, click, mp.bat (intro movieplaying, loading movies from commandline) begin.bat (just standard setup) play.bat (standard-speed, very easy black computer player) playfast.bat (fast-speed, for Fast-4Player players, practicing) You can manually start this with either from folder path in command prompt but the batfiles should make it easier for you. java -cp .\class Main appletviewer class\Main.htm (might not work due to security settings) If it doesnt work You might need to recompile it, but it should work If you get an error you might have tried to load a not valid movie For fast recompile I recommend using JCreator and open Main.java and choose compile (they have a freeware version - http://www.jcreator.com)
HOW TO USE IT
| Supported keys: | ||
| playback controlling, winamp keys: | ||
| z = slow speed | (rewind) | |
| x = standard speed | (play) | |
| c = pause | (pause) | |
| v = restart (when not paused) | (stop) | |
| b = fast speed, toggle | (forward) | |
| misc: | ||
| r = rotate board | ||
| g = jump forward in time by 5 units | ||
| s = movie loader | ||
| d = debugging info | ||
| h = helperline toggle up | ||
| shift+h = helperline toggle down | ||
| w = reset gamesettings | ||
| e = fastspeed gamesettings | ||
| making movie: | ||
| n = print movie, ep format | ||
| m = print movie, shizmoo format | ||
| a = save current movie playlist to memory | ||
| q = delete movie playlist from memory |
shizmoo movies: folder devilant folder KFC-IC-2004 folder shizmoo folder devilant_vs_zewatecher-2005-2-15 folder korbak_vs_devilant-2005-2-13 kfc_mplayer syntax movies: folder ep folder newgen folder fastguide folder scripted
GRAPHICS
The graphics doesnt look as good as those from Shizmoo.com :/ to user your own graphic-package, replace/edit the images pieces_50.gif, tileblack.gif, tilewhite.gif A graphics pack is available at http://kfc.kunuk.dk/download/kfc_mplayer_graphic.zip Note: the pieceimages from the image is not included![]()
Chess pieceset (c)Shizmoo
FILE-SYNTAX FOR kfc_mplayer
COMMANDS: # line is ignored - piecename pos #start position pos dest time_centsec #move, value 100 = 1 sec piecename pos dest time_centsec #move, same as above txt string time_centsec #text message ### scripted # start with delay + delay pos percent # random move from a pos to one of the many dest, time is random between the two timevalues + random pos dest1 dest2 ... destn time1 time2 # if exist + if exist piecename pos then move pos dest time + if exist piecename pos then move pos dest always + if exist piecename pos then txt string time + if exist piecename pos then txt string else_txt string time # if moving + if moving color dest then move pos dest time + if moving color dest then move pos dest always # attack random, if possible to attack from given spot + attack random from pos time + attack random from pos always + attack random from pos time1 time2 # random attackmove by a random piece of that color + color attack random time1 time2 # random move by a random piece of that color + color move random time1 time2 # clear board at this time + clear time # add new piece to the board at given time and with given delayvalue in percent + new piecename pos delaypercent time # change the movieplaying speed at given time, the value is 10 by default + setplayspeed a_number_between_1_and_250 time # change the gamespeed at given time, the value is 1.0 by default + setgamespeed float_value_between_2.0_and_0.1 time # change the delay at given time, the value is 1.0 by default + setdelaytime float_value_between_2.0_and_0.1 time # reset the gamesettings, the movement speed,delaytime and playspeed at given time + reset gamesettings time # remove a piece at given time + remove pos time # start a black computer at this time + computerplayer time # draw an arrow with stop and start time, colors are either green, red, yellow or white + drawarrow pos dest timestart timestop color # draw a dot with stop and start time, colors are either green, red, yellow or white + drawmark pos timestart timestop color Unrecognized data will be skipped, if there typo mistake it will be printed e.g. # - whiterook h1 h1 h8 100 txt this is a rook moving 110 ### scripted + delay f2 20 + random e4 c3 c5 d2 d6 f2 f6 g3 g5 100 400 + if exist whitepawn a2 then move a2 a4 200 + if exist whitepawn a2 then move h2 a2 always + if moving black d6 then move a6 d6 500 + if moving black d6 then move d6 e4 always + if exist whiteking e4 then txt there is a whiteking at e4 200 + if exist blackking e8 then txt black king is still at e8 else_txt black king has moved from e8 1000 + attack random from e4 300 + attack random from f3 always + attack random from b2 100 500 + white attack random 200 1000 + black move random 500 600 + clear 300 + new whitepawn a1 50 2400 + setplayspeed 2 0 + setgamespeed 0.1 0 + setdelaytime 1.2 0 + reset gamesettings 5000 + remove d2 400 + computerplayer 0 + drawarrow e4 e6 100 400 green + drawmark b2 100 400 red
HOW DOES IT WORK
- piecetype check, uses standard chessrules - uses some of the shizmoo kfc collitionrules - when two different color pieces are in same fieldarea, there is a collition
The following rules adapt the Shizmoo rules as much as possible.
Here I try to give a definition of the rules, they might not all be 100% correct, but you get the idea.
Priority:
The priority of the rules are read from up to down, where the below rule, overules the above rules

DEVELOPMENT
- preferable to make a new 'solid' design from scratch and use some ideas from here - fixing and solving misc movement not allowed bugs - load images before starting, current delaying with 3secs Thread sleep before playing - use Timing events instead of System.currentTimeMilli() to calc when to move pieces - clean up in Main.java and make more classes - better design structure - better imagebuffering - clean up, clean up, clean up The code is messy :/ (quick implementation and I know java at beginner level, know nearly nothing on how to design java programs or java API) The animation design part is with help from http://www.javaworld.com/javaworld/jw-03-1996/jw-03-animation.html
KNOWN BUGS
- Kfc rules missings enpassant move doesn't get cancelled when it should on event the pawn that makes enpassant gets taken - No exact timing for collitioncontrol same movie might how diff outcome when timings are at boundary value for decition (about +-5msec or so) - Sometimes the graphics aren't fully displayed at start, it's because it hasnt finished loading - Playing in faster speed than standard is more sensitive to time-critical issues - Not all of shizmoo movies collections might play correctly as they should, if played faster than standard speed - Jump forward in time feature is buggy - You can only load movies from movies folder with the movie-loader - Some vars might need to be tweaked to be compatible with shizmoo kfc timings for proper movieplay - Sometimes the're glitches where timeline value become negative or the movie is already finished when loaded the var TBEG is a shared var and multiple events writes to this var or probably because of the way I use System.currentTimeMilli() and runnable - System.currentTimeMilli() calc method, instead of calling time and compare, use time event using System.currentTimeMilli() gives timing offsets because calling methods also adds time-delay there is not exact timing with this method, e.g. it should be: when time is x do this, instead it is: when time is >= x do this - This has also effect on playing in diff speed, timings are not exact with System.currentTimeMilli() pieces that should and are just_in_time dodging in normal speed, might sometimes get taken in max speed (speed below 5) - When quickcapture-move is allowed should be adjusted, when time-critical issues are fixed, and set G.QUICKCAPTUREFIELD = 0.55 - Changing board size, you'll to change offset values in reverseBoard() method in Main.java for correct rotate board result - piece.getDelay()==null check for whether a piece has a delay has timings glitches time>=startmove+stoppedmove method is used instead in basicPieceMoveCheck() method
VERSION HISTORY
VER 0.7c - 6feb2005 - Changed: enpassant rule rework: you can quickcapture with enpassant move, no double quickcapture possibility when pawn make enpassant (you can cancel your opponents possibility to make enpassant if you move fast enough) - Fixed: pawn may not quickcapture when moved straigt up - Fixed: messages sometimes not redrawn upon movierestart (forgot deepcopy) - Added: pressing shift+h reverses the helperline toggling rotation - Added: new scriptings, make paintings for visually aid in making annotation of boardposition + drawarrow pos dest timestart timestop color + drawmark pos timestart timestop color VER 0.7b - 18jan2005 - Changed: slowest playspeed value is now 250 - Added: one concept-movie for fastguide - disable-attacker - Added: more debug-info when scripts are unrecognized - Added: more scripts: + if exist piecename pos then txt string time + if exist piecename pos then txt string else_txt string time VER 0.7a - 2jan2005 - Readded: key p, print current position, this will print in ep-format - Added: scripting method: setplayspeed setgamespeed setdelaytime remove a piece at given time - Updated: debug key d, will give more info - Changed: slowest playspeed value is now 160 - Added; key w, reset gamesettings, reset the playspeed, gamespeed, delaytime values - Added; key e, fastspeed gamesettings, 0.1 speed - Added: fast computerplayer: fast-easy fast-normal epikur-fast ultra-fast - Added: fastgame strategy movies with misc concepts folder fastguide: anticipation bait block-capture focus-changing follow-up-moves manipulate-the-protecter prepared-snipe remove-block remove-protecter sum-up VER 0.7 - 29dec2004 - Added: more helperline, boardinfo: move,protect,attack - Added: better computerplayer, will dodge and move to 'safe' places - Added: scripting methods: clear board at given time add new pieces at given time and with given delayvalue - Added: Newgen's strategy guide chapter2 as a movie - Added: print move with n,m key will also print startup position - Removed: key p, print startup position (this is added to key n,m) VER 0.6k - Fixed: samecolor pieces ending at same field when moved in certain way - Added: new key a, save current movie playlist to memory - Added: new key q, delete movie playlist from memory - Added: text messages has shadow effect - Added: document, computerplayer.htm VER 0.6j - Changed: helperlines color - Added: more scripting method - Added: simple computer player script - Fixed: text-message on screen, wrapping the words currectly on multible lines VER 0.6i - Added: scripting method ability to make random dest move in random time interval pieces can start with custom delay value if test for move desition auto-restart at given time - Added: scripted movies dodge practice VER 0.6h - Fixed: pieces promoted can move when there's still delay active - Added: key p, print piece position, ep format VER 0.6g - Fixed: BlackKing helperline not drawed - Added: ability move pieces from black's point of view VER 0.6f - Fixed: pieces dodging from knight when they shouldn't - Fixed: Timeshifting from slow to very fast and versa display bug - Added: devilant strategy topics, simple scripted movies VER 0.6e - Added: ability to shift piece position, when paused - Added: more helperlines for the h toggle, protectlines and attacklines - Added: four more movies from KFC-IC-2004 - Fixed: move allowed at the chessboard not correctly updated VER 0.6d - Fixed: enpassant error - Changed: ability to move pieces even when a movie is playing - Changed: movie-loader program will try to load a shizmoo movie if not valid it will then try to load an ep movie format - Changed: loading a movie from commandline without movieformat argument first try to load as shizmoo, then as ep-format if failed - Added: simple scripted game, devilants strategy topic 1 VER 0.6c - Fixed: knight vs knight collitioncontrol error - Fixed: enpassant error, taking pawn when it shouldnt - Fixed: possible for samecolor pieces ending in same field - Changed: using global timing, updated in Main.update() method - Added: moveevent display, how many moveevent left todo VER 0.6b - Changed: some collitiontimings and the collitionmethods and redefined the kfc rules - Fixed: diagonal dissimilar/same piececolor dodging with bishop/queen - Fixed: samecolor piece moving to same spot when first one is taking an enemy piece - Fixed: inmove-captured pieces where boardinfo not updated corrected - Fixed: pieces which are not chesstypes may move again VER 0.6a - Fixed: information for chessBoard not updated for taken pieces - Fixed: BlackQueen movement rule downwards bug - Fixed: debug key d, boardinfo shows correctly - Added: boolean var STRICTRULE in G.java, (default is true) set this to false to watch shizmoo movies, strict will not allow some legal shizmoo rules - Changed: visual help key h, extended with one more toggle mode - Changed: basicPieceMoveCheck() method VER 0.6 - Using chessBoard array to check moverules - Added: Chess rules, piecetype movement rules - Added: some kfc movement rules - Added: Ability to move pieces when not playing a movie - Added: key n, print movie, ep format - Added: key m, print movie, shizmoo format - Added: file begin.bat, standard setup - Changed: key h, three way toggle, see movement allowed, see moving, off - Fixes: miscellaneous tweaks, customizations and bug-fixes - Removed: Ability to move pieces when paused - Removed: file movieplay.bat - Bug: The shizmoo movies collection worked with ver 0.5j, some will probably not play correct with this ver due to new added movement rules VER 0.5j - Added all piece specific types VER 0.5i - Piece specific types added: WhiteKing, BlackKing - Helperline key added, h VER 0.5h - Collitiontimings and rules adjusted to make the movies collection play as intended VER 0.5g - new key d, debugging info - removed right mouseclick - pressing b twice increases the speed to 5*standard - KFC enpassantrule added - ability to drag a non-moving piece when movie is paused VER 0.5f - User feedback when using the interface (keypress, mouseclick) - new key s, load shizmoo movies VER 0.5e - graphics - bigger images - tile images, make your own background tile, edit tileblack.gif, tilewhite.gif - to user your own graphics-package, replace the images pieces_50.gif, tileblackgif, tilewhite.gif VER 0.5d - added more to the definition for basicPieceMoveCheck() method to support shizmoo movies - taken pieces are removed immideately - debugging help added, right mouseclick - removed enpassant feature because it is buggy, is depended on piecetypes and how the pieces have moved - new shizmoo kfc movies from KFC-IC-2004 VER 0.5c - delay-datatypes are tied to pieces - pieces can only move again, when the delay timer has finished VER 0.5b - coord graph shown correct for board rotation - allow to load STANDARD based (8x8 size board) kfc game configs for position display - new movies by devilant ver 0.5a - timeline not shown for slow speed fixed - Board rotate view key added, press r - Jump forward 5sec in time key added, press g - to be taken area is enlarged VER 0.5 - speed changes using mouseclick is removed - winamp/bsplayer shortcuts keys used, click with leftmouse in window to activate z = slow speed (rewind) x = standard speed (play) c = pause (pause) v = restart (stop) b = fast speed (forward) - animated pieces shows on top of static pieces - to be taken area is enlarged - changed commandline speed value range 1 to 80 - timeline is shown correctly when movie is played in diff speed - better error report when commandline syntax is not correctly used VER 0.4c - enpassant implemented - corrected method getPieceAtSpot() VER 0.4b - kingwalterii's Shizmoo file parsing method The player can load a shizmoo movie and play it - Commandline usage: mp[-sh] [-ep] [integer] A filename must be used, the others are optionals -sh is kingwalterii's parsing method (shizmoo kfc-movie) -ep is my parsing method (kfc_mplayer movie) By default the mode is -sh - Basic legalmovement check pieces can't move to same spot as it self pieces can't move to spot occupied by another samecolor piece This should improve wathing shizmoo kfc movies - Speed changes with mouse leftclick, standard speed rightclick, 2x speed * standard middleclick, 1/2x speed * standard VER 0.4 - Time methods adjustment in code for easy timeline development - testings, leftmouseclick = 5, rightmouseclick speed = 10 change timeline, buggy, time with timeline is not updated timeline jumpts to speed value time calculation - FileMoveList.java can run alone for easy debugging VER 0.3c - can load shizmoo STANDARD movies and play them the correctness of movieplaying still needs to be tweaked - you can watch the movies with different speeds - short move notation supported, if long notation with piecename is included, the piecetype will be checked to validate move - changed timings: delaytime = 10sec, onetick = 1sec, commandline speed value from 1 to 20 default speed value is 10 VER 0.3b - Pieces dodge each other when they move on diff color diagonals (bishops, queens) - ability to set speed from commandline, values from 1 to 10 - new pieces: bishy, rooky, buddha, circle VER 0.3a - Pieces startup pos is loaded from file - Displaying messages uses two lines when message is long - Timings are fixed for piecemovement and delayanimation You can adjust the values in G.java - Pieces can dodge each other, when their startmove is the same