pythonarcade / arcade

Easy to use Python library for creating 2D arcade games.
http://arcade.academy
Other
1.65k stars 312 forks source link

Bug: double-defines + apparently broken make_resources_init.py #2117

Open pushfoo opened 1 week ago

pushfoo commented 1 week ago

Bug Report

TL;DR: There are multiple re-defined variables in resources/__init__.py:

See https://github.com/pythonarcade/arcade/compare/development...pushfoo:arcade:7a1b28fa1975224c99997d6811a991cd6c90f323

I didn't PR those changes yet because this may be a result of util/make_resources_init.py going awry. It doesn't run correctly at the moment:

$ python util/make_resources_init.py 
Traceback (most recent call last):
  File "/home/user/src/arcade/util/make_resources_init.py", line 132, in <module>
    main()
  File "/home/user/src/arcade/util/make_resources_init.py", line 37, in main
    prefix = get_prefix(relative_path)
  File "/home/user/src/arcade/util/make_resources_init.py", line 79, in get_prefix
    raise ValueError(f"No prefix configured for: {path}")
ValueError: No prefix configured for: assets/cache/hit_box_cache.json

I haven't had a chance to investigate further, so I'm filing this so we don't forget. There might be a reason for having those alt versions of the files.

einarf commented 1 week ago

The hit_box_cache.json is precalculated hit box values for all arcade assets. I'm not sure what we'll do with that one.