Feeling depressed after finished a game

(I wrote a related post in Chinese here.)

I recently finished a visual novel (a game genre). It is a great game with fully voiced feature, and it has good ending. However, after I finished the game, I felt depressed and empty until now (around a week now). The feeling is just similar to grief. I believe that, how good the game is, then how empty it will be. This is because the fictional and realistic are totally different thing. Whatever you feel through fiction, when you come into reality then they are just gone. And you found that, what you gained was just emptiness.

I searched online, and found that this type of depression is called post-game depression.

I have summarized the factors that cause me having post-game depression.

  1. The player (you) has great empathy – you can feel like game character feels.
  2. Game characters have realistic characteristics – you will feel that the game characters like a real person.
  3. Fully voiced dialog – just like those scamming dating app, you feel the heartwarming speech.
  4. The game character(s) match the player’s favour – you like the character.
  5. The story is long – you spend time with the game, causes you attached to the game character.
  6. The story is reasonable and logical – it may contains science fictional element, but story flow is reasonable.
  7. Good ending, but without finalize everything – you see the happy ending, but looks like something is missing.

In conclusion, you are attached to a fictional story that is somehow realistic (especially in the characters’ relationships), but when the story ended, then it is ended. Nothing else. This causes the player feel something suddenly missing.

In order to cope this bad experience, I am trying to (i) pay more attention on my spiritual life (i.e prayer and bible reading); (ii) talk to someone else (e.g. join Discord); (iii) listen to sad songs/musics; and (iv) re-imagine the whole game with a more completed story. Time passing will make me forget the game and the feeling, but this is really a bad experience. 😕

Advertisement

Twitter interests deselection bookmarklet

I like to use Twitter, but the new Topics and Interests feature of Twitter is damn annoying. It keep showing something I am not interested of.

I looked for the solution from Internet, and finally I come out with this bookmarklet, which can be used in Settings > Privacy and Safety > Content You See > Interests.

javascript:(async()=>{const sleep=ms=>new Promise(r=>setTimeout(r,ms));const inputs=document.querySelectorAll('section[aria-label="Section details"] input:checked');for(let i=0;i<inputs.length;i+=1){const rand=Math.floor(Math.random()*2e3);await sleep(9e3+rand);const input=inputs[i];input.click()}})();

After trigger the bookmarklet, just leave the page there, it will slowly deselect one by one.

Alternatively, just use Tweetdeck, which is much cleaner.

Bluetooth devices

Due to previously reviving old Samsung Galaxy Tab, I bought a bluetooth gamepad/joystick (MOCUTE 053 Gamepad). Then I found that bluetooth technology is so wonderful, as I am not bound by wires.

Configurations

In Linux, to make Bluetooth to start on boot, need to edit /etc/bluetooth/main.conf and set AutoEnable to true. Furthermore, I have issue on the paired device. I also set AlwaysPairable to true.

Another issue I faced was the devices are not able to auto reconnect after resume from sleep. As a result, I created a custom “systemd unit file”,

[Unit]
Description=Restart bluetooth when resume from suspend
After=suspend.target

[Service]
Type=simple
ExecStart=/usr/bin/systemctl restart bluetooth.service

[Install]
WantedBy=suspend.target

Some good bluetooth devices

There are some bluetooth devices that I like.

  • iClever BK10 – keyboard
  • Logitech M590 – mouse
  • MOCUTE 053 Gamepad
  • Lenovo LP40 Pro – earphone

Migrating phone

I never know that migrating from one phone to another phone also spends a lot of time. One for the issue is transferring the photos. Previously I don’t need to transfer the photos.

One thing to note, WeChat, LINE, and WhatsApp only allow single device login. Transferring data from old phone to new phone on WeChat and LINE are simple. Do not logout on the old phone, generate QR code, sign -in in new phone, scan QR code, then wait for transferring.

But WhatsApp is troublesome. I keep doing login and logout to test the transferring, then it blocks sending SMS verification code, and I have to wait for 12 hours. The only solution is to backup to Google Drive, and it is slow. Slow like never ending, but it will end. Just leave your phone there and wait for the backup. After finish backup, login the new phone to restore from backup from Google Drive.

In fact, the worst case is you lost all the previous messages from these messaging apps if transferring data does not work, yet you are still able to use the same account.

Transferring files

Next problem I faced was the file transfer. I found that copying from laptop to the phone using USB (type-C) is slow. Furthermore, the file timestamp will be changed, which is bad. This is because viewing photos usually order by date. With the timestamp changed, the Album app will show your old photos as the latest photos.

I tried several alternative solutions. WiFi FTP server is not a good solution, as it doesn’t allow filename with whitespace. I also tried KDE Connect, but it cannot copy-paste easily. I didn’t try Bluetooth, as I don’t think it is fast enough to transfer files. Finally I found SimpleSSHD. That’s the best method I found as the date issue being solved.

Finally, I spent two days to complete migrating the phone.

Software engineer’s soft skills

As a software engineer, he/she needs to have the hard skills especially writing source code, debugging. He/she needs to know multiple programming languages (eg C, C++, C#, JavaScript, Python, etc). It will be even better if he/she can write tests, adopt TDD, write clean code, do refactoring, know how to implement various algorithms (search algorithm, sort algorithm, dynamic programming, etc), review code. These are all hard skills.

However, in order to perform well in the working environment, software developers are recommended to adopt several soft skills. These skills will help the team to improve the productivity.

Work estimations – Engineer needs to know how to do the estimations of the given tasks, so that the project manager can do estimation on when the features can be delivered or released. Based on the estimations, the project manager will decide the priority of the tasks.

Task break down – Engineer needs to know how to break down the tasks. A feature maybe too complex. Eg, a user story may say that, “As a user, I want to purchase a product online.” Though it is one sentence story, it can be break down into various sub-tasks, such as payment, user interface, validation, etc. It is necessary to know how to break down the tasks, then only can do better work estimations.

Foresee the issues – Sometimes the project manager or the client may want some feature. The engineer needs to think further in the technical perspective, because other users (project manager, end user, graphic designer) may not understand the possible issue. Once the engineer for see the issue, engineer should raise the issue, so that project manager can decide what to do next. By keeping silence, it will bring the feature to dead end at the end, and wasting the time and money.

Communication – Always communicate with the project manager, or other team member. Anything unclear, just ask, since this is the responsibility of the engineer. Without asking, nobody knows you don’t know. Sometimes it is the specifications not clear, because the project manager may not know as well. This will require more discussions.

Self-learning – Though communication is important, the engineer should know how to learn new things by him/herself. Technology is evolving, new technology is emerging everyday. Sometimes engineer will be assigned with task that involves to explore or experiment new technology, as a result, engineer needs to learn it.

Migrate to SSD

In my previous post, I mentioned I have boot issue. Then I asked in Arch Linux BBS, and I got some useful advice from other users. As a result, I contacted a computer shop in my town, in order to get a hard drive (HDD). However, the shop doesn’t have 7200 rpm HDD. Then he suggested SSD to me, which is 1T storage. The SSD now is much cheaper comparing to two years ago.

I remembered that SSD, requires some special configuration, due to “limited write-life” [1]. Spending around one week time, I searched for the recommended tweaks and modified the setup in order to cope my working environment.

The following is the summary of my SSD configurations:

  1. The partitions should be mounted with noatime option.
  2. When creating partition, should be aligned properly, which fdisk should handle it automatically. [2]
  3. Enable fstrim
  4. Do not use swap partition, as fstrim does not work on swap partition [3][4]. Though, “swap system has automatically supported TRIM capable devices” [5]
  5. 8G RAM is not enough for my working environment. I created swap file instead of swap partition
  6. Set swappiness [6]
  7. If 8G RAM is enough, then can use zram (using zram-generator).

[1] Dell, “Hard Drive – Why Do Solid State Devices (SSD) Wear Out,” Dell.com, Sep. 28, 2021. https://www.dell.com/support/kbdoc/en-my/000137999/hard-drive-why-do-solid-state-devices-ssd-wear-out. (accessed Apr. 14, 2022).

[2] “Should I align partitions on an SSD, if so how do I do it at install time?,” Ask Ubuntu, Dec. 26, 2010. https://askubuntu.com/questions/18900/should-i-align-partitions-on-an-ssd-if-so-how-do-i-do-it-at-install-time#18951 (accessed Apr. 16, 2022).

[3] “fstrim does not trim swap,” Unix & Linux Stack Exchange, Dec. 12, 2019. https://unix.stackexchange.com/questions/556805/fstrim-does-not-trim-swap#558223 (accessed Apr. 16, 2022).

[4] “why not use Swap file on SSDs instead of Swap partition?,” Ask Ubuntu, Nov. 11, 2016. https://askubuntu.com/questions/848230/why-not-use-swap-file-on-ssds-instead-of-swap-partition?noredirect=1&lq=1#1290562 (accessed Apr. 16, 2022).

[5] “SwapFaq – Community Help Wiki,” Ubuntu.com, 2022. https://help.ubuntu.com/community/SwapFaq (accessed Apr. 16, 2022).

[6] Why, “Why are swap partitions discouraged on SSD drives, are they harmful?,” Ask Ubuntu, Jul. 24, 2015. https://askubuntu.com/questions/652337/why-are-swap-partitions-discouraged-on-ssd-drives-are-they-harmful#964933 (accessed Apr. 16, 2022).


Not able to boot

Recently, I failed to boot into my laptop. I was shocked.

home contains a file system with errors, check forced.
home: Inode 12976129 seems to contain garbage.
home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
        (i.e., without -a or -p options)
fsck failed with exit status 4.

Then not able to mount the home partition, I was prompted to login as root. However, I was too nervous, I forgot what is my root password.

Luckily, I always have an Arch Linux LiveUSB, though it was 2020 release. I boot into it. Then the screen is tearing, due to the graphic card issue (NVidia). I tried to remember how I did the installation previously. At the end, it involves BIOS to change the graphic card to non Discrete Graphic Card. Boot again, yes, success boot into LiveUSB.

The next thing is, I immediately run fsck to check the partition again. And auto fix all prompts.

During the fix, fsck shows me such frightening screen.

Luckily there is no read error caused by bad sector.

After finish running fsck, I reboot and no more issue to boot into Linux.

Backup! Backup! And always do backup! And I should remember my root password!

Godot Mono and tests

In my previous post, I mentioned about using C# for Godot Mono. However, recently I found that, due to MonoDevelop is inactive, it causes my personal project not able to be built. As a result, I have to change the build tool to dotnet CLI. This can be set through

Godot (Mono) > Editor > Editor Settings > Mono > Builds > Build Tool

Besides that, I also changed the External Editor from MonoDevelop to Visual Studio Code. Visual Studio Code is nice for the C# project. It has autocompletion and able to find function definition and function references.

Previously, because I was using MonoDevelop, the Nuget packages (similar to npm packages) is managed by MonoDevelop, which I can add new packages through GUI. But now, I migrate the project to dotnet CLI, there is no more GUI. Luckily, dotnet allows to add Nuget packages to my existing project. For example,

dotnet add package MathNet.Spatial
dotnet add package MathNet.Numerics
dotnet add package NewtonSoft.Json

This will update the .csproj file. NOTE: This csproj file can be generated by adding a C# script through Godot Mono.

Tests

The advantages of using C# comparing to GD script (Godot script) are

  1. inheritance
  2. lambda syntax
  3. tests!

I was using FluentAssertions and Machine.Specifications previously on MonoDevelop, by creating a library project (.dll). Then run the command for the tests. However, after migrating to dotnet, I failed to run the tests. I tried several solutions.

Dotnet official websites mentioned about xUnit and NUnit. I tried both, but I failed to make both work. I failed to run the tests with dotnet test.

At the end, I use back FluentAssertions and Machine.Specifications.

Firstly, add the two packages to the existing project, not as a separate project.

dotnet add package FluentAssertions
dotnet add package Machine.Specifications
dotnet add package Machine.Specifications.Runner.Console

The Machine.Specifications.Runner.Console is important. I found that both xUnit and NUnit have runner console packages as well. Probably I can run the tests without dotnet test for both solutions.

After adding the packages, then I run a script to invoke the tests.

#!/bin/sh

PROJECT_NAME=MyProject
export MONO_PATH=./.mono/assemblies/Debug
CMD="mono $HOME/.nuget/packages/machine.specifications.runner.console/1.0.0/tools/mspec.exe"
TARGET=".mono/temp/bin/Debug/${PROJECT_NAME}.dll"

if (( "$#" > 0 )) ; then
    $CMD $TARGET -i "$@"
else
    $CMD $TARGET
fi

Export MONO_PATH because it contains GodotSharp.dll and GodotSharpEditor.dll. GodotSharp.dll is necessary as our C# source code inherits the classes from Godot.

The shell script above will invoke mono mspec.exe, where mspec.exe locates at .nuget in our home directory (I am using Linux). mspec.exe is installed when adding the project Machine.Specifications.Runner.Console.

Finally, the script will run mspec.exe to test the MyProject.dll assembly. MyProject.dll is built through Godot Mono. Godot Mono will create the assembly file .dll based on our project name.

Yay! It works.

One drawback is that, I cannot separate the tests code fro the project. The ideal solution is to have MyProject.dll and MyProjectTest.dll. Our test code should be compiled and build the MyProjectTest.dll, and it depends on GodotSharp.dll and MyProject.dll. However, it is very troublesome, because Godot Mono is not able to add project like MonoDevelop. So, the fastest solution I have is to have the tests be compiled into one .dll.

Dell Vostro 5459 revive

I was using Dell Vostro 5459 previously. However, it has some hardware deficiencies. The battery capacity keeps dropping drastically within a year. That’s a very bad experience. Now, the fully charged battery is only 1% of the designed capacity. Then I purchased an external power bank from Dell. But that’s not an ideal design for a laptop that you need to bring extra gadget to everywhere, and charging external battery is too troublesome.

Since I mostly work from home, battery issue is still bearable. Then about 4 years of usage, the keyboard became weird. It will randomly fire some keys (I forgot which key) (related post). That’s truly unbearable because it affects my working experience. At the end I bought a new laptop, Lenovo Legion Y7000.

But recently, I have done some online shopping and I bought some useful tools, including (i) laptop opener pry tools, and (ii) compressed air. Both are super useful for DIY hardware cleaning. I use opener pry tools instead of screwdriver to avoid physical damage of the hardware cover. Moreover, taking out Dell Vostro 5459 keyboard becomes much easier. For compressed air, it allows me to clean out the dirt from laptop without disassembling the laptop. Disassembling the laptop for cleaning is too difficult for a noob like me.

Finally, I bought a Dell Vostro 5459 compatible keyboard replacement through online shopping. That’s wonderful thing, since the laptop keyboard is not purchasable from Dell official website. I replaced the keyboard with the pry tools I bought earlier, then clean the fans with compressed air. I haven’t spent time to verify whether the keyboard issue is totally solved, though I think it is solved.

Great online shopping!

Reviving Samsung Galaxy Tab 10.1 part 2

In my previous post, I mentioned about reviving old Samsung Galaxy Tab 10.1. Today continue some extra customization works.

Firstly, the problem of the headphone mode emerges again. I tried to clean with cotton, but it doesn’t help. At the end, I found a page recommends an app (Disable Headphone(Enable Speaker)). I tried to install the app, and it works. It really works. That solves the most critical problem of my tab.

Other than that, I have installed several useful apps. They are

(from F-Droid)

(not from F-Droid)

Therefore, the tab basically is functional enough: file operations, view image, watch video from internal storage, and surf net. And there is one more thing remain: gaming!

RetroArch

I tried to install RetroArch. The best to work on my tablet is the F-Droid version.

The modern games, especially mobile games, in my opinion, they are just wasting our time (converting our time to their money through ads). The use erotic drawings (yet not offending the terms and conditions), in-app purchase, and they usually require us to watch ads in order to recharge playing point (usually called “energy” in the game). These “free” apps is free without us to pay the money, but we are being used to earn the money without knowing it.

Instead of spending 30 seconds to watch an ad, it will be better we use the 30 seconds to implement “Kaizen”.

Back to RetroArch, the old school games are designed to play! The game design focuses on the gameplay, in order to achieve the sales. Modern game design (especially mobile games) focuses on earning money, in order to make the project sustain. To earn money, it requires to attract more users. As a result, erotic design of heroine is most attractive (in my opinion).

Back to RetroArch again, it contains various emulators. My favourites are GBA, NES, and SNES. Since I am born in 80s, NES games accompanied my childhood most. Though I played SNES games as well, that’s only when I was teenager and played through emulator as well.

After installed RetroArch, there is a zip extraction issue happened. I don’t know what is the exact solution, but I created temp folder in .retroarch. (this results .retroarch/temp to be created). Note that, there is another folder, RetroArch/temp exists. Then the zip extraction issue is solved.

I have tried RetroArch with some games. But tablet or mobile, the touch screen is worst for playing games. I have ordered a gamepad with bluetooth support, it is way to come. Will try on RetroArch with the gamepad. Hopefully this old tab will be a retro gaming “station”. 😊