The topic you referenced is definitely the better way to do it - I did it this way as well. Manually-drawn Polygons are not the smoothest aspect of Godot, but for the purposes of this project (and the “complete beginner” expected student skill level at this point in the course), they probably are the best-suited tool for the job. Even if you were to have lots of weirdly-shaped tiles in a TileSet, the TileMap still operates with an underlying grid, which gets messy for tile placement and doesn’t really solve collision on its own in that case.
If you want a challenge, you might find that this way gives you more freedom:
- Use something like GIMP to draw the entire maze as a single piece (to keep things simple). You can give it whatever crazy and curvy lines you want, but if you make any holes, you will need to manually create CollisionPolygons for these afterwards. Make the background transparent.
- In a new object scene, create an Area2D and add a child Sprite2D. Set the Sprite2D’s Texture to the maze image.
- With the Sprite2D selected, look for the contextual Sprite2D menu in the Viewport top menu. Click that and select Create CollisionPolygon2D Sibling - this will open a dialog.
- Play with the settings (particularly Simplification) until you’re satisfied with the CollisionPolygon outline - remember to update the preview - and click Create CollisionPolygon2D.
- As per the topic you referenced, set the CollisionPolygon’s Build Mode to Segments.
- Save the object scene, then instance it in your level.
Keep in mind that the lower you set the simplification when generating collision shapes this way, the lower the performance will be. Probably won’t be an issue with a small project like this one, but if you do see low framerates that appear to be caused by your CollisionPolygon (ie disabling it somehow at runtime instantly makes the game faster), go back and regenerate the CollisionPolygon with a higher level of simplification, and with the aim of reducing the number of vertices.
It’s also worth mentioning that you can make maze pieces the same way, but because each of them would be separately enclosed with polygon segments, you would need to adjust your player logic to account for this.
It’s a long post, but if you don’t want to draw with the Polygon tool, this method should give you everything you need =)