Four-directional building placement. - Page 2

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.

Moderator: 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
Zenka
Posts: 1235
Joined: 05 Oct 2005, 15:29

Post by Zenka »

Das Bruce wrote:Let me have your babies! :P
Ah good. You won't have mine then any more (last time you asked) ;)

Great job Sean Mirrsen. Nothing is perfect in one go.
We all appriciate your effort in giving us this lovely option ^.^
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Zenka wrote:
Das Bruce wrote:Let me have your babies! :P
Ah good. You won't have mine then any more (last time you asked) ;)

Great job Sean Mirrsen. Nothing is perfect in one go.
We all appriciate your effort in giving us this lovely option ^.^
When did I ask for your babies?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

That AI stuff is utter nonsense. We have access to the same command structure in AI's and we use the same methods fo creating commands onyl they get sent to the AI itnerface where they're then rerouted towards your code.

currently we use the 3 parameters x,y,z co-ordinates, but adding a 4th would be as trivila as adding c.push_back(direction); to the very end.

Any command the user cans end that can be represented as a command object can be sent by the AI too and it will work as they both use the same code to get executed.

Considering that, would adding a 4th parameter right now affect AI's so that we can prepare for when the next release comes with this in it? Or would it break construction in the current release.

btw factories beign given move comamnds and the built units moving out, would that work fi a factory was given a move command by the AI?
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

currently we use the 3 parameters x,y,z co-ordinates, but adding a 4th would be as trivila as adding c.push_back(direction); to the very end.
That's the point, if spring itself assumes 4 parameters you break the current AI code.
And just to clarify, JC, what was that you wanted me to do with buildFacing? Replace it with a buildInfo struct read from the same unitDef? Or what?
The buildInfo struct would not be part of the unitdef, it would be created by the GUIhandler. Anyway, the important thing is that you replace using the UnitDef::xsize as temp variables by something clean (Which involves not using UnitDef for temporary data). Anyway, Tobi knows what I mean probably :) I have no good internet access currently, so you'll have to send the patch to him anyway.
User avatar
clericvash
Posts: 1394
Joined: 05 Oct 2004, 01:05

Post by clericvash »

I like the look of it :)
User avatar
unpossible
Posts: 871
Joined: 10 May 2005, 19:24

Post by unpossible »

this is the hawt secx. awesome job
Sean Mirrsen
Posts: 578
Joined: 19 Aug 2004, 17:38

Post by Sean Mirrsen »

JC, you mean like something I did where unitDef was const, declaring local xsize and ysize integers and setting their value instead of unitdef's sizes?
User avatar
Neuralize
Posts: 876
Joined: 17 Aug 2004, 23:15

Post by Neuralize »

We were told this couldn't be done, and then from the shadows came Sean, and with him a great gift.
Sean Mirrsen
Posts: 578
Joined: 19 Aug 2004, 17:38

Post by Sean Mirrsen »

I just felt like going "zwzsg mode" and tackle on an impossible task. ;) This project's quite a ways from being finished though, and that's where I don't qualify - you should have seen my "advanced zombie attack simulator", that now lies unfinished somewhere, still lacking the city generator part and a proper UI... along with many other projects...
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

Do units built by a rotated factory face the correct way?
Sean Mirrsen
Posts: 578
Joined: 19 Aug 2004, 17:38

Post by Sean Mirrsen »

That's a rather pointless question, since most TA-related factories spin the units they build. In any case, yes, the units do face the correct way, they even receive the correct move order after being built.

Features are also built correctly, and generated correctly after the unit dies. A problem surfaces however, when a rotated building's corpse is resurrected - at which point it tends to orient to some one direction... which is weird.
Theotherguy
Posts: 79
Joined: 11 Jul 2005, 02:01

Post by Theotherguy »

yay! now I can finally make good LLT defense lines, and people playing in the south will no longer have a disadvantage! I love you!
Arco
Posts: 75
Joined: 17 Jun 2006, 16:28

Post by Arco »

Theotherguy wrote:yay! now I can finally make good LLT defense lines, and people playing in the south will no longer have a disadvantage! I love you!
While it's still a little bit of a hassle, you could always just jump into each turret and manually point the gun where you want it. While mobile units return to their default orientation after a while, I don't think any turret structures do. Granted this doesn't make a big difference with LLTs, but it's a big help with Guardians/Punishers and LRPCs.

Factory rotation is where the real boost is from this ability.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

Great work, Sean. Really helpful.

I must have missed it somewhere among this thread, but what are the default keypresses for rotating a building? I was thinking the middle mouse button, (only when placing buildings, otherwise it turns the camera into freeform mode).
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Warlord Zsinj wrote:Great work, Sean. Really helpful.

I must have missed it somewhere among this thread, but what are the default keypresses for rotating a building? I was thinking the middle mouse button, (only when placing buildings, otherwise it turns the camera into freeform mode).
Or not, I like to be able to look around when placing buildings.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

SPACEBAR!
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

:arrow: me likes the idea of a simpler "hold-and-click".
User avatar
unpossible
Posts: 871
Joined: 10 May 2005, 19:24

Post by unpossible »

time for some very large gun emplacements that can only fire in a 90 degree arc...
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Are [ and ] currently mapped to anything? They'd be a logical choice for default keys.

Oh, nice work. I have no idea how complex it actually was since I'm inept, but it'll be a great feature.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

remember to add an "getdirection(int unit)" to the ai interface then
Post Reply

Return to “Engine”