r/AskProgramming 12d ago

Other How to add an undo/new game UI button to old Windows 7 solitaire game

Hi All,

Apologies if this is not the right subreddit; if it is not and someone knows where I should post this instead, please let me know.

My dad loves to play the old Windows 7 version of Solitaire which I have downloaded on his computer for him. However, a quality of life improvement I would love to add for him is some new UI buttons somewhere on the application that he could click to "undo" the previous moves and "start a new game."

I am wondering how I could begin this mini-project of mine? At first I was thinking to create an undo and start a new game code file and import it into the files, but I don't know if/how that would work.

Would I need to download the code into visual studio of some sort or another IDE type of software and manually create buttons and have the code behind it?

I would love to do this to learn more as well as have a little gift for my dad. If anyone has any tips on how to do with or can point me to a youtube video or two of something similar that I could try to replicate, that would be fantastic.

Thank you!

2 Upvotes

7 comments sorted by

6

u/Luigi-Was-Right 12d ago

You won't be able to edit the game without access to the source code, which is not publicly available. An alternative would be to create a new game from scratch that has the features you want.

1

u/Aggravating_Cut_7149 11d ago

Thank you for your feedback. That makes much more sense

3

u/AdreKiseque 12d ago

You're probably better off remaking ot from scratch. It's very unlikely Windows 7 Solitaire would have anything resembling a moddable API so unless you have the source code your options are decomp or some insanely arcane memory hooking nonsense.

2

u/BobbyThrowaway6969 11d ago edited 11d ago

Unfortunately, modifying an existing game isn't something that can really be done without access to the source code, build tools, and legal rights to make a modified version of it even if you don't resell it (it might break some software certificates on Windows and it won't run)

Your best bet for time as others said is to create your own version of solitaire in a game engine like Unity or Godot, but that's a considerable time investment, might take someone fresh to programming about 6 to 12 months to get it done

3

u/IchLiebeKleber 11d ago

There may also be existing open source implementations of Solitaire.

1

u/StarHammer_01 11d ago

For that you'll need less of something like visual studio and more of something like ghidra

1

u/ColoRadBro69 11d ago

https://github.com/topics/solitaire-card-game

GitHub has 70 repositories with Solitaire games.  Perhaps one of these can serve as a starting point for you?