minecraft-py / minecraft

A Minecraft-like game written in python3
GNU General Public License v3.0
157 stars 25 forks source link

bug与特性皆不可数名词 #3

Closed wzh656 closed 3 years ago

wzh656 commented 3 years ago

@jason-bowen-zheng @ismaelxyz 用户体验不爽bug (看起来我是来负责体验游戏找bug的了)(要英文的话自己翻译啦):

  1. 我我我我我我工具栏选择一滑滑轮就没了(关键是也会报错), 没了之后挖掘方块根本放不到手里(其实放到手里也显示不了), 必须循环显示(cycle), 比如如果有9个位置, 0再-1后要变成8, 8再+1要变成0

  2. 挖掘到的东西要放到手上显示出来,不要这样看不见

  3. 按(press)Tab飞行(fly)之后,再按(press)W行走(walk)就会... 崩溃啦Original exception was:

  4. 就是似乎崩溃后直接打不开这个存档了(can't open), 要删除存档才行了,报错

    [13:27:41 INFO]:loading game lib
    [13:27:43 INFO]: welcome ***
    [13:27:43 ERR ]: catch error: invalid literal for int() with base 10: , plank'
  5. 这个FPS是我最看不下去的了, 3000+FPS你是认真的么, 你这算法绝对有问题!

  6. 按住F3+D会一直跑,跑到虚空下

  7. 疾跑(run)只有ctrl一松手就... 不跑了? 难道你想让我一直按着这个键累死吗?

更多BUG不想找了(bug 使人心情愉悦)

zhengxyz123 commented 3 years ago

对 4 的回复: @wzh656 , 这是存档格式与当前版本的存档不符所致的, 请根据文档修改存档数据!

wzh656 commented 3 years ago

不, 我已经删除了所有的存档. 这是很可能是由fly不能walk引起的. 要不然就是放了一个plank引起的.

zhengxyz123 commented 3 years ago

@wzh656 bug5 调用的是pyglet.clock.get_fps()函数, 绝大部分是可靠的, 不是自己瞎写的!

在我的垃圾电脑上也能够有 1000 fps

zhengxyz123 commented 3 years ago

@wzh656 bug6 已经解决, 将F3+D换成了F3+I(nfo). 其他的正在陆续处理中...

wzh656 commented 3 years ago

又到了愉快的找bug时间了

旧bug更新

bug1的错误信息来了:

Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 237, in 'calling callback function'
  File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\win32\_
_init__.py", line 712, in f
    result = event_handler(msg, wParam, lParam)
  File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\win32\_
_init__.py", line 847, in _event_raw_input
    self.dispatch_event('on_mouse_scroll',
  File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\__init_
_.py", line 1333, in dispatch_event
    if EventDispatcher.dispatch_event(self, *args) != False:
  File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
e 422, in dispatch_event
    self._raise_dispatch_exception(event_type, args, getattr(self, event_type),
exception)
  File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
e 476, in _raise_dispatch_exception
    raise exception
  File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
e 415, in dispatch_event
    if getattr(self, event_type)(*args):
  File "D:\www\www\MinecraftPython\jason-bowen-zheng\Minecraft\game.py", line 50
8, in on_mouse_scroll
    self.hud['hotbar'].set_index(index)
  File "D:\www\www\MinecraftPython\jason-bowen-zheng\Minecraft\gui\hotbar.py", l
ine 46, in set_index
    self._element[index] = Sprite(image.load(join(path['texture.ui'], 'hotbar_hi
ghlight.png')),
TypeError: list indices must be integers or slices, not float

bug3. 虽然现在不会崩了,但飞行还是走不了啊

new Bug(...)

  1. bug No.8: 开始游戏时应该先暂停并且没有鼠标锁定(我现在一start游戏还没有鼠标锁定就开始游戏了,搞得要先Esc再来锁定) By the way, 没有鼠标锁定的时候能不能搞个遮罩
  2. bug No.9: 语言换了个zh_cn就:
    [13:26:56 INFO]: loading game lib
    Traceback (most recent call last):
    File "D:\Program Files\bcm\python3.8.1\lib\runpy.py", line 193, in _run_module
    _as_main
    return _run_code(code, main_globals, None,
    File "D:\Program Files\bcm\python3.8.1\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
    File "D:\www\www\MinecraftPython\jason-bowen-zheng\Minecraft\__main__.py", lin
    e 3, in <module>
    from Minecraft.launcher import *
    File "D:\www\www\MinecraftPython\jason-bowen-zheng\Minecraft\launcher.py", lin
    e 10, in <module>
    from Minecraft.game import *
    File "D:\www\www\MinecraftPython\jason-bowen-zheng\Minecraft\game.py", line 7,
    in <module>
    import Minecraft.saver as saver
    File "D:\www\www\MinecraftPython\jason-bowen-zheng\Minecraft\saver.py", line 4
    , in <module>
    from Minecraft.source import path
    File "D:\www\www\MinecraftPython\jason-bowen-zheng\Minecraft\source.py", line
    54, in <module>
    lang = json.load(open(join(path['json.lang'], settings['lang'] + '.json')))
    File "D:\Program Files\bcm\python3.8.1\lib\json\__init__.py", line 293, in loa
    d
    return loads(fp.read(),
    UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 19: illegal m
    ultibyte sequence
  3. bug No.10: JavaScript运行错误(onBuild竟然不能单独运行?!)
    [13:30:27 ERR ]: javascript: onDestroy: ReferenceError: onDestroy is not defined
  4. bug No.11 JavaScript message 输出错误:
    decode error
  5. bug No.12 我只是按了个Q,结果:You die kill by self,怎么可能这么容易自杀(我没跳楼也没撞墙还没咬舌自尽,这绝对的他杀) 并且既然死了还不放开我的鼠标,还一直鼠标锁定
  6. bug No.13 JavaScript 怎么就不允许用setTimeout了!
    [13:42:23 ERR ]: javascript: onInit: ReferenceError: setTimeout is not defined
  7. bug No.14 每次启动玩家都会陷下一格方块去
  8. bug No.15 莫名其妙的bug:
    
    Traceback (most recent call last):
    File "_ctypes/callbacks.c", line 237, in 'calling callback function'
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\win32\_
    _init__.py", line 712, in f
    result = event_handler(msg, wParam, lParam)
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\win32\_
    _init__.py", line 822, in _event_raw_input
    self.dispatch_event('on_mouse_press', 0, 0, mouse.LEFT,
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\__init_
    _.py", line 1333, in dispatch_event
    if EventDispatcher.dispatch_event(self, *args) != False:
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 422, in dispatch_event
    self._raise_dispatch_exception(event_type, args, getattr(self, event_type),
    exception)
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 476, in _raise_dispatch_exception
    raise exception
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 415, in dispatch_event
    if getattr(self, event_type)(*args):
    File "D:\www\www\MinecraftPython\jason-bowen-zheng\Minecraft\game.py", line 47
    3, in on_mouse_press
    self.run_js('onDestroy', previous[0], previous[1], previous[2], texture)
    TypeError: 'NoneType' object is not subscriptable
    Traceback (most recent call last):
    File "_ctypes/callbacks.c", line 237, in 'calling callback function'
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\win32\_
    _init__.py", line 712, in f
    result = event_handler(msg, wParam, lParam)
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\win32\_
    _init__.py", line 822, in _event_raw_input
    self.dispatch_event('on_mouse_press', 0, 0, mouse.LEFT,
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\__init_
    _.py", line 1333, in dispatch_event
    if EventDispatcher.dispatch_event(self, *args) != False:
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 422, in dispatch_event
    self._raise_dispatch_exception(event_type, args, getattr(self, event_type),
    exception)
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 476, in _raise_dispatch_exception
    raise exception
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 415, in dispatch_event
    if getattr(self, event_type)(*args):
    File "D:\www\www\MinecraftPython\jason-bowen-zheng\Minecraft\game.py", line 47
    3, in on_mouse_press
    self.run_js('onDestroy', previous[0], previous[1], previous[2], texture)
    TypeError: 'NoneType' object is not subscriptable
    Traceback (most recent call last):
    File "_ctypes/callbacks.c", line 237, in 'calling callback function'
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\win32\_
    _init__.py", line 712, in f
    result = event_handler(msg, wParam, lParam)
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\win32\_
    _init__.py", line 822, in _event_raw_input
    self.dispatch_event('on_mouse_press', 0, 0, mouse.LEFT,
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\__init_
    _.py", line 1333, in dispatch_event
    if EventDispatcher.dispatch_event(self, *args) != False:
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 422, in dispatch_event
    self._raise_dispatch_exception(event_type, args, getattr(self, event_type),
    exception)
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 476, in _raise_dispatch_exception
    raise exception
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 415, in dispatch_event
    if getattr(self, event_type)(*args):
    File "D:\www\www\MinecraftPython\jason-bowen-zheng\Minecraft\game.py", line 47
    3, in on_mouse_press
    self.run_js('onDestroy', previous[0], previous[1], previous[2], texture)
    TypeError: 'NoneType' object is not subscriptable
    Traceback (most recent call last):
    File "_ctypes/callbacks.c", line 237, in 'calling callback function'
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\win32\_
    _init__.py", line 712, in f
    result = event_handler(msg, wParam, lParam)
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\win32\_
    _init__.py", line 822, in _event_raw_input
    self.dispatch_event('on_mouse_press', 0, 0, mouse.LEFT,
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\__init_
    _.py", line 1333, in dispatch_event
    if EventDispatcher.dispatch_event(self, *args) != False:
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 422, in dispatch_event
    self._raise_dispatch_exception(event_type, args, getattr(self, event_type),
    exception)
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 476, in _raise_dispatch_exception
    raise exception
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 415, in dispatch_event
    if getattr(self, event_type)(*args):
    File "D:\www\www\MinecraftPython\jason-bowen-zheng\Minecraft\game.py", line 47
    3, in on_mouse_press
    self.run_js('onDestroy', previous[0], previous[1], previous[2], texture)
    TypeError: 'NoneType' object is not subscriptable
    Traceback (most recent call last):
    File "_ctypes/callbacks.c", line 237, in 'calling callback function'
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\win32\_
    _init__.py", line 712, in f
    result = event_handler(msg, wParam, lParam)
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\win32\_
    _init__.py", line 822, in _event_raw_input
    self.dispatch_event('on_mouse_press', 0, 0, mouse.LEFT,
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\window\__init_
    _.py", line 1333, in dispatch_event
    if EventDispatcher.dispatch_event(self, *args) != False:
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 422, in dispatch_event
    self._raise_dispatch_exception(event_type, args, getattr(self, event_type),
    exception)
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 476, in _raise_dispatch_exception
    raise exception
    File "D:\Program Files\bcm\python3.8.1\lib\site-packages\pyglet\event.py", lin
    e 415, in dispatch_event
    if getattr(self, event_type)(*args):
    File "D:\www\www\MinecraftPython\jason-bowen-zheng\Minecraft\game.py", line 47
    3, in on_mouse_press
    self.run_js('onDestroy', previous[0], previous[1], previous[2], texture)
    TypeError: 'NoneType' object is not subscriptable
    [13:47:05 INFO]: wzh die: wzh falling into the void
    Error in sys.excepthook:

Original exception was:

zhengxyz123 commented 3 years ago

千万不能在 Windows 上使用UTF-8编码, 在没有转义的情况下会报错. 现在, 使用滚轮已经可以选择物品栏了.

在没有按钮的年代. 死的时候, 你应该知道使用回车键重生, 使用ESC键退出游戏.

很显然的, Js2Py 不支持这个函数.

decode_error 以后不会再看到了. 下周我们将编写新的颜色代码. @ismaelxyz 移除了飞行时行走的代码, 现已复原, 无 bug.

wzh656 commented 3 years ago

既然不用UTF-8,那要到哪了去改成GBK?

现在不是没有按钮的年代,也不是穷的只有键盘没有鼠标的年代,加一个按钮不行吗(May I asked could you please 加一个按钮?) 另外,死亡之后也不要抓着鼠标不放了吧,应该解除鼠标锁定

看起来这Js2Py很辣鸡嘛,如果真的这么辣鸡就没有用js编script的必要了(你直接用Python编script,用safe_eval运行)

zhengxyz123 commented 3 years ago

我不是开发了一个 xscript, 比 js 还低级. 要不要使用 xscript 来运行? 连 safe-eval 都不要, 还比 Js2Py 快!

按钮对吧, 计划明年增加一系列的 widget, 不要着急. 改成 GBK? 趁早死了这条心吧, 我怎么可能为 Windows 单独一个平台写 encode 函数???

wzh656 commented 3 years ago

可以用xscript做script没问题啊(命令方块本来就很低级) 明年?你这一个检测鼠标点击按钮而已……至于吗 要不然你说Window怎么显示中文?(总得有一个办法吧)

wzh656 commented 3 years ago

旧 bug:

  1. Bug1: 可以上下滚轮了.但是方向反了! 往上+1, 往下-1!

新 bug:

  1. Bug16: 先点Tab键灰起来, 然后再点Tab掉下去, 在掉下去的中途点Tab会发现你瞬间埋到土里了(而且还出不来)!
zhengxyz123 commented 3 years ago

对于滚轮的方向反了的问题, 正在解决, 非常简单.

bug 16 的描述有点怪异 :worried: . 我们需要经过测试才能确定到底哪里出了问题.

wzh656 commented 3 years ago
  1. bug 17:突然跑出来个输入法,按了个W前进,结果就停不下来了!(复活之后还是停不下来) image
zhengxyz123 commented 3 years ago

在原版 Minecraft 里面, 输入法就非常不好使. 我刚刚也试过了, 其实解决方法还是很简单的. 不过我刚刚提交好后就把电脑关掉了.

wzh656 commented 3 years ago

新年新气象,新年新bug特性,恭喜收获bug特性一堆:

  1. bug特性17:先按Tab进入灰行模式,然后按W往前走,在行走过程中按空格不能往上灰
  2. bug特性18:Alt+Tab切换窗口时鼠标锁定有问题
  3. bug特性19:树叶太诡异,至少我可以说你的树叶不透光
  4. bug特性20:玻璃的bug就不用说了吧
  5. 【非人类】bug特性1:你这bug还没有解决,方向还是反的,简直非人类!!!
zhengxyz123 commented 3 years ago

新年新气象,新年新bug,恭喜收获bug一堆:

  1. bug17:先按Tab进入灰行模式,然后按W往前走,在行走过程中按空格不能往上灰
  2. bug18:Alt+Tab切换窗口时鼠标锁定有问题
  3. bug19:树叶太诡异,至少我可以说你的树叶不透光
  4. bug20:玻璃的bug就不用说了吧
  5. 【非人类】bug1:你这bug还没有解决,方向还是反的,简直非人类!!!

特性不予修复

wzh656 commented 3 years ago

忽然又发现漏掉的一个新bug特性:

  1. bug特性21:你的草方块上的草怎么长得到处都是,这草明明应该像原版一样只长在上面,主要成分(周围)应该还是泥土,你的草方块都长成草球儿了,怪不得我一开始觉得有哪里不对劲儿

你修不修bug特性也雨窝无瓜,随便你

wzh656 commented 3 years ago

long time no 找bug了啊,继续上次的编号

  1. bug22:在可使用方块上右键规则具有不确定性,有时放置方块有时又使用方块,应改为Shift+右键放置方块,直接右键使用方块

  2. bug23:先在A处放一个TNT方块并点燃,再分别在A,B处放TNT,再B处点燃(使用)TNT,诡异地发现A处TNT被点燃,再B处点燃(使用)TNT,更诡异地发现A处出现一个被点燃的TNT

  3. bug24:远处的方块会神奇地出现网格,用户体验极其不佳

  4. bug25:使用中文zh_CN时,“minecraft”“Inventory”未翻译

  5. bug26:TNT点燃后闪烁时,一下白一下红,应该变为原TNT材质 instead of 变成红色

另:bug 17,18仍未解决

wzh656 commented 3 years ago

咋还不让reopen哩?