MegaGlest Forum
Archives (read only) => Glest Advanced Engine => Feature requests => Topic started by: Mr War on 17 February 2011, 06:48:57
-
Hi, couldn't see this on the wiki..
Ability to make unit width separate from length
Larger units that would be long and thin, like a ship, or I guess wide but short
-
This could be made possible by the "symbiotic pets" ticket :look:
-
Can't you use cellmaps, they could be only for static units but I'm sure I've used them for something that moves. Here's an example of a uni with 2 width and 4 length:
<size value="4"/> (must be set at maximum width or length which ever is the bigger of the two)
<cellmap value="true">
<row value="0110"/> (0 = where the unit should not be, so in this case the sides of the unit)
<row value="0110"/> (1 = solid parts of the unit)
<row value="0110"/>
<row value="0110"/>
</cellmap>Just imagine cellmaps as the shape of the unit made up of 1s.
-
Unfortunately I don't think cellmaps update as they move..... :look:
-
Unfortunately I don't think cellmaps update as they move..... :look:
Hmm I was worried about that...
-
I think we can all agree that the general idea that a cellmap is the best way of defining the size of a movable multi-cell unit?
-
I think we can all agree that the general idea that a cellmap is the best way of defining the size of a movable multi-cell unit?
Yep.
-
If there's some way to make it work, then sure. I have no idea how it would jive with Glest's cell system, though. For example, what should this cell map look like when the unit is rotated by 15 degrees?
0100
1110
1111
0110
-
Hmmmmmm. I think maybe instead of doing it by cell... The Cell map needs to be an overlay that will take up and tiles it covers. What do you think?
-
Right now moving units can be any size, but are square - they have an implicit cellmap that is all 1s.
The feature request boils down to allowing a moving model to specify a cellmap.
It would be ok for the path-finding to take into account only the unit size and not the shape of the cellmap, and it would be expected that its unlikely that other units can move easily through holes in a cellmap since the random angle means that each cell in the map might occupy more than one tile on the board.
But within those confines, it seems like a very good generalising of the engine and would allow the use-cases given in the original post, namely ships.
-
The problem that caused me to raise this was that I created a gate which can be open or closed. The gap is two wide. I have a war machine (tank) which has size 3 but looks like only one wide
The war machine cannot go through the gate
-
The problem that caused me to raise this was that I created a gate which can be open or closed. The gap is two wide. I have a war machine (tank) which has size 3 but looks like only one wide
The war machine cannot go through the gate
Ah, I believe this would help the ai out with tech. They build a camp and then when it gets big enough some horsemen get trapped because they are size 2.
-
When placing and morphing units, could the cellmap be taken into account as my gatehouses wont open or close if another unit is in one of its 0s even though once it opens or closes that will still be a 0. Same for placing units maybe also don't forget to take into account rotating units before placing them.