jsettlers / settlers-remake

A Remake of "The Settlers III" for Windows, Linux, Mac and Android
http://www.settlers-android-clone.com
MIT License
356 stars 100 forks source link

Builders stops carriers when building #32

Closed stumpdk closed 9 years ago

stumpdk commented 9 years ago

When working on a building, the builders make the incomming carriers wait and queue up. This is especially an issue with larger buildings like Large Residence. As far as I remember, in the original Settlers, the carriers could unload, while the builders were working.

stumpdk commented 9 years ago

Can this be accomplished by setting brcklayer.visible = false when running tryToBuild() in BricklayerStrategy? That way, the bricklayer won't occupy the space for the carrier.

andreas-eberle commented 9 years ago

No, it can't. The thing is, that only movables that are on the grid, can/will be rendered. So in JSettlers any position on the map can only be occupied by one single Movable. The way to go is to calculate a path around the other movable.

Solving such conflicts is already done for many cases with the Movable.push() mechanics. I will have to check what needs to be done exactly for this case.