Rotatable Features with Featuremap
Moderator: Moderators
-
- Posts: 179
- Joined: 17 Jul 2007, 00:52
Rotatable Features with Featuremap
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?
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?
Re: Rotatable Features with Featuremap
Text file would win much more.
-
- Posts: 179
- Joined: 17 Jul 2007, 00:52
Re: Rotatable Features with Featuremap
Sure,
but the idea was to minimize the needed codechanges, and to keep old files compatible
but the idea was to minimize the needed codechanges, and to keep old files compatible

Re: Rotatable Features with Featuremap
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.
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.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Rotatable Features with Featuremap
*Clears Throat*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.
Worldbuilder.
/Thread
Re: Rotatable Features with Featuremap
Heh. Yes. Easy.
-
- Posts: 179
- Joined: 17 Jul 2007, 00:52
Re: Rotatable Features with Featuremap
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
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
Re: Rotatable Features with Featuremap
Spring.SetFeatureDirection(id, x, y, z) 

-
- Posts: 179
- Joined: 17 Jul 2007, 00:52
Re: Rotatable Features with Featuremap
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.
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.
Re: Rotatable Features with Featuremap
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.
-
- Posts: 179
- Joined: 17 Jul 2007, 00:52
Re: Rotatable Features with Featuremap
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
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
Re: Rotatable Features with Featuremap
hey, that's actually really neat!
Re: Rotatable Features with Featuremap
Hey, what did you just do? make an engine? or a mapmaker? how long did you take? what language did you use?
Re: Rotatable Features with Featuremap
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.
Re: Rotatable Features with Featuremap
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'.
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'.
-
- Posts: 179
- Joined: 17 Jul 2007, 00:52
Re: Rotatable Features with Featuremap
1. mapmakerHoi wrote:Hey, what did you just do? make an engine? or a mapmaker? how long did you take? what language did you use?
2. around 2 weeks
3. java (yes, its actually not toooo slow)
Good to know. So no changes to the mapformat needed. :)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.
Thx, I will look at it. Will be better anyway.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'.
Main reason to not directly export to smf was the "tile detection", which I think is complex. (May check it again)
Re: Rotatable Features with Featuremap
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.
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: Rotatable Features with Featuremap
Wow, very cool!