I am completely new to Godot Engine, and quite an amateur in game development, in general. I have a small project where I want to implement a procedurally generated level, and for that I'd like to be able to programmatically place tiles. I'm thinking about something like in this video for GameMaker, however, I haven't found a documented way to do that for Godot.

Does Godot support programmatically laying tiles, and if so, how?


1 Answer 1


You can programmatically set a cell in the TileMap class by using the set_cell function.

Note: if you're new to an engine & game dev in general, I highly recommend working through any of the tutorial information provided; I happened to come across the the link to the TileMap class in:

2d Tutorials -> Graphics -> Using TileMaps

Note: the above was for the 3.x version of Godot.
Information for the current/stable version can be found here or by changing the version in the lower left hand corner:

screenshot drawing attention to version

  • \$\begingroup\$ @Case Thanks for pointing that out. I answered for an older version - looks like some of the links transitioned to the newer version & some didn't. Should be fixed now w/ options to get to either. \$\endgroup\$
    – Pikalek
    Commented Dec 15, 2023 at 18:25
  • \$\begingroup\$ No problem, maybe you could help me with my question, since you seem to be quite knowledgeable on Godot. gamedev.stackexchange.com/questions/208264/… \$\endgroup\$
    – Case
    Commented Dec 16, 2023 at 1:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .