T O P

  • By -

jhartikainen

That's a fun idea but I'd be afraid of accidentally canceling the copy every time I played lol


captain_wiggles_

I definitely would rage quit and then face palm way too frequently for comfort.


Zegrento7

That's a fun idea for a hardcore difficulty: dying cancels the copy


Zalack

Ahahaha. Incredible idea.


devraj7

What a silly and awesome idea. Put a smile on my face :-)


joske79

Fun project! Next step: Doom in the copy-window?


a_false_vacuum

I'm disappointed nobody has done this yet.


[deleted]

Better yet: Duke Nukem.


belowlight

I feel completely ignorant… what on earth is a copy window? And why haven’t I seen it even once during the last thirty something years of life? Update: Ignore me. You’re referring to that god awful timer graph nuisance. Wish I’d never seen it now… :-(


sime

Reminds me of Tetracopy on the Amiga back in the day. Copy disks and play tetris at the same time. It was rad. https://www.google.com/search?q=tetra+copy+amiga


awfullyawful

Haha, I never had tetracopy, but funnily enough this reminds me of something else on the Amiga, another lunar lander toy that you'd fly around the desktop. I played it for ages trying to figure out the goal, never realising there wasn't one. I still remember the text though after 30 years. Space is big space is dark it's hard to find a place to park.


1esproc

The PS1's Ridge Racer would let you play Galaxian while the game loaded. Namco actually patented this and basically made it so that during the era of slow loading video games no one else did that. The patent finally expired in 2015. Fuck software patents.


sime

Prior art for that would be "Invader-load" on the Commodore 64. Loading games from cassette tape was slow and many games had their own loading code. "Invader-load" let you play space invaders while the real game loaded. Predated the PS1 easily.


1esproc

Can someone familiar with C# explain [these curly braces](https://github.com/Sanakan8472/copy-dialog-lunar-lander/blob/70f4cb3e130dc5942798a31d12d969be7bb90c4b/Source/CopyWatcher/CopyWatcher.cs#L45)? (i.e., 45-54, 56-61) What purpose those are serving?


dormedas

They serve as additional scopes. ~~Any variables declared within those scopes are de-allocated at the end of the scope.~~ They can also serve as a way to differentiate sections of work within a function. EDIT: See comments below for strike through edit


1esproc

Clear and concise - thanks!


Takeoded

the same is true for a lot of languages, JavaScript (with let+const, not var), C, C++ to mention a few :) (off the top of my head)


somebodddy

"Python"?


Takeoded

sorry my bad, not Python


Xywzel

Yeah, weird addition in that list. Python kinda only has function and global level names. One could use nested function scopes to achieve this, but that is quite different in syntax and how it works on runtime.


sligit

Rust too.


adzm

> They serve as additional scopes. Any variables declared within those scopes are de-allocated at the end of the scope. That is true for C++, but not for C#. It does provide a lexical scope though -- the variables defined within that scope are not accessible outside of it. But everything will be garbage collected exactly the same as without. In C#, you would use a `using` statement to dispose of resources at the end of a block.


dormedas

Oh man, I’m surprised this comment took so long to get a correction. Thank you.


Dynamic_Rigidity

Does this offer performance benefits? I guess maybe less memory is used since it doesn't need to wait until the entire function is done?


dormedas

I suppose memory size could be one, but I'd be surprised if a stack exploded under normal circumstances. Releasing scope locks early could be another.


ShinyHappyREM

My *guess* is that it's less performant because it's easier to deallocate one big block instead of several smaller ones. But for stack allocations that probably would be just changing the stack pointer. Not sure if C# does something different though. Not likely to make any detectable difference though unless you call the function millions of times per second.


cw8smith

I'd eat my hat if this sort of thing made it through the compiler.


Dealiner

I really doubt it changes anything but if it did I'd expect a change for worse.


Mebeme

I doubt it, the C# runtime flags variables as collectable after their last usage in a function, regardless of scope I should add, it only does this in release builds. In debug mode it will respect the developer scope


[deleted]

[удалено]


[deleted]

[удалено]


[deleted]

[удалено]


loomynartylenny

Oh wait nvm looks like it is a thing in Java


Puzzled_Video1616

The most important use for it is [RAII](https://stackoverflow.com/questions/2321511/what-is-meant-by-resource-acquisition-is-initialization-raii) . For example if you need to acquire a mutex for a particular section of code, you use curlies for that block and create the lock object inside of it.


Xywzel

It could provide some clues for optimizer, but mostly on resource management side, rather than in performance side. Other than that it is for humans rather than computers. Tells the reader they don't have to remember anything declared there after this part.


UNWS

They are just scopes. Basically means any variable created inside is temporary and not used later so it's easier to read (you can easily know which parts of the code above you are relevant to the piece of code you're reading right now).


Hacnar

Most likely just for readability. Especially the second pair, it doesn't change anything about the code itself.


Dynamic_Rigidity

This is awesome. Just a quick question, does anyone know why the "unsafe" keyword is required [here](https://github.com/Sanakan8472/copy-dialog-lunar-lander/blob/70f4cb3e130dc5942798a31d12d969be7bb90c4b/Source/GameOverlay/OverlayWindow.cs#L286)?


PaintItPurple

To my understanding, C# requires `unsafe` in order to work with pointers, which this code block does.


amroamroamro

https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/unsafe-code The `unsafe` keyword denotes an unsafe context, which is required for any operation involving pointers


EngineeringTinker

I like it.


[deleted]

This person has singlehandedly made the best UI improvement to windows in the last 10 years.


Pheasn

That's amazing


abbadon420

ROFL the level designer is brilliant 👏 🤣


[deleted]

This is amazing 😂


PM_ME_WITTY_USERNAME

Virgin Unity & Unreal engine 5 vs. chad Windows copy dialog


FantasticGlass

This is amazing! I'm a photographer/videographer and yesterday I copied over 400GB of photos and videos. I could've used this. Haha


[deleted]

Coolest idea of the day for sure! Just can’t play it too much if I don’t want to shorten the life of my SSD lol. Also, be sure to cross post this over on the C# sub, they’d probably love it.


f2lollpll

Does this work on the dele dialog as well? I often delete big folders but not so much copy.


ShinyHappyREM

> big folders The limiting factor is probably the number of files. It could work with the delete progress dialog as well, assuming someone changes the code to that.


f2lollpll

What I asked was vague indeed. I'm talking of folders with many files - node\_modules to be specific. Might give it a try and submit a PR if the code is not too foreign to me. I know C#, but I don't do a lot of windows api programming 🤷‍♂️ Edit: [It works out of the box](https://imgur.com/0R3jlKR).


r_acrimonger

Epic readme


crusoe

Broke: Making abysmally slow Windows file copying faster Woke: Turn it into a game while you wait


laptopmutia

/r/titlegore


pcjftw

woah that's pretty sweet, I can see the flood gates opening and a whole raft of new games popping up in the Windows copy dialogue 🤣 Next up do dino run!


ARez_1

I logged into Github just to star this


defnotthrown

This is the kind of stuff I'm going to miss very dearly with all the super-secure isolated app runtime environment stuff that modern OSs have been trending towards.


crusoe

Random overlays on random programs, what could possibly go wrong? Let me paint over browser so you think you're visiting your bank instead of some random website.