阅读视图

发现新文章,点击刷新页面。

Do not play 100% Orange Juice on Linux

TL;DR: The Developers in charge of Steam Cloud Save File Sync for 100% Orange Juice don’t know how to handle it. They may mess up your save files, and you may be unaware of it until the loss is done.

Notice: This advice may become obsolete in the future.

Notice 2: English isn’t my native tongue.

Developers are stubborn.


I will use 100oj as 100% Orange Juice for short.

100oj is a beloved game. I declare it as the best online board game ever, with no hesitation.

The Beginning of Playing 100oj on Linux

The very original 100oj is surely made for Windows.

The earliest Steam page capture from web.archive.original

screenshot_on_b85m_by_flameshot_at_2024-12-13_17-40-21

Meanwhile, Valve is making Steam OS, and then, Steam Deck. Proton made Playing Windows Games on Linux become a real thing. (Nah, I don’t want to talk about wine. No one would really want to use those for real generic gaming).

So basically, Proton is a fork of Wine, and this software can run Windows games on Linux, and players don’t need to worry about most of the How to run Windows games on Linux things.

It is also very convenient for most game Developers. Proton just works. No need to change anything, unless you use some very unrecommended/unofficial/deprecated/obsoleted Windows API, which may happen in very old days.

100oj v3.3 on Linux Mint.

screenshot_by_flameshot_at_20210119135409

Sora on Linux Mint.

screenshot_by_flameshot_at_20210117104610

Funny thing is, the OP animation is in WMV format (Windows Media Video), which was made by Microsoft and was not kind of an open/free format. So if you play Sora on Linux with Proton, the game will crash if you stay at the start screen long enough, and try to wait for the OP animation to play.

screenshot_on_b85m_by_flameshot_at_2024-12-14_17-57-13

Funnier thing is, the OP animation WMV file is actually

  • Container: WebM
  • Video Coding: VP9
  • Audio Coding: Opus

All of them are open and royalty-free.

screenshot_on_b85m_by_flameshot_at_2024-12-13_18-24-57

Well, let’s not talk about Sora right now.


The Official announcement: Support for 100oj on Linux?

I don’t remember when it was exactly.

The wiki says it was Sep 20th, 2024, v3.23 Versioned Hotfix 1, but the official Discord announcement is Oct 6th, 2024.

screenshot_on_b85m_by_flameshot_at_2024-12-13_18-42-57

screenshot_on_b85m_by_flameshot_at_2024-12-13_18-39-08

screenshot_on_b85m_by_flameshot_at_2024-12-13_18-37-55

100oj now officially has a Linux native build.

This is where/when/how a nightmare begins.


The first time when an inexperienced programmer gives a name without knowing case-sensitive

Here it is. You can read the paragraph heading, and if you know Linux, you already know what I am talking about.

On Oct 7th, 2024, while I was checking on the Linux side, I found my save file on the Linux side is kinda outdated compared to the save on the Windows side, despite Steam already saying Cloud Status is Up to date. Also, the Free Weekly Character is different from the Windows side.

Turned out there were two directories.

screenshot_on_b85m_by_flameshot_at_2024-10-07_15-55-32

I posted this on the official Discord Support Channel.

screenshot_on_b85m_by_flameshot_at_2024-12-13_22-29-34

After that, a developer from 100oj Official replied:

screenshot_on_b85m_by_flameshot_at_2024-12-13_22-21-26

So basically, the old Steam-Play, aka the Proton one worked fine, but when the Linux native build came out, they messed up the path because of case-sensitive.

That’s kinda acceptable for a developer who doesn’t have much experience on Linux.

Well, the easiest way to fix my problem is, because I play 100oj on Windows most, I just wanted to keep the Windows savefile, so just delete both Save and save on my Linux side, and let Steam re-sync from the steam-cloud. That worked well.

I thought this case-sensitive crisis was over.


Major update 3.24

Well the most recent major update of 100oj is 3.24, released on Nov 24th, 2024.

Talking from my point of view, it was a terribly stupid idea to accomplish all these at one time.

  • Adding new play mode
  • Graphics engine changing
  • New Platform MacOS support
  • Dropping support for 32bit

I mean, what are they? Fresh inexperienced just-graduated noob programmers? What are they thinking?

100oj game crashed, a lot, after that release. The Discord support channel became a total mess.

Look at the Version 3.24 release note on orangejuice.wiki. There are one versioned hotfix and 4 unversioned hotfixes, lasting for 16 days. You should know it was a mess.


Linux Steam Overlay Issue

I mean, look at this one:

screenshot_on_b85m_by_flameshot_at_2024-12-13_22-58-08

This was reported by me, and what’s the first reply I received?

screenshot_on_b85m_by_flameshot_at_2024-12-13_23-01-01

“You are not doing that right that’s your fault lmao bronze you noob gamer trash.”

Well funny thing: the 100oj start-entry is a shell script. It looked like this:

screenshot_on_b85m_by_flameshot_at_2024-11-27_20-59-32-2

To no programmers, I will explain it: The script wants to load a file, and it should be at ‘/home/rapha/.steam/debian-installation/ubuntu12_64/gameoverlayrenderer.so’. The path is formed with:

  • Prefix ‘/home/’
  • User name ‘rapha’
  • Steam installation directory ‘/.steam’
  • Steam file ‘/debian-installation/ubuntu12_64/gameoverlayrenderer.so’

There are two problems.

The first one: Who is rapha? It’s not me, obviously.

The second one: in the Steam installation directory ‘/.steam’, the file ‘ameoverlayrenderer.so’ is actually located at ‘/ubuntu12_64/gameoverlayrenderer.so’, thus there is no such a prefix ‘/debian-installation/’.

After some tests, I figured out there were some useful variables when starting something from steam client.

https://www.bilibili.com/video/BV1R6BRYmEoD/

Both STEAM_BASE_FOLDER and STEAM_COMPAT_CLIENT_INSTALL_PATH are reliable. I also searched on Google but didn’t find any official valve/steam document about how to locate where the steam client is installed.

I recommended “$HOME/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so” and “${STEAM_COMPAT_CLIENT_INSTALL_PATH}/ubuntu12_64/gameoverlayrenderer.so”, but got refused.

screenshot_on_b85m_by_flameshot_at_2024-12-14_00-01-24

Well of course he didn’t know what a symbolic link is.

During the discussion, a new unversioned hotfix was released:

  • Fixed Steam Overlay not working on Linux.

screenshot_on_b85m_by_flameshot_at_2024-12-14_00-04-30

Fixing by this:

screenshot_on_b85m_by_flameshot_at_2024-11-27_20-59-32-1

So they removed the ‘/home/rapha/’ part but still kept the ‘/debian-installation/’ there. I don’t know why.

screenshot_on_b85m_by_flameshot_at_2024-12-14_00-03-37

I asked. No response.

Thankfully, some Linux users are aware of that and they know how to search and read.

screenshot_on_b85m_by_flameshot_at_2024-12-14_00-04-04

Turns out there is no need to  load the steam overly library manually when start from Steam.

Well, at least I helped someone.

Note: Right now they have fixed it stealthily, with no release notes. The entry script is just like this:

screenshot_on_b85m_by_flameshot_at_2024-12-14_00-27-59

 

Well. No credit to me.


The save path issue continues

Now they supported MacOS.

New platform, new steam cloud sync issues.

They even made a post on How to deal with save problems.

screenshot_on_b85m_by_flameshot_at_2024-12-14_00-15-16

But there isn’t any of the cross-platform savefile case-sensitivity issue information. I had to ask for adding that part.

screenshot_on_b85m_by_flameshot_at_2024-12-14_00-17-31


Mess up steam cloud sync again

I think it’s about Unversioned Hotfix 4 when they tried to fix the macOS saves sync issue.

After that update, my Linux 100oj couldn’t sync saves anymore.

screenshot_on_b85m_by_flameshot_at_2024-12-10_01-13-03

I tried the old way, removing all save files on Linux, expecting that steam client could just download the saves from steam cloud.

screenshot_on_b85m_by_flameshot_at_2024-12-14_00-29-54

Nope, that was not happening.

After a lot of trying and testing, I figured out what is happening.

screenshot_on_b85m_by_flameshot_at_2024-12-11_23-29-04

On Linux, 100oj is using both Save and save at the same time. When there are no save files:

  1. Try to convert old format saves user.dat into the new format at save/{userid}/, which the file should be very old before steam family sharing
  2. Uploading save files at Save/{userid}/
  3. If anything is missing when uploading, steam will call Unable to sync / Cloud Conflict
  4. Stuck.

screenshot_on_b85m_by_flameshot_at_2024-12-14_00-53-13

And here is the official response.

screenshot_on_b85m_by_flameshot_at_2024-12-14_00-48-47

See, that’s why I didn’t even bother explaining it.

screenshot_on_b85m_by_flameshot_at_2024-12-14_00-50-43

And you thought at least they managed to make macOS work? Too bad. Look at this screenshot of a macOS user’s Steam Cloud Storage, and see what a mess they had made.

screenshot_on_b85m_by_flameshot_at_2024-12-14_00-53-24

screenshot_1316429008703062187


Conclusion?

Well for now, they could still change anything stealthily with no release note. May become better, or become worse. I don’t know.

I even talked about this to the guy who was taking charge of 100oj Chinese localization.

screenshot_on_b85m_by_flameshot_at_2024-12-13_22-32-42

Developers are stubborn.

Well I don’t want to care about it anymore. I get no paid nor credit.

The post Do not play 100% Orange Juice on Linux first appeared on 石樱灯笼博客.

Devonthink 出品的免费软件

DEVONtechnologies 是一个 macOS 软件公司,其最知名的产品 Devonthink,用于文件和信息管理。

每次逛 Devonthink 的社区 —— DEVONtechnologies Community,都能给我不小的惊喜。前段时间发现 DEVONtechnologies 原来还发布了很多功能强大的免费软件/插件:

WordService,针对选择文本的小工具,比如转成繁体中文、格式化文本等。

CalcService,是一款公式计算插件,在文本界面都可以使用。

EasyFind,用于替代 Spotlight 的文件检索软件,适合更高级的精确文件搜索需求。相似的软件还有 GoToFileFoxTrot Search

Neo Network Utility,网络工具,用于获取网络适配器信息并诊断常见的网络问题。

PhotoStickies,将喜欢的图片直接展示在桌面上。桌面相册(photoalbum)也有相似地功能,样式稍微好看一些。

ThumbsUp,设置好参数后,将图像拖拽到该软件的图标上,即可调整图片分辨率和大小。

XMenu,在菜单栏添加程序、文件、文档、文本的快速访问窗口。

DEVONagent Lite,网页检索工具,可以提前配置一些搜索习惯。完整付费版为:DEVONagent Express 和 DEVONagent Pro。

成也流量,败也流量。

检索的时候,在关键词后加 “Reddit”,总能搜到一些有趣的讨论帖。

过去知乎、小红书也能起到这个功能,但随着它们商业化价值变高,越来越多功利性比较强的信息进入,如广告和 AI 生成的文字,内容的真实性变的越来越难判断。

论坛和社区的流量相对较小,其中的信息还显得有些人味,也往往更深入。

成也流量,败也流量,不知道小红书还能坚持多久。

Reddit 之外,其实还有很多偏好性强的小论坛,以下是我偶尔会逛逛的:

如想发掘更多论坛,可以试试这两个渠道:ListOfSubredditsDiscourse Discover

主动寻找,才能找到更符合自己兴趣和性格的内容。

4个步骤让 MacOS 13 以下版本支持 AVIF 格式预览

如果你使用的是 macOS Ventura(MacOS 13),系统已默认支持 AVIF 格式打开和预览。对于更旧的系统版本,需要通过安装第三方图片浏览软件或拖到浏览器中查看。

AVIF QuickLook 插件可以通过4个简单的步骤,实现在系统直接预览 AVIF 格式,该插件由国内一个作者 DreamPiggy 开发。

要求:

1、macOS 10.11+ (Big Sur+) 以上版本
2、M1/Intel Mac 都支持

步骤:

1、在 Github Release Page 下载最新的 AVIFQuickLook.qlgenerator
2、打开 访达.app (Finder);
3、通过快捷键 Shift + Command + G 打开“前往文件夹”窗口,输入 ~/Library/QuickLook/ 然后回车。 macOS Catalina 以上版本, 使用 /Library/QuickLook/
4、把下载的 AVIFQuickLook.qlgenerator 复制到该文件夹内,可能需要输入电脑密码确认。

如果你已经安装了 Homebrew,只需要一行命令即可。

brew install avifquicklook

安装完,系统就支持直接预览 AVIF 格式了。

利用 Mac 快速操作实现图片批量转换为 AVIF 格式

继上一文介绍了我“利用 Mac 快速操作实现图片批量转换为 WebP 格式”捣腾成功后,希望通过同样的方法实现利用 Mac 快速操作实现图片批量转换为 AVIF 格式,捣腾结果分享如下。

为什么使用 AVIF 格式?

AVIF 是一种基于AV1 视频格式的现代图片格式,实现卓越的压缩效率,同时保持高图像质量。AVIF 通常比WebP、JPEG、PNG 和 GIF 具有更好的压缩效果,并且旨在取代它们。AVIF 对宽色域、高动态范围 (HDR) 和渐进式渲染的支持增强了视觉体验,预示着图像细节精美且高效交付的未来。号称 Web 开发人员和摄影师的首选。据统计,AVIF 全球使用情况为 92.95%,除 IE 浏览器、Opera Mini、QQ 浏览器、KaiOS 浏览器外都已支持,WordPress 6.5+ 已支持 AVIF 格式

利用 Mac 快速操作实现图片批量转换为 AVIF 格式-雅余

通过 AVIF 格式其开发组织“开放媒体联盟”(AOMedia),顺藤摸瓜在其 Github 账号上找到了 libavif 这个用于编码和解码 AVIF 格式的库和使用文档。

我的操作步骤如下:

一、安装 Homebrew

这部分就不重复介绍了,见“利用 Mac 快速操作实现图片批量转换为 WebP 格式”一文。

二、使用 Homebrew 命令安装 libavif 包

在终端中运行一下命令:

brew install libavif

回车直至安装完成。注意是否有出错或文件无授权的提示,按需对文件夹进行可操作授权。注意 libavif 包的安装路径,后面需要用到。

三、添加 Mac 快速操作 Workflow

1、在 Mac 上打开“自动操作”,选取“快速操作”; 利用 Mac 快速操作实现图片批量转换为 AVIF 格式-雅余

2、在工作流的顶部,它显示“工作流程收到当前”,选择“图像文件”,然后在“位于”下选择“访达.app”;

利用 Mac 快速操作实现图片批量转换为 AVIF 格式-雅余

3、接下来,在“自动操作”的左侧面板,在“资源库”下选择“实用工具”,然后将“运行 Shell 脚本”,拖放到右侧工作流程面板中;

4、对于“运行 Shell 脚本”,“Shell”选择“/bin/zsh”,“传递输入”选择“作为自变量”。

把以下代码片段粘贴到下面文本框中:

for f in "$@"
do
fname="${f%.*}.avif"
/usr/local/Cellar/libavif/1.1.1/bin/avifenc -s 10 -q 85 "$f" "${f%.*}.avif"
done

然后在“文件”菜单选择“储存”,保存文件名为“转换为 AVIF”,保存到默认地址即可。

注意:
1)libavif 的路径是为通过 Homebrew 安装的 libavif 设置的,如果您手动安装了 libavif,那么它可能在 /usr/bin 中,您需要相应地调整路径(我的最终路径是 /usr/local/Cellar/libavif/1.1.1/bin/avifenc );

2)-q 质量标志当前设置为 85,默认为 60,但您可以将其设置为 1-100 之间的任何值(越高将产生更高质量的图像,但压缩较少);-s 代表速度,默认为6;默认不删除照片 exif 信息,需删除则加上 --ignore-exif 参数。

5、选择你需要转换格式的图片,可多选,右键菜单的“快速操作”中选择“转换为 AVIF”选项,图片将在当前文件夹中自动生成 AVIF 格式文件。

利用 Mac 快速操作实现图片批量转换为 AVIF 格式-雅余

至此,教程结束。

下图为 WebP 和 AVIF 格式压缩率都设置为 85 所得到的压缩结果,结果是 WebP 的文件更小一些,有点困惑。不知道是不是我设置的压缩率太高了,libavif 官方默认值是 60。本文方法大致如上,至于多少压缩率更好,大家自己摸索吧。

利用 Mac 快速操作实现图片批量转换为 AVIF 格式-雅余

另外,我通过 AVIFQuickLook 插件,已经实现了在老苹果中直接预览 AVIF 格式。使用 Brew 进行安装,命令如下:

brew install avifquicklook

如有误,或有更好的方案,欢迎指正和交流。

利用 Mac 快速操作实现图片批量转换为 WebP 格式

周末进行网站整站备份的时候发现,整站压缩后的压缩包大小为 1G 多,有点难接受。原因是网站图片较多,主要是 JPG 格式照片,占用较多空间。网站流量不大,服务器流量压力方面倒是不担心,但是会对未来网站可能出现的整体迁移、备份造成了压力。虽然去年改版已经对 WordPress 缩略图生成做了限制,只生成必须的三个尺寸,但网站体积还是在快速的增长。

为此,我打算整站改用 WebP 格式图片,在本地处理好图片之后再进行上传。因为使用 WordPress 的插件普遍会保留原文件,另外再生成一批 WebP 格式的文件,反而增加了存储空间。至于 WordPress 媒体库中历史的图片如何替换为 WebP 格式,另行研究。

为什么使用 WebP 格式?

WebP 是谷歌在 2010 年提出的一种新型的图片格式,其优势在于 WebP 格式的图片可以比 JPEG 格式的图片小 26%-34%比 PNG 格式的图片小 25%-34 %拥有更快的加载速度,可以保持比 JPEG 格式更好的图像质量,还支持透明度和动画效果。据统计,WebP 全球使用情况为 96.35%,除 IE 浏览器外都已支持。WordPress 5.8+ 增加了对 WebP 格式的全面支持

利用 Mac 快速操作实现图片批量转换为 WebP 格式-雅余

也有更新更先进的 AVIF 格式WordPress 6.5+ 支持 AVIF 格式),压缩率更高,但浏览器支持度目前略差一些,我的老苹果电脑无法直接预览,所以先忽略,以后再考虑。

Windows 下有不少免费的 WebP 格式批量转换工具,Mac 下比较少。转换 WebP 格式的在线应用也是有的,但上传下载太耗时。可喜的是,Mac 可以通过命令行工具,配合自动操作功能也可以实现批量转换。

我的操作步骤如下:

一、安装 Homebrew

前提条件,需要在运行 MacOS 至少为 10.14(Mojave) 或更高版本的 Mac 上安装 Homebrew。如果您尚未安装 Homebrew,请先安装。

什么是 HomeBrew?

HomeBrew 是一个免费且开源的包管理器,它简化了 MacOS 用户安装软件的过程。无论是命令行工具、语言运行时还是应用程序,HomeBrew 都能帮助你轻松管理。它的口号是“The missing package manager for macOS”,意即它弥补了 MacOS 缺失的包管理功能。

安装 HomeBrew 非常简单,执行一行脚本即可。为了提升安装速度,建议更改 Homebrew 的安装源,将其替换成国内镜像

方法1、Homebrew 官方脚本:(速度欠佳,会出现超时)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

方法2、中科大镜像 Homebrew 镜像服务脚本:

/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"

注:最后出现 Installation successful! 或者 Checking out files: 100% (5392/5392), done. 说明安装成功。

必须配置:

更改安装源,替换为国内镜像:

1)替换 brew.git:

git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git

2)替换 homebrew-core.git:

git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

方法3、 Gitee 国内镜像服务脚本:(推荐!!)

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

安装过程中按 brew 官方脚本执行,提示安装成功后会让选择国内哪个镜像源:
1)中科大国内源
2)清华大学国内源
3)上海交通大学国内源
4)腾讯国内源
5)阿里巴巴国内源(推荐)

提示配置成功,但还需要重启终端 或者 运行命令 source /Users/用户名/.bash_profile,否则国内地址无法生效。

二、使用 Homebrew 命令安装 WebP 包

在终端中运行一下命令:

brew install webp

回车直至安装完成。注意是否有出错或文件无授权的提示,按需对文件夹进行可操作授权。注意 WebP 包的安装路径,后面需要用到。

三、添加 Mac 快速操作 Workflow

1、在 Mac 上打开“自动操作”,选取“快速操作”; 利用 Mac 快速操作实现图片批量转换为 WebP 格式-雅余

2、在工作流的顶部,它显示“工作流程收到当前”,选择“图像文件”,然后在“位于”下选择“访达.app”;

利用 Mac 快速操作实现图片批量转换为 WebP 格式-雅余

3、接下来,在“自动操作”的左侧面板,在“资源库”下选择“实用工具”,然后将“运行 Shell 脚本”,拖放到右侧工作流程面板中;

4、对于“运行 Shell 脚本”,“Shell”选择“/bin/zsh”,“传递输入”选择“作为自变量”。

把以下代码片段粘贴到下面文本框中:

for f in "$@"
do
fname="${f%.*}.avif"
/usr/local/Cellar/webp/1.4.0/bin/cwebp -q 85 -m 6 -metadata all -mt "$f" -o "${f%.*}.avif"
done

然后在“文件”菜单选择“储存”,保存文件名为“转换为 WebP”,保存到默认地址即可。

注意:
1)cwebp 的路径是为通过 Homebrew 安装的 cwebp 设置的,如果您手动安装了 cwebp,那么它可能在 /usr/bin 中,您需要相应地调整路径(我选择方法3的脚本,最终路径是 /opt/homebrew/Cellar/webp/1.4.0/bin );

2)-q 质量标志当前设置为 85,但您可以将其设置为 1-100 之间的任何值(越高将产生更高质量的图像,但压缩较少);-metadata all 为保留所有图片信息,可选值还有 all, none, exif, icc, xmp。

5、选择你需要转换格式的图片,可多选,右键菜单的“快速操作”中选择“转换为 WebP”选项,图片将在当前文件夹中自动生成 WebP 格式文件。

利用 Mac 快速操作实现图片批量转换为 WebP 格式-雅余

至此,教程结束,可以看看我上一篇文章中图片的转换效果,压缩后图片体积减少了 2-3 倍,效果喜人。本文所有图片均使用 WebP 格式。

利用 Mac 快速操作实现图片批量转换为 WebP 格式-雅余

如有误,或有更好的方案,欢迎指正和交流。

如何彻底删除 Chrome 来提速 Mac

本篇文章为译文,翻译自:Chrome is Bad,做了一些简单的改编,提取了一些有效信息。 原因 有时候打开「活动监视器」,会发现 Mac Window Server(系统进程)中有大量异常的 CPU 使用率情况存在。究其原因,是因为 Google Chrome 会在 Mac 上安装了一个名为 Keystone 的更新程序,即使Chrome 没有运行,它也会让整个 Mac 运行缓慢。删除 Chrome 和 Keystone 可以解决这个问题。了解很多详情看:Deleted Chrome & Keyston
❌