about the girder position : allow select the angle

1 reply [Last post]
sphrix
sphrix's picture
User offline. Last seen 1 week 6 days ago. Offline
Joined: 2011-04-07
Posts: 207

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

nemo
nemo's picture
User offline. Last seen 18 weeks 3 days ago. Offline
Joined: 2009-01-28
Posts: 1861

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

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]