Rotatable Features with Featuremap

Rotatable Features with Featuremap

Requests for features in the spring code.

Moderator: Moderators

Post Reply
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Rotatable Features with Featuremap

Post by Frostregen »

When placing features it looks a bit strange if all face the same direction, so I thought it would be good, if we are able to rotate them (around the upward axis).

Idea:
If a feature is placed on a spot, there cannot be a tree or geovent.
So:
If (red > 0)
green means rotation of feature (0-255)
else
tree/geovent meaning

That would just be the mapping part though.
I have no idea about needed changed in mapconv/mapformat.
The changes required to actually rotate a feature ingame would be rather simple (one glRotate).

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

Re: Rotatable Features with Featuremap

Post by Das Bruce »

Text file would win much more.
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: Rotatable Features with Featuremap

Post by Frostregen »

Sure,
but the idea was to minimize the needed codechanges, and to keep old files compatible ;)
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Rotatable Features with Featuremap

Post by SinbadEV »

I'm still waiting for a new map format that reads everything from a plain-text file... it could be identical to the current map format essentially... and you would still need to make a compressed tile file for it... and it shouldn't be any bigger since text files compress really efficiently.

edit: actually I'm a genius! someone do this.

edit2: oh, and if you populate your features using LUA you could get the effect you are looking for already.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Rotatable Features with Featuremap

Post by Forboding Angel »

SinbadEV wrote:I'm still waiting for a new map format that reads everything from a plain-text file... it could be identical to the current map format essentially... and you would still need to make a compressed tile file for it... and it shouldn't be any bigger since text files compress really efficiently.

edit: actually I'm a genius! someone do this.

edit2: oh, and if you populate your features using LUA you could get the effect you are looking for already.
*Clears Throat*

Worldbuilder.

/Thread
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Rotatable Features with Featuremap

Post by Argh »

Heh. Yes. Easy.
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: Rotatable Features with Featuremap

Post by Frostregen »

Sounds reasonable with LUA.
So I just write an importer myself, based on textfiles, or whatever.

Now I just need a way to get this importer skript attached to the map.
*searching*

Thx so far,
Frostregen
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Rotatable Features with Featuremap

Post by Kloot »

Spring.SetFeatureDirection(id, x, y, z) ;)
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: Rotatable Features with Featuremap

Post by Frostregen »

Thx, the lua stuff itself is not the problem.
I'm searching how to integrate it into the map.

There are 2 words which confuse me:
"LuaRules" and "LuaGaia".
Is this something different?

LuaRules seems to be just a "LuaRules" Folder inside the map archive,
filled with lua scripts.
For LuaGaia I have not found any further info, besides the note in the FAQ.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Rotatable Features with Featuremap

Post by imbaczek »

there's as of yet unreleased WorldBuilder which does pretty much exactly what you want and probably more, I suggest you wait a little while until Argh releases it.
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: Rotatable Features with Featuremap

Post by Frostregen »

I read about Worldbuilder, and yes, it looks similar to what I am doing.
But since this is mainly for my personal fun, I will continue anyway ;)
(Maybe it will still be somehow useful in the end)

If someone is interested: My developement log in pictures:
http://saddam.ath.cx/springedit.html

Greetings,
Frostregen
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Rotatable Features with Featuremap

Post by imbaczek »

hey, that's actually really neat!
User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: Rotatable Features with Featuremap

Post by Hoi »

Hey, what did you just do? make an engine? or a mapmaker? how long did you take? what language did you use?
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Rotatable Features with Featuremap

Post by SinbadEV »

If you are going so far as to make an editor I'd suggest investigating the map format itself and learning how to save (or even load) the spring map format as it includes the ability to place features with rotation it's just that no map converter supported this feature.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Rotatable Features with Featuremap

Post by Tobi »

Cool stuff ^^

Good chance you already found it, but here is the SMF map format defined and documented.

Features do have a rotation indeed, search for 'MapFeatureStruct'.
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: Rotatable Features with Featuremap

Post by Frostregen »

Hoi wrote:Hey, what did you just do? make an engine? or a mapmaker? how long did you take? what language did you use?
1. mapmaker
2. around 2 weeks
3. java (yes, its actually not toooo slow)
SinbadEV wrote:If you are going so far as to make an editor I'd suggest investigating the map format itself and learning how to save (or even load) the spring map format as it includes the ability to place features with rotation it's just that no map converter supported this feature.
Good to know. So no changes to the mapformat needed. :)
Tobi wrote:Cool stuff ^^
Good chance you already found it, but here is the SMF map format defined and documented.
Features do have a rotation indeed, search for 'MapFeatureStruct'.
Thx, I will look at it. Will be better anyway.
Main reason to not directly export to smf was the "tile detection", which I think is complex. (May check it again)
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Rotatable Features with Featuremap

Post by imbaczek »

re tiling: Don't do any, it sucks anyway, most mappers don't use it since it looks really bad. Just save tiles as a grid, maybe with checking for dupes.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Rotatable Features with Featuremap

Post by Warlord Zsinj »

Wow, very cool!
Post Reply

Return to “Feature Requests”