C1_StarBeats in EN

Le 六 28 二月 2026

那么,这就是第一篇,我打算以我已经完成的项目,和目前正在制作的项目作为主题。 So, this is the first blog.The main content would be the projects I have finished,and the projects I am writing now.

上一个项目『AKDW』,是我在大约初二的时候,在一堂英语课上想出来的玩意。当时我就打算将语音助手、杀毒软件等等一系列玩意和桌面宠物结合在一起,虽然就是大乱炖的样子,但是我当时毕竟不知天高地厚,寻思着应该很快就完成了。然后是的,我做了三年。从Unity到GameMaker到Pygame,再到LibGDX,可以说当时Python、C#、Java上的比较有名的引擎我基本都看过了。这个桌宠的形象来源于手机游戏《明日方舟》(虽然本文撰写时已经存在官方PC版了)中的凯尔希医生。而这个游戏运用了大名鼎鼎的"Spine"作为自己的动画支持。这也是导致我总共推翻重做了至少三次的原因之一。 last project "AKDW" was an idea came to me on an English class when I in Junior high school.At that time,I want combine vocal assistant,Antivirus software and so on with a desktop pet.It was just a mess.I thought I can finished it in several month,and then,I spent three years on it.From Unity to GameMaker to Pygame,then LibGDX,I have tried almost all the game engine on Python,C# and Java.The character of this desktop pet,Kal'tsit,is from mobile phone game Arknights.This game use the "Spine" for it animation,which make me remake this program at least three times.

对于不知道什么是Spine的人,这是一个骨骼动画软件,对各大语言常见引擎都有支持,它可以在只使用三个文件的情况下提供流畅且低消耗的动画,而如果不使用这种动画,那么就只能使用帧图,然后实时更新。这样会产生大量的磁盘读写,和重绘,而大家应该都知道这有多慢。并且Spine最坑的一点就是,软件导出的帧图比例并不是一样的。你需要预处理,预处理所需的时间虽然不多,但是很恼人。一开始,我就是这样在Pygame上硬着头皮完成了第一版的开发。作为参考,当时我使用了Pyganim作为我的动画库,是的Pygame的动画并不好用,或者根本不支持,我已经不记得了。Pyganim的大概操作就是读取一串帧图序列,然后作为一个动作,你只要渲染那个动作对象就可以了。但是读取的序列可能需要你手动构建那个序列,或者使用一个类似雪碧图,但是是规则排列的帧图表。这很麻烦。

For who don't know what is Spine,this is a skeleton animation software,it have supports for many engines(None of them can run in python).Most important is that it can provide smooth animation in low-cost with only three files.If you don't use this,you may need to use Frame-by-frame animation.This will cause a huge amount of disk read and write,and window redraw,which is very very slow.By the way, the frame image you export from spine,the proportion or different pose was differnt.You need to preprocessing to them,it won't take you too long,but it was very annoying.At first,I finish the first version on pygame in this way.As a reference,I use [Pyganim](https://inventwithpython.com/pyganim/) as my animation library.

后来虽然发布了,但是在几天内,我因为不满意,而且宣传视频有点标题党的意思,我便删除了那个视频,然后开始做第二版,也就是最后一版。当时我搜寻一番后,发现LibGDX是一个很好的选择,有Spine的官方支持,而且编写并不难,也多亏了Java读起来并不难懂。最后大约开发完本体的时候(也就是小人能动了,状态机也搞定了的时候),我看到了LibGDX官方的《如何在Python中使用LibGDX》,在查了一些资料之后,我就决定用Python开发。在官方的文章里,他们建议使用Jython,但是实际上那是Python2的玩意,现在谁还用Python2?所以我转向使用Jpype,虽然最后我付出了一些代价,也就是Jpype并不支持继承,所以无法使用ApplicationAdapter,这个类可以通过重写方法来获取点击和键盘事件,在Jpype中,只能通过实现ApplicationListener接口来进行开发,所以你必须自己实现,实际上你仍然可以运用像这样的方法来实现:

After that,I post it on the bilibili(This is a video platform in china).But I was not satisfied with it,so I deleted it,and start to make the second version,also the last version.After search on the internet,I found LibGDX.It has spine support,and it is easy(thanks to java doesn't very hard to read).When I finished the state machine and the character can moved.I found a tutorial,it said that I can use LibGDX in python.So after doing some research,I decide to use python to finish this.In that article,they suggest you use Jython,but it is python2.Nobody want to use python2,so I use Jpype.Jpype also have its' own problem, it can't extend java class,so you can't use ApplicationAdapter,which can get click and keyboard event by rewrite method.You have to implement by yourself.Like this:
if Gdx.input.isTouched() and Gdx.input.isButtonPressed(Input.Buttons.MIDDLE):
    ...

虽然并不方便,但是实际上确实可以这么做。总之,Jpype+LibGDX是可以的,并且实际上开发并不很麻烦。我这里不会赘述你应该怎么使用这个架构开发,我也许会单独写一篇。毕竟到这已经很长了。

Although it isn't very convenient,you can actrually do this.In one word,you can use Jpype+LibGDX to develop something,and it's not very troublesome to use.I can't write how to use this architecture to develop,I will write a new blog for this.

总之,我就是用这样的一个技术栈完成了开发。然后成功的得到了一个无人问津,但是是自己的第一个完成的项目。紧接着就进入了没事找事干的日子。比如上高中组社团之类的。当然,就在我退出社团前一小段时间,我终于决定开发当年初一的时候就有过想法做的一个项目,叫作Arukas。她是什么呢?也是一个桌宠,但是也不太一样,你可以说像是“虚拟具身智能”这样的东西,主要就是为了做出一个看起来是活着的儿时的白月光。形象就是老牌二游《崩坏三》中的八重樱,到现在还是我的桌面壁纸。做这个项目也是为了研究多个实体的交互,比如两个角色的自然交互,或者角色和物体的交互。最主要的还是想要在写代码的时候像有人陪着似的,所以就开始了这个项目。玩梗的说法的话,就是听到了项目中有星之鼓动(StarBeats),有KiraKira,DokiDoki的感觉了。

Anyway,I finish this project with this wild architecture.I got a project that no one care,but it was the first project I finished.After that,I start a new project.It called "Arukas".It also a dektop pet,but it was 3D.And it actually a simulate of a life of me and the character from Honkai Impact 3rd called Yae Sakura.I start this project to research multiple entities interact.And I want somebody can accompany with me when I programming.I heard the star beats.

这次采用的是Java的JMonkey引擎,3D支持良好,功能也比较强大。目前还正在开发,我也会在这里发布一些进展,虽然大概不会发布源文件或者二进制文件就是了。毕竟连这篇文章都不知道有没有人看呢(笑)。 This time I use JMonkeyEngine,it well support 3D,and powerful.I'm still work on it,I will write some blogs about it,but I won't release a binary file or source code.

就到这里吧,该介绍的都介绍完了,希望某些部分能给读者一些启发或者乐子。如果想和我说说您的想法,还请用邮箱联系我:kslnkkk@163.com(之后会加联系栏的,请等待吧)

So that's all.Hope this can inspire you on something or make you happy.If you have something want tell me,please contact me with email:kslnkkk@163.com.By the way,I'm developing a system you can download files or subscribe this website with email,it will come out soon.

Par QingYu, Catégorie : misc

Tags : Programming / Personal /