Hi guys, just want to share with you few things happened this year, particularly in the month of February.
Despite I have Twitter, I still prefer Newgrounds for writing post like this, since the characters limit is way extended.
Maybe some of these informations can help others in similar situations.
My hilarious experience with Linux
First things first: when I was a kid, I've always heard about Linux but never understood why someone should use it instead of Windows. During the years, when programming, I often came across some obstacles which seemed (and I can actually confirm it) Linux would've handled better (e.g: building libraries with Makefiles or restriction in sending forged packets).
Also, my PC started getting slower and for the first time I decided to get rid of Windows and searching a distro that was right for me. Fedora was very tempting; in the end I went for it.
So I transferred the most important files in a safe device (or at least I thought), made a bootable USB and installed Fedora.
"Okay, now what?" I thought.
The first impact was good, UI kinda reminded me OSX. After some days I've learned the basic Terminal stuff: downloading from package repositories, surfing through folder, etc...
Still, I was missing the simplicity of Windows in performing some actions (create a new app launcher icon was very annoying). Almost everything should be done in the Terminal, like creating a new text file or opening the file explorer with root privileges. Even entering the password every single time you want those privileges, was a bit awkward (from a security point of view is actually good).
But most of all... compatibility.
All applications are mainly developed and supported for a Windows environment. Luckily the majority of applications I was using were cross-platform, except for GameMaker: Studio. Even games: I couldn't play anything that was outside Steam (see Proton).
The time has come: Wine. Wine is the most popular method to run Windows applications on Linux. It describes itself as a "compatibility layer" instead of an emulator.
I was about losing EVERYTHING
Not actually for Wine, but for Lutris. I wanted to use Lutris as a launcher for all Wine environments.
Setting Wine + Lutris for first timers, isn't that simple. Since I was messing everything up, at some point I wanted to delete a wineprefix stored in Lutris and...
...I didn't know it was going to delete all the subfolders inside the path (and I was not the only one!).
Here is where the problems started. It deleted a folder with not very important files, except for Heartship source code and my Google Play keystore files.
So I transferred the most important files in a safe device (or at least I thought)
Well, I opened my Godot projects folder... And it was empty. Yay!
At least I wanted to recover the folder that Lutris removed. On Windows there's a ton of tools (Recuva is a nice one) that help you recovering fragmented pieces of files residing in the hard disk.
On Linux uh... were very poor.
Continuing searches I've found the HARD DISK KILLER (joking, I just was ignorant) called ddrescue.
In short: this tool doesn't retrieve lost file, but it creates an EXACT copy of the hard disk blocks (useful if the HDD is physically failing).
So what happened? I was basically overriding the HDD, with the same HDD data.
After a while, the program stopped and said: "Hey dude, no more memory". So I shut down the PC and... Black screen.
Total panic. I thought I've deleted EVERYTHING. All games source code and projects.
The next day I went on a shop buying a small SSD and a SATA-to-USB cable in hope I could resolve this situation.
I will not go too much into details, but I just want to let you know that all the process was about two weeks of despair attempts.
In the meanwhile, I chilled down because I managed to access in GRUB command line and localize all the directories with all the files: they were safe.
The problem was: how to retrieve them? And the solution was actually simple, but that's really easy to say in hindsight.
I've loaded Knoppix (a small portable OS) in a USB and make it the primary boot device. With Knoppix I was able to access the HDD data, and trasfer it to the SSD I bought.
Okay everything as before, but I still had lost the 3 source codes and the keystores.
The Godot sources were lost since I was on Windows, so they were irrecoverable. At least I wanted to retrieve Heartship.
The last recovery tool I used was PhotoRec, which actually worked as expected. The only thing is that the files recovered were unnamed and there were A LOT OF GIGABYTES OF FILES.
Then I found the command that saved me:
grep -iRl "text"
This lists all the files which contains the specified text. I searched about "flx", "bat", "player", all words used inside the source code, and piece by piece, I riassembled it.
Happy with that, I could finally format the HDD and reinstall Fedora.
New PC, new problems
After that episode, I kept using Fedora and started to get used to it.
In the meanwhile, I bought a new PC (finally).
I have to be honest: I fell in love with Fedora although the troubles, but at the same time I really needed Windows, also because Wine can't run everything.
When PC has arrived, with a Windows OEM already installed, I decided to do the dual boot (in case you don't know, is installing two operating system in one machine).
Here's the new problem. My previous PC was AMD, and Linux has good drivers for it. Now I have NVIDIA, and I'm sorry to say but the open source NVIDIA driver (nouveau) sucks.
I performed a 3D rendering FPS test and was about 10 FPS. After another tortuous process lasted hours, I've installed the proprietary NVIDIA driver which performed good.
Now, a thing that I didn't get instantly, is that Fedora is more like for testing new Linux experimental features, in fact there were updates every day on the kernels and stuff.
And every update I was going to do, made me MAD, because new problems always arose. In some updates, NVIDIA driver didn't work anymore and everytime I had to reinstall it.
After new Fedora 34, I regretfully had to remove it. The new audio driver PipeWire was giving other problems, the OS was slower, and I would had to install NVIDIA driver again.
Linux Mint and unexpected Godot source recovery
As I said, it wasn't a Linux problem, more like Fedora wasn't for me. So I decided to try a new Linux distro and I went for Mint.
Oh my! It was a whole different experience: it has a driver manager, an easy desktop personalization, an intuitive OS interaction and way less updates.
Definitely what I was looking for, and this is what I still use today together with Windows.
Oh, right. How do I recovered Godot sources code after I've literally disintegrated an HDD?
I was downloading from Google Play Console all the APKs to save them locally in my PC.
For curiosity, I opened the Nitrogenous APK with an archive explorer and I saw there were all the resource files (GDScript, sprites, audio), but they were compiled and unusuable.
"If there was any way to reverse engineering these...". Searched for "Godot decompiler" and boom: GDSDECOMP.
Thank you guys for making this.
I've builded the master branch from GitHub, sent all the files to the decompiler and like magic, all the compiled scripts got transformed into the original source code. I had to adjust some little keywords and redo the project settings, but this piece of software did most of the job, even with graphics.
Do you suggest Linux?
Considering it without Wine I'd say... it depends.
Are you an artist?
Are you a programmer?
Absolutely. Dependecies installation is way easier than Windows and the overall environment feels better.
Are you a composer?
There's VST3 which is platform-indipendent, but still not so widespreaded.
Are you a casual user?
Probably. Web browsing experience is not different from any other OS; you can listen to music, read document, watch pictures and videos normally. It could be problematic when you want an app that is only supported on Windows or Mac.
Linux strength is community support. Everyday, people work to make it better and better.
A double-edged sword is the philosophy of "everything free". Yeah, I've already listed a bunch of free stuff, but some companies hardly show interest on making a version for it.
That's all, hope you've got a good reading. Have a nice day!