MNoya / DotaCraft

Bringing back the legendary RTS game from which Dota was created
http://www.playdotacraft.com
GNU General Public License v3.0
122 stars 31 forks source link

Unit production origin #379

Closed d3nyme closed 8 years ago

d3nyme commented 8 years ago

Not a bug.

Unit production building such as the town hall only spawn units at 1 specific point. For example the town hall, peasants always spawn facing opposite to the gold mine, so they have to walk a big round to reach the gold mine [if the rally point is set to the gold mine].

The next example is the main problem and purpose of this issue. The altar also spawn its units like the town hall, so if the player build many farm/other buildings around the altar in order to cover to altar, the heroes will be pushed to the next path-able pixel and be stuck there [I had this issue], basically the only thing we can do is to use scroll of the town portal (waste 350 golds), or destroy the buildings around the altar (waste farming/leveling time), or rebuild the altar somewhere else since all other heroes spawned will be at that specific point.

In Warcraft 3, the whole circumference of the building is the spawn point of the building, so they'll spawn at the closest point to the rally point, which makes the gameplay smoother and faster. That is why in Warcraft 3 there's always a rally point set at a default location next to the building even if the player doesn't set it somewhere else.

MNoya commented 8 years ago

Heroes shouldn't get stuck when spawning from the altar. I have a whole function dedicated to finding a good place for the units so that they spawn in an open grid, can you take a screenshot whenever the problem happens again?

I was under the impression that WC3 had 'fixed' spawn points, like when you spawn footmen from Barracks they would always pop up from the Barracks' doors.

I can make it dynamic so that the spawn origin always starts at the closest point to the rally point.

d3nyme commented 8 years ago

20161106133700_1

This is a screenshot of the hero stuck in between 4 farms and not being able to move out. As long as any building is on the initial rally point, this will happen.

I've also sent you a video on how Warcraft 3 spawn their units via email.

d3nyme commented 8 years ago

They still spawn on an open grid. What I meant by 'being stuck' is when there's many buildings around the altar and heroes may spawn at that point between those buildings. (sorry for the bad English LOL it's not my first language)

If you can see from the screenshot, Paladin should spawn on the farm, but since there's a farm there they are pushed to the pixel beside it.