
go to bed!
This game is from ldjam.com, which is currently unavailable.
You can try viewing the original page on Web Archive (may not load correctly).
You can try viewing the original page on Web Archive (may not load correctly).
这是我这次的作品, 灵感来自于朋友, 他家的床比较小, 他和他老婆睡觉的时候经常会很挤.
游戏的操作手感不是很好, 因为模型设计不够合理.
这个骨骼模型是:
- 每个节点都要么有一个父节点, 要么没有.
- 如果一个节点没有父节点, 那么可以随意的直接移动它.
- 如果一个节点有父节点, 那么直接移动它的时候, 它的父节点不会动, 它与父节点的距离也不会变.
- 如果一个节点被移动, 那么它的子节点会因为要保持与父节点的距离而移动.
- 当进行一个移动操作时, 先预先计算移动后的状态, 然后判断这个状态是否与已知的碰撞范围重叠, 如果是, 则不进行移动, 这是手感差的原因. 如果是无论如何都进行移动, 然后再计算碰撞位置, 最后将碰撞的元素分开, 手感就会好很多, 不会在某些时候有"黏住"的感觉, 但我没想好怎么将碰撞的元素分开
值得一提的是, 这回我使用了idris编程语言, 并且几乎从头开发了一个游戏引擎, 然后基于这个引擎实现了这个游戏.
用idris编程很有趣.
不过到最后几个小时的时候我已经不想搞了, 有一些地方比较粗糙.
虽然很辛苦, 但也很有趣! 下次我会做的更好w.
注: 使用了 momentum 来让浏览器不要限制定时器.
Here's the translation of your text into English:
This is my work for this time. The inspiration came from a friend whose bed at home is relatively small, so he and his wife often feel crowded when sleeping.
The gameplay controls don't feel very good because the model design isn't quite reasonable.
The skeletal model is as follows:
- Each node either has a parent node or doesn't.
- If a node has no parent node, it can be moved freely.
- If a node has a parent node, when it is moved directly, its parent node won't move, and the distance between them won't change.
- If a node is moved, its child nodes will move to maintain the distance from the parent node.
- When performing a movement operation, first pre-calculate the state after the movement and then check if this state overlaps with the known collision range. If it does, do not execute the movement. This is the reason for the poor responsiveness. If you move regardless of the overlap and then calculate the collision position afterward, and finally separate the colliding elements, the responsiveness will be much better. There won't be a "sticky" feeling at certain times. However, I haven't figured out how to separate the colliding elements yet.
It's worth mentioning that this time I used the Idris programming language and almost developed a game engine from scratch, then implemented this game based on that engine. Programming in Idris is interesting. However, in the last few hours, I didn't want to work on it anymore, and some parts are a bit rough.
Although it was tough, it was also fun! I'll do better next time! 😄
Note: used momentum to prevent the browser from throttling timers.
游戏的操作手感不是很好, 因为模型设计不够合理.
这个骨骼模型是:
- 每个节点都要么有一个父节点, 要么没有.
- 如果一个节点没有父节点, 那么可以随意的直接移动它.
- 如果一个节点有父节点, 那么直接移动它的时候, 它的父节点不会动, 它与父节点的距离也不会变.
- 如果一个节点被移动, 那么它的子节点会因为要保持与父节点的距离而移动.
- 当进行一个移动操作时, 先预先计算移动后的状态, 然后判断这个状态是否与已知的碰撞范围重叠, 如果是, 则不进行移动, 这是手感差的原因. 如果是无论如何都进行移动, 然后再计算碰撞位置, 最后将碰撞的元素分开, 手感就会好很多, 不会在某些时候有"黏住"的感觉, 但我没想好怎么将碰撞的元素分开
值得一提的是, 这回我使用了idris编程语言, 并且几乎从头开发了一个游戏引擎, 然后基于这个引擎实现了这个游戏.
用idris编程很有趣.
不过到最后几个小时的时候我已经不想搞了, 有一些地方比较粗糙.
虽然很辛苦, 但也很有趣! 下次我会做的更好w.
注: 使用了 momentum 来让浏览器不要限制定时器.
Here's the translation of your text into English:
This is my work for this time. The inspiration came from a friend whose bed at home is relatively small, so he and his wife often feel crowded when sleeping.
The gameplay controls don't feel very good because the model design isn't quite reasonable.
The skeletal model is as follows:
- Each node either has a parent node or doesn't.
- If a node has no parent node, it can be moved freely.
- If a node has a parent node, when it is moved directly, its parent node won't move, and the distance between them won't change.
- If a node is moved, its child nodes will move to maintain the distance from the parent node.
- When performing a movement operation, first pre-calculate the state after the movement and then check if this state overlaps with the known collision range. If it does, do not execute the movement. This is the reason for the poor responsiveness. If you move regardless of the overlap and then calculate the collision position afterward, and finally separate the colliding elements, the responsiveness will be much better. There won't be a "sticky" feeling at certain times. However, I haven't figured out how to separate the colliding elements yet.
It's worth mentioning that this time I used the Idris programming language and almost developed a game engine from scratch, then implemented this game based on that engine. Programming in Idris is interesting. However, in the last few hours, I didn't want to work on it anymore, and some parts are a bit rough.
Although it was tough, it was also fun! I'll do better next time! 😄
Note: used momentum to prevent the browser from throttling timers.