Author Topic: Building Rotation  (Read 3391 times)

ImUmPh

  • Guest
Building Rotation
« on: 7 October 2009, 06:52:56 »
Hello! I wanna ask something ??? ! Could the building has a rotate skill??

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Building Rotation
« Reply #1 on: 7 October 2009, 07:45:20 »
Do you mean? Can the building rotate, no it can't.
Egypt Remastered!

Proof: Owner of glest@mail.com

ImUmPh

  • Guest
Re: Building Rotation
« Reply #2 on: 7 October 2009, 09:22:37 »
Do you mean? Can the building rotate, no it can't.

Yapp. That's what I mean.
Could I make it?

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Building Rotation
« Reply #3 on: 7 October 2009, 11:30:00 »
There's a discussion somewhere on why it hasn't been done yet; something to do with the tiles. You could try if you know C++.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Mark

  • Guest
Re: Building Rotation
« Reply #4 on: 7 October 2009, 22:25:14 »
It can not rotate on its own, but if it has an attack skill it will rotate to face its adversaries, and stay that way.

ImUmPh

  • Guest
Re: Building Rotation
« Reply #5 on: 8 October 2009, 01:24:55 »
There's a discussion somewhere on why it hasn't been done yet; something to do with the tiles. You could try if you know C++.

Where I can found it??

It can not rotate on its own, but if it has an attack skill it will rotate to face its adversaries, and stay that way.

How about new building that can rotate?

ImUmPh

  • Guest
Re: Building Rotation
« Reply #6 on: 26 October 2009, 01:50:04 »
Where I can start make some function for rotate building? Please help!!!   ??? ??? ???

Zoythrus

  • Guest
Re: Building Rotation
« Reply #7 on: 28 October 2009, 22:51:02 »
why cant you just do what "Spring" does? when you press the [] buttons, the buildings rotate (but only at 90 degree angles)

modman

  • Guest
Re: Building Rotation
« Reply #8 on: 29 October 2009, 01:51:27 »
Quote
why cant you just do what "Spring" does? when you press the [] buttons, the buildings rotate (but only at 90 degree angles)
Something like this is in the works for the coders.  The problem is that it is seemingly at the end of a very long queue line.

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Building Rotation
« Reply #9 on: 2 November 2009, 12:40:48 »
Where I can start make some function for rotate building? Please help!!!   ??? ??? ???

Wherever you like. You will need to add a variable to Unit indicating rotation, you will need a function to rotate cell maps and lots of code in all sorts of places to check a buildings rotation and use a rotated cell map accordingly.  You will need to add code to Gui (and other related classes) to allow the human player to actually rotate a building before they place it, and you will need to add code to the Renderer to check rotation and rotate the model before drawing.

In short, you will first need to know how the Engine currently does what it does... that will take a while.

Quote
why cant you just do what "Spring" does? when you press the [] buttons, the buildings rotate (but only at 90 degree angles)
Something like this is in the works for the coders.  The problem is that it is seemingly at the end of a very long queue line.

I need(ed) it for shipyards, but the problem I think Hailstone was alluding to with Tiles Vs Cells means it would be pointless to continue at this time. Height data is only stored on a per tile basis, so 'flattening' terrain for a shipyard can not be done without the very real possibility of such flattening either raising the cells where a shipyard would have been able to spawn ships, such that it can't, or lowering cells that the shipyard unit xml says should be on land to the point that it is below water.

For the record, it will work as it apparently does in spring, rotations of 90 degrees only.  But it is unlikely to happen until a new map format is introduced... or significant work is done to support it with the current format (which I'm not willing to do, so a new map format would seem to be a pre-requisite).
Glest Advanced Engine - Code Monkey

Timeline | Downloads

ElimiNator

  • Airship
  • ********
  • Posts: 3,391
  • The MegaGlest Moder.
    • View Profile
Re: Building Rotation
« Reply #10 on: 2 November 2009, 16:28:18 »
It shouldn't be hard for some one who knows the Engine to add it because the tile map models rotate like trees and rocks.
Get the Vbros': Packs 1, 2, 3, 4, and 5!

ImUmPh

  • Guest
Re: Building Rotation
« Reply #11 on: 4 November 2009, 08:09:30 »
Thanks Guys for helping!!  :D :D :D

My problem has solved by add a skill type, command type, and make some code in unit updater also in the xml.

Glest is awesome game...!!
Great!!
God Job..  ;D ;D ;D

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Building Rotation
« Reply #12 on: 4 November 2009, 14:02:34 »
Any chance of a patch to show how its done?
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Building Rotation
« Reply #13 on: 8 November 2009, 11:20:58 »
One question: What's the point of rotating an already built building (as can only be done by a skill/command). The ability to rotate a building when choosing where to build it would be great, but what's this supposed to be used for?!?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Zoythrus

  • Guest
Re: Building Rotation
« Reply #14 on: 9 November 2009, 22:12:48 »
just in case you have nowhere else to put it except in front of a tree that would block the entrance...

 

anything