about the girder position : allow select the angle
Thu, 2013-09-05 19:11
Currently you can place a girder following certain pre selected position, but sometime you would like to change the position, to adjust the angle but its not possible
actually the way to place a girder is coded like this : PlaceGirder(x, y, state)
where the state is the position
what i propose is to add somethig else that would be the angle : from 0--180° (should be enough too have all the angle)
would give PlaceGirder(x, y, size, angle)
in game how it would be selected for the short or long girder :
up and down arrow for the short or long
and left/right arrow for the angle (you got to see it moving)
that would be usefull and helpfull, BUT i see at least one inconvenient : too easy ...
Tell me
the beachs hogs surfin hedgewars
Yeah, this has come up more than once.
One disadvantage is "too easy", for sure. Also, well, enforces a more "mechanical" appearance w/ multiple girders for girder structures.
The other issue is that the girder code, as written, is using a sprite.
This makes it more attractive than, say, drawing an arbitrary angle like the drawing code does. Was also easier.
That also allows custom girders although that is only used for ice girders right now. (think, wooden beam on nature theme or something)
In order to allow arbitrary angles (or more angles) we'd probably have to take a girder sprite of, say, a horizontal girder, then clip and rotate it as needed ourselves, using hwFloat/ints. That's a bit of work.
We could also generate more angles up front I suppose, at the cost of a bit more memory and needing to tweak the girder code.
We might be able to skip the short vertical and horizontal angles simply with clipping of the copy. We'd probably want to pack the girders a bit more closely if we were generating more angles.
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev