这种感觉有点类似于制作雕塑,雕刻家首先需要知道哪些部分的石头是不需要的,才能着手进行雕刻;凭空乱凿一通只会产生一地的碎石渣。降噪过程亦是如此,它需要预测什么是噪点,然后再进行去除。因此,在能够画出城堡图片之前,模型需要先使用各种城堡相关的图片进行训练。这些图片就是他降噪的依据,让它每一步都能够依照自己的需要在“探索新的图形可能性”和“利用已学到的城堡图片来生成连贯的结果”之间寻求平衡。就仿佛一个人在尝试新办法与借鉴已有知识之间找寻一个平衡(Balancing Exploration and Exploitation)。这样才能既避免从一片随机噪点变成另一片随机噪点,也避免对已有图片进行直接复制。
直到前段时间在看Netflix制作的电视剧《百年孤独》,剧中吉普赛人Melchiades在和Jose Arcadio第一次重逢的时候,说了一句话:“The world is a big place, it takes some time to traverse”。这句话击中了我。因为在这句话里,世界除了是我们的物理世界,更是你我心中的世界。它需要一点时间来traverse,来iterate,来梳理。就像stable diffusion算法一般,这篇博客不是话题的终点,只是一个iteration。于是,我对内容逻辑重新做了修改和整理,删去大量未成形的草稿。即使如此,行文依旧显得头重脚轻,不成章法。再有新的想法之前,就先如此。
不过,回到这里永远在我的计划之中。就如同Melchiades对Jose Arcadio所说的那样。
“One day, I’ll be back by your side.”
PS. 居里夫人从来没有写过自传。国内书店销售的《居里夫人自传》全都来自她为丈夫写的传记《Pierre Curie》。居里夫人在丈夫传记的结尾部分附上了几篇自述。国内出版商便把书的内容前后颠倒:将她的自述放在前面,她为丈夫写的传记则被放在后面。然后把书名改为《居里夫人自传》。不知道是什么毛病。
作者引用了大量考古和医学研究成果来铺垫自己的假说,但其实更有趣的是作者引申出来的讨论:自我意识的诞生的同时,与神一起沉默的还有神谕所提供的毋庸置疑的确定性。从此没有神谕再告诉我们该怎么活,我们不再知道自己的意义,会开始问“人为什么要活着”;我们需要开始做出选择,不论是考虑短期还是长远,但再没有声音来指导我们怎么做。这份不确定感带来的不安是如此的难以忍受,以至于我们在几千年来所做的一切,不论是问卜,算卦,占星,还是求神,以及最后把这一切都系统化成各路宗教或各类权威,都是在寻求曾经“确定性”的替代品,希望能重建与神的连接,再次聆听神谕。用作者的原话是: “Everywhere in the contemporary world there are substitutes, other methods of authorization…There are also the huge commercial and sometimes psychological successes of various meditation procedures, sensitivity training groups, mind control, and group encounter practices. Other persuasions often seem like escapes from a new boredom of unbelief, but are also characterized by this search for authorization.” (GPT 翻译:当代世界的每个角落都有替代品、其他授权方法……还有各種冥想培训、敏感性训练组、心灵控制和团体遭遇实践的巨大商业和心理成功。其他说服方法看似是对新无信仰的厌倦的逃避,但也具有这种寻求授权的特征)
科学,在本质上是系统化的经验总结,而经验来自于生活。对于自然科学而言,通过观察生活中的现象,我们利用严谨的数学语言进行严密的推导以及验证,容易得到一个足够可靠的经验。但对于人文或者社会科学,相比之下就是一个非常糟糕的状态了。因为没有办法用数学来量化所有可能产生影响的部分,大部分时候所做的事都是对一个细节进行观察,然后希望从中得出的结论足以如自然科学理论一般可靠。但这种“盲人摸象”式的以偏概全,注定是无法在可靠性上和自然科学理论相提并论。但即使是自然科学,也无法回答所有的问题,于是,有趣的事发生了:科学击碎了宗教的威权(杀死了上帝),却没有提供足够的替代物,而我们对“确定性”的需要并没有消失,于是各路奇奇怪怪的替代物开始有了市场。从各种已有宗教的新兴小教派,到各种新发明的宗教类似物开始兴起。用作者的话说:“Applied to the world as representative of all the world, facts become superstitions. A superstition is after all only a metaphier grown wild to serve a need to know.”(GPT 翻译:将事实应用于代表整个世界的世界时,事实就变成了迷信。迷信归根结底只是一个野蛮生长的比喻,用于满足对知晓的需要)这种方式获得的理论更像是一种迷信,它们的野蛮生长只是为了填补我们对“确定性”的执着。而它们的底色,无一例外是宗教化的。我想,我有点理解民科了,他们并不是在试图延展我们对这个世界的理解,而只是抱着自己的迷信搞自己的private religion;那些flat earth society也一样,我们只是他们眼中的异教徒。
Pixel Snap: If you’re using 2D pixel art in your game, it’s a good idea to always enable this settin when you start your project. This setting has no effect in 3D games(TODO: finding why).
The scene object: One of the benefits of creating a separate player scene is that you can test it independently, even before you’ve created the other parts of the game.
Group Select Nodes: Before adding any children, it’s a good idea to make sure you don’t accidentally move or resize them. It’s a good idea to always do this when creating a new scene. If a body’s collision shape or sprite becomes offset or scaled, it can cause unexpected errors and be difficult to fix. With this option, the node and all of its children will always move together.
2024-05-07
Both AnimationSprite & CollisionShape2D should be added as the children of the Player Node.
The export keyword on the speed variable allows you to set its value in the Inspector, as well as letting the Inspector know what type of data the variable should contain
About delta
The game engine attempts to run at a consistent 60 frames per second. However, this can change due to computer slowdowns, either in Godot or from the computer itself. If the frame is not consistent, then it will affect the movement of your game objects. Godot, liek most game engines and frameworks, solves this by passing you delta, which is the elapsed time since the previous frame. Most of the time, this will be around 0.016s (or around 16 milliseconds). If you then take your desired speed (600px/s) and multiply by delta, you will get a movement of exactly 10. If, however, the delta increased to 0.3, then the object will be moved 18 pixels. Overall, the movement speed remains consistent and independent of the frame rate.
As a side benefit, you can express your movement in units of px/s rather than px/frame, which is easier to visualize.
queue_free() doesn’t delete the object immediately, but rather adds it to a queue to be deleted at the end of the current frame. This is safer than immediately deleting the node, because other code running in the game may still need the node to exist. By waiting until the end of the frame, Godot can be sure that all code that may access the node has completed and the node can be removed safely. (how?)
Make sure Background is the first child node. Nodes are drawn in the order shown, so the background will be behiind the player in this case.
那我究竟做得怎么样呢?其实不太好,大多时候依旧是还是那个浮于表面的人,感觉有一部分是因为对未来生活,尤其是感情生活的不定感。要用一个词形容的话,我会选是 inquiet。可能因为是 in + quiet 的组合,比worried多了一种跃然纸上的不安定感:not be able to feel settled。以至于整个人都在生活中原地打转,像极了 在《极乐迪斯科》中拒绝对话,于是时间不再前进一样。仿佛自己是一个单线程的动物,如果在一件事上被卡住,整个人就无法安心前进。
如果确实是这样,我们该如何避免画地为牢呢?我想到了基督教,这是它有意思的一个地方;一上来就告诉你因为耶稣的牺牲,所有的罪都免了,你也是无瑕地来到人间;紧接着第二句“the vengeance is mine”,让上帝收走所有价值评判的资格,让旁人的评价不再对你有意义。剩下的事就简单了,保留这套“资格”系统,那个avatar被换成“永远会原谅和宽恕你的通情达理的上帝”,然后按照教义去生活,在由牧师等神职人员来提供售后,解答客户具体的困惑,助人脱困。只要这个人对教义的理解是积极的,客服是给力的,那么该客户大概率能过得不错。多说一句,基督教把人比作羊群,让羊群相信牧羊人,以及《孙子兵法》里说“若驱群羊,驱而往,驱而来,莫知所之。” 都从各自的角度说出来人们对于“有资格的人”是多么地顺从。至于这个“资格”,是伪装的还是真实拥有的,没什么差别。这可能是政治充满谎言的原因,只有谎言能够长久地牧羊,因为长久的“资格”只能靠谎言来支撑。
先说这个天使,Inarius。下图是他在游戏中的造型,他是光明的化身,由光组成的翅膀是他力量的象征,也是他与恶魔战斗的利器。游戏中,他在人间创立了一个宗教, the Cathedrale of Light,中文翻做 圣光教会,来接纳陷入迷茫的人们,引导大家信仰光明,对抗黑暗。Inarius慷慨地许诺给追随者们一个去往天堂的未来。在教会一日壮大的背景下,他组织了一只由信徒组成的远征军,踏入地狱深处,力图一举荡平黑暗。
Lilith决定釜底抽薪,一个巴掌拍不响,不想继续永恒之战?干掉天堂就好了,何必专门搞一个庇护之地?地狱就是所有人的庇护之地。所以她决定去往地狱,获得那里的统治权,然后征讨天堂,once and for all,彻底结束这摊糊涂账。只是在执行计划的过程中,遇上了执意取她性命的Inarius。于是,一场家庭矛盾爆发了。
这本书大概是我读过的最具深度的文学作品了,它披着小说的外衣,用信手拈来的犀利笔触细致入微地刻画了每一个人的挣扎,却讲了一个温情脉脉的故事。老陀有太多的东西想要探讨,于是搭建了一个圆形的舞台。他知道舞台上每一个角落的立场和论据,于是他选择了一件凶杀案作为剧本,让读者和书中的角色们站在各自的位置上一起探讨是非曲直。没有比这更合适的安排了,但老陀并不止步于此,他不忘告诉大家,围绕着凶案小法庭的是社会这个大审判所,角色在生活中经历过的试炼,读者们也不能豁免。于是,on with the show.
音乐剧《Hamilton》里有一句唱词我很喜欢,“the world was wide enough for both Hamilton and me“,Aaron Burr在Hamilton死后如是说。世界之大,足以容下你我。我们本可以停止无谓的争斗携手同行,但我们却被蒙蔽了双眼,如误入歧途的羔羊般,使得一场决斗不可避免。很不幸,我们太容易被先入为主的立场带入歧途,因为嫉妒,怨恨,软弱或仅仅是激情。而歧途之所以称为歧途,是因为一旦陷进去就绝难走出来,直到被吞噬,再也不是自己,变得陌生。叫它钻牛角尖也好,tunnel vision也罢,都准确地描述了这种停留越久就越难以摆脱的困境。The hardest battles are fought in the mind. 说的就是对此的抗争。
Living is a life-long neural network training in action as continuous data feed into us regardless of our desire. We better have it supervised from day one. Why?
Despite all the fancy terms, psychological or ideological, the meaning of life is all about bringing order into this random system, keeping us away from chaos. Additionally, if we can find constant satisfaction along with such endless endeavor, it’s happiness or euphoria for the lucky few.
That signifies a meaningful life is not necessarily a happy one. And not all happiness, or satisfaction, is meaningful. Of course, to pursue a happy life is a false aim to me now, instead, I’d like to say “to pursue a less chaotic life with happiness embedded”.
Thus, just as training an AI, to keep our neural network fitting, we must have ourselves supervised, and keep back-propagating accordingly. In addition to that, don’t forget to randomize our habit patterns and behaviors occasionally as we k-folding our dataset so that we won’t be overfitted. Maybe this is the doctrine of the mean in the AI term, neither overfitting nor underfitting.
No wonder we describe living a life as an uphill battle, and no wonder we are capable of learning anything.