Posts for Bisqwit


Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Aktan wrote:
That's a reasonable explanation oh Bisqwit's findings, rhebus! Thanks for the information.
I tried both Imagemagick's -type grayscale and -colorspace gray options, and they both gave the same result, which according to Imagemagick documentation, is calculated with that Y formula (in both cases). -fx (R+G+B)/3 gives the other grayscale result, which was not shown here. So no, that was a good theory, but not the right explanation. The real reason is still unknown.
Post subject: Magnification of details (Lunar Ball version)
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Warp wrote:
I don't know if it's just me, my monitor, or a combination, but I just can't see a visible difference between the images, even when zoomed.
Make sure you compare the vertically next picture to the previous one. The two horizontally adjacent images are completely redundant. Aktan forgot to deobfuscate his post. Here is a magnification of the interesting bits in his images. I have also included a grayscale version of each image, to show how the luma is affected (or not affected) by each conversion. Original material (no artifacts) Encoding: RGB→YV12 Using Lanczos Decoding: YV12→RGB Using Lanczos (High-quality software) Comment: The spheres are very round and pleasant to look at, but there are ringing artifacts where chroma changes are most dramatic (the 5 and 6 balls look like they're floating on jello) Encoding: RGB→YV12 Using Lanczos Decoding: YV12→RGB Using Nearest-neighbor (Software default) Comment: There are extra grays and the spheres appear blockier. The 3 ball has grown a ghost image. The 5 ball has changed shape entirely. Even the wall has grown a shadow for no reason at all. Encoding: RGB→YV12 Using Lanczos Decoding: YV12→RGB Using Windows default (maybe hardware-accelerated, maybe software quadratic scaling) Comment: The difference to lanczos-lanczos is almost unnoticeable. The ringing artifacts are smaller though. Encoding: RGB→YV12 Using Nearest-neighbor Decoding: YV12→RGB Using Lanczos (High-quality software) Comment: This combination smudges stuff profusely. The smudging still only happens on chroma; the luma (luminance, which is what the grayscale image shows) is unaffected and appears as in the original. Encoding: RGB→YV12 Using Nearest-neighbor Decoding: YV12→RGB Using Nearest-neighbor (Software default) Comment: The effect of halving the chroma resolution is very noticeable. Some pixels are simply wrong color. The score meter is very blocky. But there are no ringing artifacts whatsoever. This is the picture you should look at, if you want to learn what chroma supersampling ― using the same chroma for every 2x2 pixel group ― means and what are its practical consequences. All of the others use mathematical filter trickery to attempt to make the fact less noticeable. Encoding: RGB→YV12 Using Nearest-neighbor Decoding: YV12→RGB Using Windows default (maybe hardware-accelerated, maybe software quadratic scaling) Comment: Better than the above two. There is an artifact beside the number "5" that does not exist in the lanczos-encoded versions. The power meter edges are very blurry. I am actually surprised of the fact that the grayscale images did not appear to be completely identical. Wasn't the point of these filters to scale the chroma, not the luma? But in retrospect, this is probably an artifact of RGB conversions; there are YUV values that cannot be expressed losslessly in RGB, so additional brightness is "loaned" from other color components by decreasing the saturation. Or something. Waiting for a better explanation. SUMMARY:
Encode    Decode     Prob*   Appearance & score
------------------------------------------------
Lanczos   Lanczos    10%     Good       (9pts)
Lanczos   Point      40%     Horrible   (1pts)
Lanczos   Something  50%     Good       (9pts)
Point     Lanczos    10%     Horrible   (1pts)
Point     Point      40%     Tolerable  (6pts)
Point     Something  50%     Good       (9pts)

Prob* = estimated probability of being decoded this way

As an encoder, you can only control how you encode stuff. You cannot control what will be used to decode it. You should maximize the chances of it looking good when decoded.
Summary of the consequences of your choices according to this chart:

Lanczos: 60% * 9pts + 40% * 1pts              = 5.8pts
Point:   50% * 9pts + 40% * 6pts + 10% * 1pts = 7.0pts
I would also like to see the encoding case of "average of four pixels". It is what MEncoder does. This would also change the Sonic case dramatically. With nearest-neighbor, I think you get sort of blinking between dramatically different chroma values. But lacking that option, of this selection, I recommend nearest-neighbor scaling in the encoding phase.
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Scepheo wrote:
Honestly, I don't see any difference. At all.
Your image is scaled-down and thus irrelevant. In the original one, take a careful look at the ⑤ ball. Also, the power meter.
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
I have to wonder... Why did you not use the already existing syntaxhighlighting class that is behind the SRC_EMBED code in the main site? It has a great coverage of different languages (and a cooler color theme selection!)*. I'm just sad seeing that my code is not being used :( *) At least, when you upgrade it in case it's an older version So here's my test on PHP, from http://bisqwit.iki.fi/story/howto/php/#StringConstructs. [code php]<?php // These two statements are equivalent: $a = "Apples are $x each."; $a = 'Apples are ' . $x . ' each.'; // These two statements are equivalent: $a = "Apples are \$x each."; $a = 'Apples are $x each.'; // These three statements are equivalent: $a = "Your {$item->name} is {$item->kind} and expires in {$item->eta} days."; $a = "Your ${item->name} is ${item->kind} and expires in ${item->eta} days."; $a = 'Your ' . $item->name . ' is ' . $item->kind . ' and expires in ' . $item->eta . ' days.'; // These four statements are equivalent: $a = "The file is {$stat["size"]} bytes long."; $a = "The file is {$stat['size']} bytes long."; $a = 'The file is ' . $stat["size"] . ' bytes long.'; $a = 'The file is ' . $stat['size'] . ' bytes long.'; // Variable inclusions may be very complex, even recursive, // to the chagrin of writers of syntax highlighters. // These two statements are equivalent: $a = "This is {$table["subtable{$subnums["current"]}"][$position['now']]}."; $a = 'This is ' . $table[ 'subtable' . $subnums['current'] ] [ $position['now'] ] . '.'; /* still in sync? */[/code] Another one, of BASIC:[code basic]10 DEFINT A-Z 20 SCREEN 0: WIDTH 40,25: KEY OFF 30 ' Define all distinct tetromino shapes as bitmasks 31 DATA CC,8C4,6C,4444,F0,264,C6,E4,4C4,4E0,464,8E,C88,E2,226,2E,88C,E8,622 32 REM e.g. 8C4 = 1000, 2E = 0010 33 REM 1100 1110 34 REM 0100 and so on. 35 DIM SHAPES(18): FOR A=0 TO 18: READ S$: SHAPES(A)=VAL("&H"+S$): NEXT 40 ' Define the mappings of block number -> block shape 41 DATA 0,0,0,0, 1,2,1,2, 3,4,3,4, 5,6,5,6, 7,8,9,10, 11,12,13,14, 15,16,17,18 45 DIM INDICES(28): FOR A=0 TO 27: READ INDICES(A): NEXT 50 ' This function reads the given slot from the given block in given rotation. 52 DIM BITMASKS(15): FOR A=0 TO 14: BITMASKS(A) = 2^A: NEXT'Note: 2^15=overflow 55 DEF FNBLOCK(BL,ROT,X,Y) = SHAPES(INDICES(BL*4+ROT))AND BITMASKS(Y*4+X) 900 ' Subroutine for drawing a "pixel", i.e. one block slot. 901 ' Params: x,y, c 910 LOCATE Y+1,X+1: AREA(X,Y)=C 920 IF C THEN COLOR C AND 15: PRINT CHR$(219); : RETURN 930 COLOR 1: PRINT FNEMPTY$(X); 940 RETURN 999 WIDTH 80: COLOR 7,0: PRINT "GAME OVER": KEY ON: END ' simple.[/code]Gotcha. And for C++: [code c++]template<typename T> struct Array256x256of: public Array256x256of_Base { public: T data[256*256]; public: Array256x256of() { } virtual ~Array256x256of() { } public: virtual uint32 GetLive(unsigned method, unsigned index, unsigned timer) const { return (data[index].*(T::methods[method]))(timer); } virtual uint32 GetStatic(unsigned index) const { return GetLive(bgmethod, index, 0); } virtual void Set(unsigned index, uint32 p, unsigned timer) { data[index].set(p, timer); } };[/code]
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
My opinion, which I have expressed to the admins: I see. Well, you have done that voluntarily, but the casino sites also employ questionable marketing ethics (guestbook spamming, referrer spamming etc.) which puts them, collectively, firmly on my marketing blacklist. To which, I was informed of the following reasoning (paraphrased): Server hosting is expensive. Phil, are you willing to donate for TASVideos? I am different. If I were in this situation and my only choice would be to put casino ads, I would have let the site die (and transfer it to lightweight readonly hosting). If the site were to live, sooner or later something would have turned out. Such as people beginning to donate.
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
I like the art in 1–1. The art in 1–2 left wishing for more interesting antics. Nice job with the vine in 4–2 warp zone; not so nice in getting to the vine. Cool goomba jump in 8–1, but it can be done faster without involving the goombas, as explained by andrewg earlier. After that, watched enough.
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Re: Actual topic. Good news ― I don't hate any one of you! I've also got images in my signature. Though I've done my best to make it as little obtrusive as possible. It's even the same color as regular signature text. Its height is also only three text lines, smaller than the four lines allowed in the recommendations.
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Model: Nokia E70 Processor/CPU: 220 MHz ARM9 RAM: 45 MB, of which about 22 MB available Video: 352×416, 262K colors TFT screen Audio: HF speakerphone Battery: 1070 mAh, Nokia BL-6C Storage: 64 MB internal flash storage Storage: 64 MB MiniSD card Input: Qwerty keyboard Network: WLAN Network: Bluetooth Network: GSM Operating system: Symbian OS version 9.1 GUI: S60, 3rd edition This is basically what I use whenever I am somewhere, and usually when I am nowhere as well. At home I have Q6600 w/ 6GB and AthlonXP @1.7GHz w/ 1GB, but these are less worth a mention. At work I have IBM T42 (ThinkPad) with fingerprint detector.
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Marcokarty wrote:
I think this stage of Megaman 1: http://www.vgmaps.com/Atlas/NES/MegaMan-BombMan.png ... Mashed up with this TAS: http://tasvideos.org/1103M.html ...Would be awesome.
I wanted to try this. However, it looks like it's a challenge that is a bit beyond what animmerger can do, seeing as how Megaman really acts in the "next" screen", but appears in the current screen. Moreover, when the screen scrolls up in that stage, strange things happen. See this illustration for reference: http://bisqwit.iki.fi/kala/snap/bmweird.png Screen 1 appears. Screen scrolls up, into screen 2 -- however, screen 3 is displayed instead (because that is the screen where Megaman is in). During scrolling, screen 1½ appears (mix between 1 and 3). After a scrolling, screen 3 changes into screen 2, the correct screen that is above screen 1. Then, screen changes into screen 2½ (camera centers on Megaman's actual position). You try to do that with an automatic canvas tracer! To render it properly, screen 1½ would need to be split so that the bottom half is rendered at screen 1's location and the top half is rendered at screen 3's location rather than at screen 2's location. Basically, I gave up trying to convey that properly. Here's the approximate result! http://bisqwit.iki.fi/kala/snap/bmweird1.gif -- 4250 frames http://bisqwit.iki.fi/kala/snap/bmweird0.gif -- 200 frames cyclic If your goal is to understand what happens in the Bombman stage, I can see a static image would drive that purpose better. Here is an example of a such image: https://files.tasvideos.org/bisqwit/rockman1tas-cutman-explained.png
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
I'm voting "immediate rejection" based on the submitter's apparent immature attitude* alone. *) I seem to lack the English vocabulary words to properly describe what exactly is wrong with it. It could be sketched with adjectives like "thickheaded", "insistant" or "arrogant", but that only gets half-way of it at most and also has wrong meanings.
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
For what it is worth, I think this is more interesting than Front Mission.
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Here is my WIP for Big Foot. I began it in 2006 or so, and the filetime for this WIP is 2008-12-24. It stops at the beginning of route to Pueblo. I have not continued it for a while, but I would like to see a finished movie. http://dehacked.2y.net/microstorage.php/info/1614017663/bigfoot.fcm Would anyone take over? It would also be worth considering to begin a 2p movie. It would finish faster, but of course it would be more laboursome to complete. On the other hand, I would still like to see what happens if the sixth reincarnation of the computer player is bankrupted. As for "why would it be interesting"? -- The races from a city to another city can be made as interesting as one wants. -- The tractor pull, mountain climb and other events are based on mashing Left and Right buttons as quickly as possible, in an alternating sequence. In a TAS, you can obviously surpass human limits and always perform awesomely, as is done in this WIP.
Post subject: TILE_Tracker now available as standalone program: animmerger
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Here's something I have been recently working on. http://bisqwit.iki.fi/source/animmerger.html It is based on the code behind the engine described here, http://tasvideos.org/Bisqwit/Source/TileTracker.html which is used for: ― Creating animations for RockmanTricks and SuperMarioBrosTricks ― Creating automatic maps ― Creating motion trails ― Creating lemmings! It reads a number of PNG files, each file corresponding to a single frame of an animation, and tries to align them together in order to form a map. The map can be formed in a number of different ways, including: ― "Most common pixel", i.e. produce a static picture that represents what most likely is the background picture for the entire scene represented; use this for creating static level layout maps. ― "Average pixel"; i.e. produce a static picture that displays motion trails for everything that moved. ― "Changelog pixel"; i.e. produce an animation corresponding to the entire input. The animation is affixed to the global frame of reference, i.e. the background picture, as opposed to the local frame of reference that is the player character. ― "Loopinglog pixel"; i.e. Lemmings mode; a slight variation of the changelog method. How to use: ① Produce screenshots, for example pressing F9 every few frames in FCEU while a movie plays. animmerger needs to be able to deduce reliably how to stitch the screenshots together, so the screenshots should be produced intervals such that the relative motion of the background picture between two screenshots is not larger than 16 pixels. At most 4 pixels is preferred. (Ⓔ ② Run animmerger on them. Be sure to set the changelog method (commandline option -pc) for best results. Result: tile-0000.png, tile-0001.png, and so on. (Ⓕ ③ Merge them into a GIF animation. mogrify -format gif tile-*.png; gifsicle -O2 -o result.gif -l0 -d3 tile-*.gif Why to use? ― You want automatic level maps ― Animations anchored in the global frame of reference take considerably less disk space as GIF animations and look cooler than animations anchored in the local frame of reference, because there's less stuff that needs to be redrawn every frame. This is beneficial for the GameResources subpages. Caveats: ― Strictly 2D only (can not do perspective correction) ― Any change of global brightness (such as bomb blasts in Super Metroid) will likely confuse the image aligner (ⒶⒹ ― Any chance of perspective / zooming will definitely confuse the image aligner (Ⓐ ― A screen that is full of moving objects will likely confuse the image aligner, making it unable to figure out what is background and how it has moved. (ⒷⒹⒻ ― Scene transitions, including dedicated status screens will likely confuse the image aligner (Ⓒ(Ⓐ ― Converging scenes temporally apart will most likely not be stitched together properly (as in, if after a level transition you arrive into a place you've been to before, but from a different direction) (Ⓒ(Ⓐ ― If given a GIF file, only reads the first frame. You can extract the GIF file into individual frames using gifsicle, but when recombining the frames, you must manually indicate the frame delays. (ⒶⒺ ― Parallax scrolling undermines the benefits of global frame of reference. To make maps / animations of SNES games, you must first disable parallax animation. This is best done by hacking the emulator to force the scrolling offsets of all background layers to be the same. Doing so left for exercise. Workarounds for the caveats and other notes: Ⓐ) If you are a programmer, consider contributing code in animmerger and making it better. Begin by cloning git://bisqwit.iki.fi/animmerger.git Ⓑ) Consider hacking the ROM to disable animation of background objects. Ⓒ) Could possibly overcome this by ignoring frames that trigger scene shift alerts, and by processing them after everything else. Ⓓ) In the past, TILE_Tracker was patched directly to the emulator and read the scrolling offsets directly from the PPU, solving the problem. Now, when it has to rely on image content exclusively, the situation is different. Ⓔ) You can produce screenshots also by extracting individual frames from an existing GIF animation: gifsicle -U -E animation.gif Ⓕ) Heads-up-displays (scores, life meters, etc.) are usually anchored to the local frame of reference. When the animation becomes of global frame of reference, suddenly you find that HUDs are annoyingly travelling around, following the player character's movements. It makes sense to hide them. Study the --mask option of animmerger to remove them from contributing to the animation. Or hack the ROM / emulator to do so for you. ----------- EDIT: More lemmings! I added example images on the webpage.
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
In the olden days, I would have published this movie without a corresponding AVI file. So as to have it as "you know it's done and there" but not to showcase it as something to watch. But these days are no longer.
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
This is one of those "your mileage may vary", but in my opinion, the term "pacifist" gives you an option of using weapons when you've been cornered and have no choice but to die. It is a matter of choice; it's a philosophy. Philosophies are often defenestrated when survival is in question. Maybe Contra isn't very much about survival, though. Whereas the term "swordless" means "without a sword". If you're labeled "shoeless", but you wear shoes, are you shoeless? Unless the word "swordless" means something completely other than "without a sword". There are words like that in English. As for Adelikat's list, I suggest "5) You're not trying hard enough. Find a way to _complete_ the game without the sword." But seriously, I'm talking here about nomenclature only; not about suggesting anyone to reject this submission.
Post subject: "name" parameter, and movie link
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Feature request: Make the "name" parameter on movies.cgi smarter. http://tasvideos.org/movies.cgi?name=solomon+key gives me 0 movies (and an error, but that's another topic). II know it accepts "solomon's", but I want it to be smarter and not require me to go through hoops to get what I want (i.e. exact spelling). Feature request 2: Make the movie name (or something else) clickable on multi-movie movie listings, and have it lead to the just-that-movie page. Now I have to read the movie id from the mouseover text, and enter it manually in the URL to get e.g. 1000M.html.
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Category: - Mostly swordless? - Swordless... sort of? - Sword-lite? - Swords, swords, swords... won't show you them, except in the end? It is a bit compromised. Like calling the bygone 1-star Mario64 movie a starless movie, or mostly starless... An accomplishment and a challenge, no doubt.
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
13 months ago I have documented the automatic screenshot process, that I used, including the criteria for picking interesting frames, here: http://tasvideos.org/NesVideoAgent/AutomaticScreenshots.html and here: http://tasvideos.org/Bisqwit/Source/BeautyAnalyzer.html In retrospect, I think a LUA script could be written that works for most emulators. Only analyzing the screen content is a bit slow to write in LUA. Also, Warp is correct re: the ROM storage. All of SMS, NES, Genesis, AGB, DMG, SGB and GBC ROMs, including the myriad of overdumps, hacked and patched versions, in 8907 MiB total. SNES was 1629 MiB. None of the emulators need 7zip/zip/whatever features within them. It's just a filesystem.
Post subject: Re: Countdown
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Mr. "TASeditor", you should know that the people of this site are not the kind of people that will take a leash. They will do anything except take the leash. They will circumvent the rules. They will even circumvent the concept of circumventing the rules. As such, locking this pointless topic. (My apologies to myself and to anyone involved for involving myself with this site.)
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Pointless Boy wrote:
0
    - Abuses programming errors.
+1
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Warp wrote:
I have an idea how you could have reduced a bit the bothersomeness of the useless rate-resetting null shots: Make them in the direction as you would if you didn't have to worry about the point-ticking delay, with as little power as possible. After the null shot, make the subsequent actual shot in the exact same direction (ie. without moving the cursor at all) with the proper force. The null shots should obviously not make the ball hit anything (because then you would have to change the direction of the cursor).
That is actually what my "first shot only" round does; i.e. shoot the first shot in all possible directions at all possible velocities, and if the first shot does not pocket anything, immediately shoot the second shot into the very same direction at maximum velocity. Obviously this is not very often the optimal case.
Post subject: Creating a Tetris clone on Tandy 1000 (emulated in DOSBox)
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
I created another programming-related tool-assisted education video. In this video, I create a tetris clone in GW-BASIC and play three-channel melodies on the special PC speaker of Tandy 1000. Link to video Available in HD also for download!
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
[bump] The submission has been updated. Framecount went from 85834 to 85792 in this update; time went from "23:50.57" downto "23:49.87". And I think, unfortunately, it will probably still fail for some emulators. At least the stage 60 has now been exhaustively tested. And not a moment too soon; it's horribly humid and warm here, I don't need the server running at 100% power to add to that...
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
henke37 wrote:
And a bonus one that some of you already know the answer to: You are a rude warrior that needs to pass two men. One always tells the truth and the other always lies. They wont let you pass until you have figured out who is the lying one. What is the fastest way to do so?
I suspect this question is inspired by the Order of the Stick. The wording suggests that the answer is to inflict harm on one of the men. Their reactions may reveal [1] who is the obligatory liar. Though it might not work, too.
Editor, Experienced Forum User, Published Author, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Kuwaga wrote:
Here is my solution to Robomecha! before I knew about bridges nor about flipping pieces, lol.
Wow. Your URL is so long that my animation generator (or rather, PHP,) does not even receive it. I wonder what's up with that.