Python Forum
[PyGame] No collision detection
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] No collision detection
#6
Your program doesn't even run for me due to the ImportErrors of the improper file directories.
metulburr@metulburr:~/Downloads/Python(1)/Python$ python3 main.py
Traceback (most recent call last):
  File "main.py", line 1, in <module>
    import b as b
ModuleNotFoundError: No module named 'b'
metulburr@metulburr:~/Downloads/Python(1)/Python$ python3 main.py
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Cannot load external tileset: /home/metulburr/Downloads/Desktop/tuxemon/Nowy folder/Nowy folder/terrain_atlas.tsx
Traceback (most recent call last):
  File "/home/metulburr/.local/lib/python3.8/site-packages/pytmx/pytmx.py", line 870, in parse_xml
    node = ElementTree.parse(path).getroot()
  File "/usr/lib/python3.8/xml/etree/ElementTree.py", line 1202, in parse
    tree.parse(source, parser)
  File "/usr/lib/python3.8/xml/etree/ElementTree.py", line 584, in parse
    source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/home/metulburr/Downloads/Desktop/tuxemon/Nowy folder/Nowy folder/terrain_atlas.tsx'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 9, in <module>
    g = Game()
  File "/home/metulburr/Downloads/Python(1)/Python/Game.py", line 17, in __init__
    self.load_data()
  File "/home/metulburr/Downloads/Python(1)/Python/Game.py", line 22, in load_data
    self.tiled_map = load_pygame('map/map.tmx')
  File "/home/metulburr/.local/lib/python3.8/site-packages/pytmx/util_pygame.py", line 141, in load_pygame
    return pytmx.TiledMap(filename, *args, **kwargs)
  File "/home/metulburr/.local/lib/python3.8/site-packages/pytmx/pytmx.py", line 360, in __init__
    self.parse_xml(ElementTree.parse(self.filename).getroot())
  File "/home/metulburr/.local/lib/python3.8/site-packages/pytmx/pytmx.py", line 400, in parse_xml
    self.add_tileset(TiledTileset(self, subnode))
  File "/home/metulburr/.local/lib/python3.8/site-packages/pytmx/pytmx.py", line 845, in __init__
    self.parse_xml(node)
  File "/home/metulburr/.local/lib/python3.8/site-packages/pytmx/pytmx.py", line 874, in parse_xml
    raise Exception
Exception
Error:
Cannot load external tileset: /home/metulburr/Downloads/Desktop/tuxemon/Nowy folder/Nowy folder/terrain_atlas.tsx
Recommended Tutorials:
Reply


Messages In This Thread
No collision detection - by onizuka - Aug-15-2020, 05:42 PM
RE: No collision detection - by metulburr - Aug-15-2020, 09:51 PM
RE: No collision detection - by onizuka - Aug-15-2020, 09:57 PM
RE: No collision detection - by metulburr - Aug-17-2020, 11:29 AM
RE: No collision detection - by onizuka - Aug-17-2020, 02:25 PM
RE: No collision detection - by metulburr - Aug-17-2020, 11:47 PM
RE: No collision detection - by onizuka - Aug-18-2020, 01:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question [PyGame] Problem with collision of player and enemy Nekotrooper 1 898 Dec-08-2023, 03:29 PM
Last Post: deanhystad
  can't get collision detection to work in platform game chairmanme0wme0w 10 4,127 Aug-19-2022, 03:51 PM
Last Post: deanhystad
  [PyGame] Collision in not happening onizuka 3 3,543 Sep-07-2020, 11:30 AM
Last Post: metulburr
  Problem with collision detection... michael1789 4 3,429 Nov-12-2019, 07:49 PM
Last Post: michael1789
  Arcade Collision Problem randor 0 2,754 Oct-28-2019, 11:17 PM
Last Post: randor
  Multiple wall collision in pacman rustyjoe 4 4,255 Aug-11-2019, 08:08 AM
Last Post: rustyjoe
  drawing, moving, and collision problems (pygame) SheeppOSU 26 15,278 Apr-22-2019, 03:09 AM
Last Post: SheeppOSU

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020