I'm working on my first project, a Pacman-like game where the character runs around a maze collecting pickups on each tile.

I'm stuck on the best way to implement the handling of the pickup collection.

I can see two ways:

  1. Have a tilemap, with the floor tile with and without the pickup and check for which tile the character is on and flip the tile/take the pickup accordingly
  2. Use a scene for the pickup and have an instance on each tile

With the former, I guess there's no way to animate the pickup? With the latter, it's insanity having hundreds of instanced pickups?

I guess a third way would be to programatically add the instances to relevant tiles on loading the level so I'm not doing it in the UI? I'm not sure how to achieve that though.

Any help or suggestions would be appreciated. Thank you.

If you haven't seen it yet, there's some tutorials on pacman-like games, here's one (with a link to the godot project on github)

@Whiningfields said: If you haven't seen it yet, there's some tutorials on pacman-like games, here's one (with a link to the godot project on github)

I had actually looked at that project before, but ages ago and had forgotten about it. Looking back at it again now with a little bit more experience, it looks like it will be extremely helpful.

Thank you for pointing me in the right direction.

I accidentally created this post as a question, when it really should be a discussion, but I'll mark yours as the answer since I think that's all I'll need for now to keep going.

2 years later