Four-directional building placement.
Moderator: Moderators
- Charlemagne
- Posts: 174
- Joined: 18 Apr 2005, 17:59
Eh
It was basically a complete rewrite (took me 3 hours ). However the fact that you found the path for me already speed it up a lot. Now I just had to replace code at those points.
I hope you agree with me that the temporary changing of xsize/ysize and storing the size in rxsize/rysize, all the switches, was really too much hacking.
Ground decals are probably still not rotated (haven't checked), and nanoparticle origins are not rotated either. I don't remember you mentioning the last one, but I assume this was the case in your original code too?
It was basically a complete rewrite (took me 3 hours ). However the fact that you found the path for me already speed it up a lot. Now I just had to replace code at those points.
I hope you agree with me that the temporary changing of xsize/ysize and storing the size in rxsize/rysize, all the switches, was really too much hacking.
Ground decals are probably still not rotated (haven't checked), and nanoparticle origins are not rotated either. I don't remember you mentioning the last one, but I assume this was the case in your original code too?
-
- Posts: 578
- Joined: 19 Aug 2004, 17:38
Hacking xsize and ysize wasn't strictly necessary, but having 5 yardmaps was - it's a lot better to set the primary one to one of the secondaries at unit's creation than having to check for the direction every time a yardmap is needed. A (somewhat) better way would be to have xsize, ysize, and yardmap as arrays that could be read like "yardmap[buildFacing] as needed, but I didn't get to doing that.
So, you did it then? Implemented the stuff into the SVN? I dunno about nanopieces, but built units seemed to have problems in rotated factories (btw, I don't know why would the nanopieces get offset... they only need the location, not the direction... hm.. I'll have to check the cob processing routines later), and I have a theoretical way to rotate decals. Basically, you need to do the same thing I did to yardmaps, but more complex because you have to generate four vertices in a certain sequence.
So, you did it then? Implemented the stuff into the SVN? I dunno about nanopieces, but built units seemed to have problems in rotated factories (btw, I don't know why would the nanopieces get offset... they only need the location, not the direction... hm.. I'll have to check the cob processing routines later), and I have a theoretical way to rotate decals. Basically, you need to do the same thing I did to yardmaps, but more complex because you have to generate four vertices in a certain sequence.
Let me just repeat how utterly cool this is :D Thanks a lot!
Personally I'd prefer orienting the buildings with click and hold, just like you do with groups of units. Its more accurate, more intuitive and generally less of a hassle. In addition, how would I place and rotate a group of buildings if the rotation keys were [ and ]? I'd need three hands. Same with queues.
Uh, how is the placing of groups handled anyway?
Personally I'd prefer orienting the buildings with click and hold, just like you do with groups of units. Its more accurate, more intuitive and generally less of a hassle. In addition, how would I place and rotate a group of buildings if the rotation keys were [ and ]? I'd need three hands. Same with queues.
Uh, how is the placing of groups handled anyway?
Press right shift, hold mouse button, hold ctrl/alt/whatever, hit [ or ] to adjust building direction, use side mouse buttons to adjust spacing.espylaub wrote:In addition, how would I place and rotate a group of buildings if the rotation keys were [ and ]? I'd need three hands. Same with queues.
It's no worse than trying to write code in emacs...
-
- Posts: 578
- Joined: 19 Aug 2004, 17:38
Not necissarily, we could have it click and drag a small distance ( within the building ) and have it face at right angles to the imaginary line you've just made, and then if you dragged it outside the building it would continue into a line build. Think RTW sorta, I think...AF wrote:Cant be done as it interferes with row building
- FoeOfTheBee
- Posts: 557
- Joined: 12 May 2005, 18:26
I'd have it with the left mouse button, but having only four possible directions doesn't make it less useful. The ghost building would change direction depending on where you dragged to, then if you push shift the direction gets set and you can build a line normally, or uf you just release the mous button construction starts.FireCrack wrote:Das Bruce wrote:Explain.Foe OfTheBee wrote:Make the rotaton C & C Generals-style!
In CNC generals you would right click where you wanted the building and drag towards the direction you wanted it facing.
This only has 4 possible directions, so i vote no.
-
- Posts: 578
- Joined: 19 Aug 2004, 17:38
Guys, with the current building possibilities, the hotkeys are the only acceptable way. How are you planning to rotate buildings as you place down rows of them? Or squares, or anything else?
Btw, I think we need to add this functionality to the "surround building" key combo, so that the buildings will orient outwards automatically, or inwards when rotated. It's going to be hard though..
Btw, I think we need to add this functionality to the "surround building" key combo, so that the buildings will orient outwards automatically, or inwards when rotated. It's going to be hard though..