Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | nicfer | |
Old Version | Published before Godot 3 was released. |
Hello.
I’m making a city builder game, and I’m trying to figure the best way to implement roads.
What’s the easiest way to implement them to connect when adjacent? That is, they change graphics depending on other roads 1 tile up/down/left/right. My idea is to flip/transpose them in order to not make 2 or 4 images of the same road in different directions.
Remember that not only the placed tile needs to be set to it’s correct sprite and position, but the adjacent ones also need to be changed.
I’m leaving this for a latter status of the game, but meanwhile, I’ll leave the question: Is this possible to do with Tilemaps? Is it any easier with overlaid sprites?
Goodbye.
It’s a bit ad, but you may check my GitHub, cause I’m doing city-builider too
Hope, that 'll be usefull. If you’ll have any question about my code, ask me here, on Github or Tumblr.
PS: #pasta_style_allert - that’s no the best solution…
Kamil Lewan | 2017-05-22 19:52
Ok, nice. It looks promising, although with some glitches in the UI (namely, the initial city placement is activated while scrolling with the right mouse button, and the add new houses/road window randomly places objects on the map).
I also uploaded my first revision of my project, GitHub - nicfer/godotcity , which is even more crude, but it’s something.
nicfer | 2017-05-25 12:56
Thanks for feedback. About your GH, I have 404 error, you added point to url About that random placement, can’t confirm this (have you last commit?), btw, I suggest move discusion about my project to GH/issues, casue that’s no about your question. Thanks.
Kamil Lewan | 2017-05-25 23:19
Ok, I’ll continue the chat about your project there. And I fixed the URL, it was using the comma in front as part of it, now it should work.
nicfer | 2017-05-26 12:15