You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, at some point, it'd be nice to connect cities by means of roads.
The back-end knowledge is easy. Allow passengers to use those roads, also not much of a problem.
But I am wondering how to render the roads. I mean, we might have a road-texture (.png or something) which is 10 units long. If we wanted to create a road that's 100 units long, we somehow set OpenGL to repeat the texture (not sure how again? But I'm sure I can look that up). Or should we physically have 10 of those "10 units long" road-pieces (also in the game-logic), and let them be "connected"?
We would need rotation support, which will be added soon (I hope), if we want to add diagonal roads.
Thoughts? Any possible solutions? Any possible difficulties anyone foresees? @paked do you have anything to add on this?
The way most games would tackle this problem is with tilemaps. So you have a lot of small images, that get placed on a grid in a specific order make up the map.
This kind of thing:
Unfortunately, our tilemap system is broken/non existent anymore. So we're going to need to fix that. EngoEngine/engo#162.
Yeah, I was looking for a way without tilemaps; but I think that's probably the hardest way to do things (and why they have only been doing it the "new" way for a few years).
Activity
paked commentedon Apr 11, 2016
The way most games would tackle this problem is with tilemaps. So you have a lot of small images, that get placed on a grid in a specific order make up the map.
This kind of thing:

Unfortunately, our tilemap system is broken/non existent anymore. So we're going to need to fix that. EngoEngine/engo#162.
EtienneBruines commentedon Apr 11, 2016
Yeah, I was looking for a way without tilemaps; but I think that's probably the hardest way to do things (and why they have only been doing it the "new" way for a few years).
paked commentedon Apr 11, 2016
@EtienneBruines What do you mean by the "new" way?
EtienneBruines commentedon Apr 11, 2016
I mean being able to draw a straight road between points (10, 10) and (123, 432), render it and then use it in game logic.
gerbenjacobs commentedon Apr 26, 2016
How about a regular drawn line, which will be a simple coord A to coord B and will introduce simple shapes (if those are in the engine)
paked commentedon Apr 26, 2016
@gerbenjacobs Not quite yet, EngoEngine/engo#131. But that is a good idea!
EtienneBruines commentedon May 14, 2016
Fixed in the
playgroundbranch.@gerbenjacobs I've indeed implemented them as such (since EngoEngine/engo#131 was merged a few days ago). 😄