Author Topic: [done] Request: map object (g3d) orientation options  (Read 3046 times)

Mr War

  • Guest
[done] Request: map object (g3d) orientation options
« on: 21 June 2011, 03:22:58 »
I'd like to put this request forward for consideration. Related thread https://forum.megaglest.org/index.php?topic=7294.0

Map objects like trees are automatically rotated. This makes sense and works well on glest, particularly as maps are generally rural. However as we explore scifi settings, using maps to represent man made structures like townscapes or space bases, there are times when it'd actually look better if certain items were aligned to the grid. This would make wall-like structures and houses lining streets look better.

So if it's not too difficult or counterproductive, I'd like to request that the Modder can override the rotation in the XML for specified object types.

If possible maybe even set permissible rotation increments in degrees or radians whatever? Ie 1 allows 360 degrees of increments, 90 allows 4 increments and 360 only allows 1 so always faces same way. But however it's done, what I'm wishing for amounts to some degree of configuration of the rotation component in the tile set XML.

« Last Edit: 22 June 2011, 22:02:52 by titi »

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Request: map object (g3d) orientation options
« Reply #1 on: 21 June 2011, 13:57:05 »
Thats a good idea! I think I will add it in the tileset , specific for every model used like the tileset particles.

So just a boolean saying rotate=false right?
« Last Edit: 21 June 2011, 14:04:21 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Request: map object (g3d) orientation options
« Reply #2 on: 21 June 2011, 14:17:00 »
The same syntax as configuring if a building can rotate in unit xml?

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Request: map object (g3d) orientation options
« Reply #3 on: 21 June 2011, 19:40:42 »
yes?
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Request: map object (g3d) orientation options
« Reply #4 on: 21 June 2011, 19:49:32 »
I just meant that the syntax should be the same in those two places

Mr War

  • Guest
Re: Request: map object (g3d) orientation options
« Reply #5 on: 21 June 2011, 22:45:01 »
ThNks guys this will be cool. The default ought to still be autorotate for backwards compatibility :D

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Request: map object (g3d) orientation options
« Reply #6 on: 22 June 2011, 22:02:22 »
its in svn now
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

Mr War

  • Guest
Re: [done] Request: map object (g3d) orientation options
« Reply #7 on: 22 June 2011, 22:21:08 »
Thanks man, much appreciated. What's the syntax to use?

Might be a few days before I can test it, but eagerly awaiting that moment.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: [done] Request: map object (g3d) orientation options
« Reply #8 on: 23 June 2011, 08:37:28 »
In general we try to keep the wikia up to date: ( and please force us to do so, or even better do it for us   ;) )
https://docs.megaglest.org/MG/Tileset_XML

Code: [Select]
<model path="models/tree.g3d">
<particles value="true">
<particle-file path="models/tree_particles.xml"/>
</particles>
<rotationAllowed value="true" />                      <!---------------- this! -->
</model>

« Last Edit: 18 June 2016, 18:41:18 by filux »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: [done] Request: map object (g3d) orientation options
« Reply #9 on: 23 June 2011, 09:02:22 »
The default, if the tag is omitted, is still 'true'?

I updated the wiki saying it was so..

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: [done] Request: map object (g3d) orientation options
« Reply #10 on: 23 June 2011, 09:19:47 »
yes default is true
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: [done] Request: map object (g3d) orientation options
« Reply #11 on: 23 June 2011, 13:10:46 »
Awesome, Thanks! I could really use this for city maps! Its was a great idea to have rotation true false per model instead of object.

Btw: What about having an option to randomly rotate by 90 degrees? So it would be randomly rotated but aligned to the grid? If its not a pain to implement...
« Last Edit: 24 June 2011, 19:56:10 by Ishmaru »
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Mr War

  • Guest
Re: [done] Request: map object (g3d) orientation options
« Reply #12 on: 27 June 2011, 19:47:46 »
Is there somewhere where the SVNs are in exe format? I'm not sure how to compile the SVNs.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: [done] Request: map object (g3d) orientation options
« Reply #13 on: 27 June 2011, 20:43:22 »
Is there somewhere where the SVNs are in exe format? I'm not sure how to compile the SVNs.
Windows Compiling on the Glest Wiki
« Last Edit: 18 June 2016, 18:30:04 by filux »
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: [done] Request: map object (g3d) orientation options
« Reply #14 on: 27 June 2011, 20:54:36 »
Is there somewhere where the SVNs are in exe format? I'm not sure how to compile the SVNs.
Windows Compiling on the Glest Wiki

This is completely inappropriate for someone who is not a programmer.

Is no-one building MSIs or something from the trunk?  How else are things ever tested?
« Last Edit: 18 June 2016, 18:29:51 by filux »

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: [done] Request: map object (g3d) orientation options
« Reply #15 on: 27 June 2011, 21:08:06 »
I think ultifd mainly is our Windows tester , maybe he can?
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: [done] Request: map object (g3d) orientation options
« Reply #16 on: 28 June 2011, 09:01:50 »
Yep it's me, basically. Although I think occasionally at times some of the Vbros familly uses windows.
This is completely inappropriate for someone who is not a programmer.
That's isn't true...

Anyways, here ya go. Just PM next time.
http://www.mediafire.com/?bgdoof92bl6zo4x

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: [done] Request: map object (g3d) orientation options
« Reply #17 on: 28 June 2011, 09:14:03 »
That's isn't true...

well you start explaining what visual studio is, how to get it, how to open the command prompt and what to do... :rolleyes:

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: [done] Request: map object (g3d) orientation options
« Reply #18 on: 28 June 2011, 16:37:07 »
To compile mg on Windows, from scratch a user would:

a) Install Visual Studio Express 2008 (2010 would work if we updated those project files)
b) Install Sliksvn
c) Open a Dos Prompt and Run:

Code: [Select]
cd \
mkdir Code
cd Code
mkdir megaglest
cd megaglest
svn co https://megaglest.svn.sourceforge.net/svnroot/megaglest/trunk trunk
d) Download:

http://sourceforge.net/projects/megaglest/files/win32_deps.7z/download

and extract it in the folder: c:\Code\megaglest\source (so that you now see the folder c:\Code\megaglest\source\win32_deps\)

e) Open a Dos Prompt and Run:

Code: [Select]
cd \Code\megaglest\trunk\mk\windows
build-mg

If all goes well the exe is located in:

Code: [Select]
\Code\megaglest\trunk\data\glkest\game\megaglest.exe
Anyone who can do these steps without getting confused should be able to build their own binaries (as ultifd does)

Thanks

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: [done] Request: map object (g3d) orientation options
« Reply #19 on: 28 June 2011, 19:19:59 »
(2010 would work if we updated those project files)
It may be able to work since the projects are usually backwards compatible. I compile GAE on VS 2010, and haven't really noticed any difference between how 2008 and 2010 work.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: [done] Request: map object (g3d) orientation options
« Reply #20 on: 29 June 2011, 00:32:17 »
well you start explaining what visual studio is, how to get it, how to open the command prompt and what to do...
I'm rolling my eyes...  ::)
The link for VS is included at the wiki, and after they place the dependencies all they need to do run the batch file.

Mr War

  • Guest
Re: [done] Request: map object (g3d) orientation options
« Reply #21 on: 6 August 2011, 10:29:30 »
This new feature works great in latest alpha, but new issue becomes apparent. Is there some sort of automatic offset logic so that trees are not all in centre of a tile?

It'd be great to be able to turn that off also so that we can have neatly aligned walls etc.

 

anything