Four-directional building placement. - Page 3

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

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

Post by Sean Mirrsen »

More like "getfacing".. although I don't understand what purpose it would serve, once a building is placed, its direction is its heading, like for any other unit.

Yeah, the brackets seem a nice choice... btw, what is the default orientation? I mean, normally? The fact that buildings usually face towards the camera that's facing north, I would assume the buildings are facing south... right?

Also, I'm thinking now, how difficult would it be to add a map SMF tag to define default buildfacing for each starting point? Rather useless, yes, but a nice feature for someone unfamiliar with the rotation ability.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Using the getproperty function, else it'll change the interface class and we'll need to increment the AI interface version and recompile all our AI's again.......
User avatar
Neuralize
Posts: 876
Joined: 17 Aug 2004, 23:15

Post by Neuralize »

So? I think it's worth the trouble to have directional factories :P
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I was just sayign he should use that method instead as it's possibly easier todo, justa dding an extra case: to the switch statement, adn ti means we dotn need to recompile in the next release and we can compile ti into existign AI's so it'll work when the next version coems instead of us all re-releasing tot ake advantage fo enw features.

Also thats what was itnended, when zaphdo adn caina dded those generic functions tot eh callback itnerface.
User avatar
Comp1337
Posts: 2434
Joined: 12 Oct 2005, 17:32

Post by Comp1337 »

AF wrote:Also thats what was itnended, when zaphdo adn caina dded those generic functions tot eh callback itnerface.
You almost AF'd every word!
Sean Mirrsen
Posts: 578
Joined: 19 Aug 2004, 17:38

Post by Sean Mirrsen »

Soon the typos will reach critical mass and cause the forum to implode.
User avatar
Comp1337
Posts: 2434
Joined: 12 Oct 2005, 17:32

Post by Comp1337 »

RFI
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

BUMP

Sean, could you post the patch in mantis so it doesn't get lost? That also allows us to download / apply it locally to take a better look.
Sean Mirrsen
Posts: 578
Joined: 19 Aug 2004, 17:38

Post by Sean Mirrsen »

I'll just fix a few things first.. I've been very distracted from working on it in the last few days...
Sean Mirrsen
Posts: 578
Joined: 19 Aug 2004, 17:38

Post by Sean Mirrsen »

Ok, patch uploaded to mantis, and patched executable uploaded to http://edf.tauniverse.com/spring.exe. You should add binds for "spinbuilddir" and "unspinbuiddir" (unspin.. yeah I know.. :P) for the feature to work. I have set them to "<" and ">", because "[" and "]" don't work when shift is pressed, and the curly brackets cannot be bound to, as well as the dot and comma.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Sean: I reviewed it and put comments on mantis.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

has this not already been committed? =s

I have to change NTai to work with the latest svn build which breaks the current build and vice versa, very annoying. The AI interface should be changed or the code changed to account for existing AI's because this is getting extremely frustrating.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

Sean Mirrsen wrote:Also, I'm thinking now, how difficult would it be to add a map SMF tag to define default buildfacing for each starting point? Rather useless, yes, but a nice feature for someone unfamiliar with the rotation ability.
Instead, I'd rather have the Spring.exe determine which way is the center of the map: When starting the game Spring would determine the angle between start pos and map center, and round it to nearest 90°. Players tend to use "Choose in game" start pos combined with starting area box more than "Fixed" start pos, and that way mappers wouldn't have to worry about adding this new tag.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

I have to change NTai to work with the latest svn build which breaks the current build and vice versa, very annoying. The AI interface should be changed or the code changed to account for existing AI's because this is getting extremely frustrating.
Do you have a solution then? Progress causes changes and the builds of AIs will break from time to time on subversion code, it can hardly be avoided.

However it might help to create a local svn repository (tortoisesvn supports that) and commit the patches to the spring svn every now and then. I've found that works quite nice.
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

Neuralize wrote:So? I think it's worth the trouble to have directional factories :P
Agreed! Gimme 4 directional stuffs! (and make AIs able to use them unlike picking start pos *nudge* *nudge*)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

if you had read the whole thread you'd know that you'd have to add a 4th parameter to build commands specifying their direction aka 0/1/2/3
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Well the old behavior with 3 parameters would still be supported..
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

maybe the svn will get fixed in the process, there's something messing up how AI's build in there atm.
Freder
Posts: 6
Joined: 29 Jul 2006, 19:32

Directionality, Linux and mods

Post by Freder »

I applied the patch to a Linux source tree and it works. A few comments though...

I haven't seen units reorienting in some factories, ie AA 'Kbot Lab' or Gundam factories. It seems that this is factory specific, those that do not rotate the produced units do not have them reoriented properly, although they turn and walk out the right way after being buit. ;-)

There also is an aesthetic issue, some buildings have lets say 'foundations' that stay even after the building is destroyed and reclaimed. Rotating makes them look weird, especially in Gundam (in AA those are logos, so it seems ok that they are always oriented towards the player).

Is this patch going to be included in the next release? That would be great... ;-)

BTW, what is the format of the diff (because it's not GNU diff)?
Sean Mirrsen
Posts: 578
Joined: 19 Aug 2004, 17:38

Post by Sean Mirrsen »

I wasn't able to figure out how to properly rotate the grounddecals yet. As well, I'm having odd problems updating my code, so I'm waiting for JC to put the existing 'somewhat working' code into the SVN so I can re-checkout without losing it.
Post Reply

Return to “Engine”