Four-directional building placement. - Page 4

Four-directional building placement.

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderators: Moderators, Moderators

How's that for a junior task?

Poll ended at 25 Jul 2006, 21:55

Looks great!
37
86%
Acceptable
5
12%
I think you missed something...
1
2%
 
Total votes: 43

User avatar
Charlemagne
Posts: 174
Joined: 18 Apr 2005, 17:59

Post by Charlemagne »

Could someone host the exe on some other site? The link earlier in the thread doesn't work. I want to test this myself.
0 x

User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Eh
It was basically a complete rewrite (took me 3 hours :shock:). 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?
0 x

Sean Mirrsen
Posts: 578
Joined: 19 Aug 2004, 17:38

Post by Sean Mirrsen »

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.
0 x

espylaub
Posts: 205
Joined: 01 May 2006, 11:35

Post by espylaub »

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?
0 x

Egarwaen
Posts: 1207
Joined: 27 Feb 2006, 21:19

Post by Egarwaen »

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.
Press right shift, hold mouse button, hold ctrl/alt/whatever, hit [ or ] to adjust building direction, use side mouse buttons to adjust spacing.

It's no worse than trying to write code in emacs... ;)
0 x

User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Problem with click-drag is that this is already assigned to a function - building rows of buildings.
0 x

Sean Mirrsen
Posts: 578
Joined: 19 Aug 2004, 17:38

Post by Sean Mirrsen »

And for your convenience, the mappings for building rotation are < and >. It may make you press shift to rotate a single building, but it makes queueing up several rotated ones a lot easier.
0 x

User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

How often do you want to zoom in and out when placing buildings? Not very often I guess, so maybe bind it to the mouse wheel?
0 x

User avatar
AF
AI Developer
Posts: 20671
Joined: 14 Sep 2004, 11:32

Post by AF »

I say we do it populous style and bind it to space.

I think i'd also be a good idea to allow binding a sound to it.
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Post by smoth »

Acidd_UK wrote:How often do you want to zoom in and out when placing buildings? Not very often I guess, so maybe bind it to the mouse wheel?
NO
0 x

User avatar
AF
AI Developer
Posts: 20671
Joined: 14 Sep 2004, 11:32

Post by AF »

+1 @ smoth
0 x

User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Can't we customise key bindings anyway?
0 x

Egarwaen
Posts: 1207
Joined: 27 Feb 2006, 21:19

Post by Egarwaen »

Das Bruce wrote:Can't we customise key bindings anyway?
The magic 8-Peewee says "Answer hazy, try again later."
0 x

User avatar
FoeOfTheBee
Posts: 557
Joined: 12 May 2005, 18:26

Post by FoeOfTheBee »

Make the rotaton C & C Generals-style!
0 x

User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Foe OfTheBee wrote:Make the rotaton C & C Generals-style!
Explain.
0 x

User avatar
FireCrack
Posts: 676
Joined: 19 Jul 2005, 09:33

Post by FireCrack »

Das Bruce wrote:
Foe OfTheBee wrote:Make the rotaton C & C Generals-style!
Explain.

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.
0 x

User avatar
AF
AI Developer
Posts: 20671
Joined: 14 Sep 2004, 11:32

Post by AF »

Cant be done as it interferes with row building
0 x

User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

AF wrote:Cant be done as it interferes with row building
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... :?
0 x

User avatar
FoeOfTheBee
Posts: 557
Joined: 12 May 2005, 18:26

Post by FoeOfTheBee »

FireCrack wrote:
Das Bruce wrote:
Foe OfTheBee wrote:Make the rotaton C & C Generals-style!
Explain.

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.
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.
0 x

Sean Mirrsen
Posts: 578
Joined: 19 Aug 2004, 17:38

Post by Sean Mirrsen »

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..
0 x

Post Reply

Return to “Engine”