im currently developing a platformer game with python arcade and Tiled Map Editor but i have an issue:
this is my tmx, i saved it as a json
file :
As you can see im in the "Tutorial" Layer wich is an object layer, i am using Tiled Map Editor text tool to put the text but when i run my main.py
i get this:
As you can see, The Tutorial Layer is not rendered, i cant provide all my code because its 1000+ lines of code but this is mydraw
method:
def on_draw(self): self.clear() self.camera.use() self.scene.draw() self.bullets.draw() self.gui_camera.use() score_text = f"Score: {self.player.score}" arcade.draw_text(score_text, 10, 10, arcade.csscolor.BLACK, 18)
I load my scene object like this:
self.tile_map = arcade.load_tilemap(map_name, TILE_SCALING, layer_options)self.scene = arcade.Scene.from_tilemap(self.tile_map)
No error is raised, but the program just doesnt work.
I have tried drawing the Tutorial layer explicity like this self.scene["Tutorial"].draw()
but i get this error instead:
KeyError: 'Scene does not contain a layer named: Tutorial'
i have double checked that the Tutorial
layer is visiblethe camera is properly positioned to show the Tutorial layer.
Im Using python 3.12.2
, Tiled 1.10.1
And Arcade 2.6.17
all the other object layers
are showed, but my Tutorial
layer is NOT showed
However, My question is why is my Tutorial
layer not showing and how to make my tutorial layer show
I have asked chatgpt but its response didnt work
Any Help would be appreciated. 😀