Show HN: Defrag the Game (defrag-game.com)
Hi,
A while ago, I came across this https://www.youtube.com/watch?v=KR3TbL3Tl6M on YouTube showing 8 hours of defragmenting a hard drive. For some reason, it inspired me to create this small game.
Have fun :)
115 comments
[ 3.1 ms ] story [ 196 ms ] threadThe High score is calculated with the following formula: (elapsed seconds / 4) + operations + fragmentation
operation: each movement = 1 fragmentation: each gap between two elements = 1
inverted score system (less is better)
Seriously though, thanks for the suggestion! I'll definitely add a small link with game rules to help everyone out.
Nifty game, but I almost gave up on it when I couldn't figure out what the hell I was supposed to do as the first move.
Thank you
It shows that there are people who take the time to provide thoughtful feedback in return for my invested time, which goes beyond simple comments like "this is stupid because I don't understand it."
Thank you!
edit: I realized that the "lines" might be meant to represent disk cylinders in the pre-LBA era, but even then, a line should "wrap around" to itself instead of the next line.
i would also allow blocks be moved freely with the goal to move as little data as possible.
Has nothing to do with age. Clearly the game has a host of limitations which has nothing to do with actual disk defragging. (Can only process the blocks one at a time in a specified but unknown to the user order. Blocks move one cell at a time and can't jump over other blocks.) And doesn't have others which are core to disk defragmentation. (Sectors, and files for example.)
Nice educational game!
I know that some browsers has still issues when it comes to pure CSS animations as they are running on the GPU and when the Hardware acceleration is disabled the CPU goes sometimes crazy.
I had the same on an animation GitHub a while ago used on their landing page.
Or you can hook this mechanism into one of the WASM x64 emulators and attach the drive directly to a copy of MS-DOS or Windows 98 running in the browser.
[0] https://en.wikipedia.org/wiki/DeFRaG
A classic from about a decade ago: https://www.youtube.com/watch?v=RUCtMIjL-Z4
Best Score: XXX
(Aim for a lower score)
Just refresh the page
on the other hand, it might be better to change the scoring system. Calculate the worst score using the current system. Then reverse so the score goes up as in displayScore = worstScore - oldWayOfCalculatingScore
edit: managed to get a score of 131 for getting to 0 fragmentation in 30 seconds, i had 139 from just spamming space
Fun idea but not great point strategy.
Thanks
Best Score: XXX
(Aim for a lower score)
At the end of a round. Probably not perfect but I hope OK for now.
Thank you ! :)
I’m not sure what else someone would interpret as drag and drop on a touch screen. That’s gonna be swiping.
I got other things I’m supposed to be doing right now so I’m gonna go do those.
works for me with iPhone13 + Safari
The black boxes are data; they are automatically picked up. You're swiping to move the cursor that places the data. The "write file" button writes the data.
I used to love watching the defragger back in the Windows 95 days, and later I bought copies of PerfectDisk for both home & work. Unfortunately Raxco closed up shop earlier this year, and their license server is offline[0]. So I can't run it other than in trial mode. And that's a shame, as it was the only product that could fix the fragmentation problem we had with over fifty thousand files in a directory tree[1].
I don't know if NTFS has a version ID or if PerfectDisk will respect an ID higher than it was written for, but I'm nervous that the now-unsupported defragger might trash the internals of my filesystem. :(
[0] 1990's style software licensing - super annoying.
[1] Startup. No time to rearchitect it correctly. Usual story.
https://www.youtube.com/watch?v=KR3TbL3Tl6M
|> it inspired me to create this small game.
It was inspiration, not a simulation nor it claimed to be realistic. This is the type of artistic license that game designers have always had at their disposal.
Then you need frequent compaction of the space because it ends up full of small unallocated blocks.
See https://www.geeksforgeeks.org/file-allocation-methods/
I liked the game, btw as it captured a certain look and feel as well as was fun to play.
That said, I can't see how this is fun tbh.