Trying to Develop a Small Game Using Godot on Linux

While browsing news, I saw that Blender Studio released a free game called Dogwalk on Steam. I tried it out briefly, running around the map with a dog on a leash, but I didn't understand it and didn't have the patience to finish it.

The combination of Blender and Godot left an impression, so I wondered why not try making a small game with Godot? And learn about various game development concepts along the way.

This article documents my experience using Godot on Arch Linux, developing a 2D game according to the official examples, and attempting to publish it to WeChat Mini Games (which failed; the reasons will be explained later).

1. Installing the Godot Game Engine

Godot is a multi-functional, cross-platform 2D and 3D open-source game engine with over 105k stars on GitHub. There are also many engines suitable for mini-game development in China, such as Cocos, LayaAir, and Egret, but most of them don't provide Linux versions or are poorly maintained. This is common practice for many software programs in China, and we're used to it.

The advantage is that some of them can be directly exported as WeChat Mini Games for publication. I prefer Linux and Python, so I chose Godot, just for fun.

1sudo pacman -S godot

To install other versions, you can download them directly from the official website. After extraction, it's an executable program; just run it.

2. Developing 2D Games

The official documentation has tutorials for both 2D and 3D games. Having no prior game development experience, I opted for 2D and successfully completed the tutorial.

Recommendations:

  • Ideally, use dual screens. One screen for documentation, and the other for engine development. This avoids the hassle of dragging and switching back and forth, which is tiring with a single screen.

  • Open both Chinese and English documentation simultaneously. Game development uses specific terminology; comparing them makes understanding easier and helps avoid pitfalls.

  • Be patient. Documentation is never perfect. For beginners, some scripts don't specify which script file was modified. You need to use the context to determine which file was modified (mainly GDScript). Alternatively, you can download dodge_the_creeps_2d_assets.zip and follow the source code.

Use Git version control. This is self-explanatory.

Beginners will need at least a few hours to complete. After following the tutorial, it will look like the image below:

dodge_the_creeps_2d

Numbers 1 and 2 are the game interface, showing the player and enemies respectively. The player moves using the arrow keys. Enemies appear randomly from four directions on the screen; contact ends the game with a death note.

Number 3 is the scene. In Godot, the game is broken down into reusable scenes. A scene can be a character, a weapon, a menu item in the user interface, a house, an entire level, or anything you can imagine. These scenes form a scene tree, accessed through the main scene. Scenes are bound to GDScript. Like a director making a movie, various elements combine to form a film.

Item 4 is similar to a computer's file system, or resource management tree; I won't explain it further.

Item 5 sets various common components for the scene, such as colors, fonts, circle radii, images, music bindings, signal connections, etc.

The meanings of the unlabelled parts are self-explanatory. Game engines need to simulate various real-world objects and logic, which is quite complex upon closer examination.

3. Exporting the Game

Godot supports exporting to multiple platforms, as shown in the image below:

godot_export

Exporting requires downloading additional templates; it will automatically select the fastest source for download. I'm too lazy to take screenshots.

On Linux, I tested exporting to a Linux binary executable and web export. The binary export ran normally; the web export result could be opened in a browser using sudo caddy file-server. This means you can put the game on your website and play it with a browser – isn't that just a browser game? 😅

Compared to the various cumbersome and frustrating steps of exporting to WeChat Mini Programs, it's undeniable that standard web export has fewer obstacles.

4. Attempting to Publish to WeChat Mini Games

Unlike the local giant Cocos, Godot cannot be directly exported to WeChat Mini Games. While Douyin Mini Games supports Godot, Douyin requires software licensing, and individual developers are restricted to certain use cases – the path is practically blocked!

Therefore, the following only discusses how to export to WeChat Mini Games:

This open-source project: https://github.com/yuchenyang1994/godot-love-wechat supports exporting Godot to WeChat Mini Programs.

I looked at the source code and it seems to be designed for Windows users by default 😮‍💨, but I tried it and it only took a few lines of code to make it run. Please see diff

 1(godot-love-wechat)   godot-love-wechat git:(main)  git diff 24058f6 2035a376
 2diff --git a/app/exporter.py b/app/exporter.py
 3index db3d503..4056bff 100644
 4--- a/app/exporter.py
 5+++ b/app/exporter.py
 6@@ -131,7 +131,8 @@ class Exporter:
 7         export_path = export_settings["export_path"]
 8         settings = self.storage.get("settings.json")
 9         if settings:
10-            wechat_execute = os.path.join(settings["wechat_execute"], "cli.bat")
11+            #wechat_execute = os.path.join(settings["wechat_execute"], "cli.bat")
12+            wechat_execute = settings["wechat_execute"]
13             result = subprocess.run([wechat_execute, "open", "--project", export_path])
14             print(result)
15
16diff --git a/app/stroge.py b/app/stroge.py
17index e90cf12..b1472ea 100644
18--- a/app/stroge.py
19+++ b/app/stroge.py
20@@ -1,9 +1,11 @@
21 import os
22 import json
23+from platformdirs import user_data_dir
24
25 class Storge:
26     def __init__(self) -> None:
27-        self.path = os.path.join(os.environ['LOCALAPPDATA'], 'godot-love-wechat')
28+        self.path = user_data_dir("godot-love-wechat")
29+        os.makedirs(self.path, exist_ok=True)
30
31     def save(self, file, data):
32         print(self.path)

This modifies the default data storage directory and the logic for launching WeChat Developer Tools. The author hardcoded these to only support Windows. It also involves installing some pywebview GUI packages. If you still don't understand, ask AI or contact me through the official WeChat account.

 1(godot-love-wechat)   godot-love-wechat git:(main)  cat pyproject.toml
 2[project]
 3name = "godot-love-wechat"
 4version = "0.1.0"
 5description = "Add your description here"
 6readme = "README.md"
 7requires-python = ">=3.12"
 8dependencies = [
 9    "boto3>=1.37.8",
10    "nicegui>=2.9.0",
11    "nuitka>=2.5.9",
12    "pillow>=11.0.0",
13    "pyinstaller>=6.11.1",
14    "pywebview>=5.3.2",
15]

Configuration data storage directory:

 1➜  ~ cd .local/share/godot-love-wechat/
 2➜  godot-love-wechat ls
 3projects.json  settings.json
 4➜  godot-love-wechat cat projects.json
 5[
 6  {
 7    "id": "e7d0f48436b2484a82d8c2ae514a2d35",
 8    "name": "dodge-the-creeps",
 9    "path": "/home/mephisto/github/dodge-the-creeps",
10    "version": "",
11    "description": "",
12    "icon": "/home/mephisto/github/dodge-the-creeps/icon.svg"
13  }
14]15➜  godot-love-wechat cat settings.json
16{
17  "godot_execute": "/bin/godot-4.4.1",
18  "wechat_execute": "/usr/bin/wechat-devtools",
19  "cdn_endpoint": "",
20  "cdn_access_key_id": "",
21  "cdn_secret_access_key": ""
22}23➜  godot-love-wechat pwd
24/home/mephisto/.local/share/godot-love-wechat

Are you like me, smugly thinking that everything will be fine once it's running? Wrong, more pain is yet to come.

Following the author's repository documentation and Bilibili videos, I spent several days of my free time tinkering, including downgrading the Godot version (4.5.1->4.4.1), Skyline, switching the base library in WeChat Developer Tools, and exporting the template for 4.5.1 adaptation (which involved compiling Godot from source code, resulting in a large repository and slow download speeds; the documentation was unclear on how to adapt it). The final result was as shown in the image below:

godot-minigame-shit

Clicking the area marked 1 (the game start button) makes the game run normally; I can hear the background music and the game ending sound after a collision, but the screen is black, and the iPhone preview doesn't work. The AI ​​says it's a WebGL rendering issue. As a beginner, I can only feel helpless, and the struggle ends here.

I suggest switching to a Windows system to export to WeChat Mini Games. I haven't used Windows for many years.

Lastmod: Friday, January 16, 2026

See Also:

Translations: