Overgrown Maps
Moderator: Moderators
Overgrown Maps
Its a thing within a thing.. if you gonna go full , and high decoration, its gonna hide units, and thus the game.
So whats the best way to make high features (Trees, MountainCliffs, Skyscrapers, floating plattforms and spaceships) and still allow for a well playable map - without destroying.
Autohide the feature on hidden behind units?
Two parted Feature, where only the root is continously shown?
Some Futuristic Holo Stuff?
Is there a unsynced call for that, so glsl-man can save the day?
So whats the best way to make high features (Trees, MountainCliffs, Skyscrapers, floating plattforms and spaceships) and still allow for a well playable map - without destroying.
Autohide the feature on hidden behind units?
Two parted Feature, where only the root is continously shown?
Some Futuristic Holo Stuff?
Is there a unsynced call for that, so glsl-man can save the day?
Re: Overgrown Maps
Given no limitations on what is capable, X-ray style rendering unit with some halo to show up above the features. but only for units within your line of sight.
Re: Overgrown Maps
it could be interesting to have units or features be able to work as variable height "ground" for other units.
currently buildings have a footprint, where cells can either be occupied or open. We could have a way to define the ground height for each cell, something like the yardMap attribute, for example, yardHeightModMap.
example:
factory could have a raised platform in the center where stuff is built then goes down a small ramp.
(fbi file definition for a factory with a ramp in center)
It could also be useful to be able to suppress some non-feature map stuff, like grass, below some units. Here's an example of a factory where the grass in the ground below "shoots through" the center platform:

currently buildings have a footprint, where cells can either be occupied or open. We could have a way to define the ground height for each cell, something like the yardMap attribute, for example, yardHeightModMap.
example:
factory could have a raised platform in the center where stuff is built then goes down a small ramp.
(fbi file definition for a factory with a ramp in center)
Code: Select all
...
footprintx=8;
footprintz=8;
yardMap=oooooooo oooooooo ooccccoo ooccccoo ooccccoo ooccccoo ooccccoo ooccccoo;
yardHeightModMap=
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 15 15 15 15 0 0
0 0 15 15 15 15 0 0
0 0 15 15 15 15 0 0
0 0 15 15 15 15 0 0
0 0 10 10 10 10 0 0
0 0 5 5 5 5 0 0;
...
- Attachments
-
- bug_grass_buildings.jpg
- grass showing through a factory's building platform
- (159.92 KiB) Downloaded 1 time
Re: Overgrown Maps
Grass can already be removed, and having units move off factory ramps is easier done by just animating the pad piece.
Re: Overgrown Maps
ah! grass can be removed? how?
Re: Overgrown Maps
I'd also like to know how. Grass currently has ugly artifacts with metal map mode (many of us play in that mode). Is there a setting to disable grass? It's very ugly and clutters the screen.raaar wrote:ah! grass can be removed? how?
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Overgrown Maps
You can disable it in springsettings.cfg I believe with a grassdetail setting of 0. Untested, going off of memory.
Re: Overgrown Maps
Yup, thanks. This works:
For reference, because pictures speak more than 1000 words, this is how it looks like:

Code: Select all
GrassDetail = 0

Re: Overgrown Maps
What i'd like is a way to remove them for all users. Or maybe only below buildings.
searched the wiki and found this.
http://springrts.com/wiki/Lua_SyncedCtrl#Grass
searched the wiki and found this.
http://springrts.com/wiki/Lua_SyncedCtrl#Grass
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Overgrown Maps
Make a widget, spring.sendcommand grassdetail 0 or something like that. You'd need to look up the right syntax, but that's more or less the gist of it.
Include it in game, enabled = true.
Edit: Made you a widget.
Edit2: Removed non-working Widget
Include it in game, enabled = true.
Edit: Made you a widget.
Edit2: Removed non-working Widget
Last edited by Forboding Angel on 09 Feb 2015, 07:09, edited 1 time in total.
Re: Overgrown Maps
Thanks.
I tried that now and it didn't work, though, not even on the second attempt :/.
[EDIT: maybe related to the "(needs ModUICtrl)" warning found here]
[EDIT2: wiki says the default is "true" and i have luaModUICtrl=1, so that's probably not why it didn't work]
Using Spring.RemoveGrass as indicated on the wiki works:
but it takes a few seconds even on my relatively fast processor. It even triggers the hang detection
map like DSD is 20x10, or roughly 10K*5K size units, meaning 50M iterations!
Tried to use mapSize/Game.squareSize but didn't work.
I tried that now and it didn't work, though, not even on the second attempt :/.
[EDIT: maybe related to the "(needs ModUICtrl)" warning found here]
[EDIT2: wiki says the default is "true" and i have luaModUICtrl=1, so that's probably not why it didn't work]
Using Spring.RemoveGrass as indicated on the wiki works:
Code: Select all
xSize = Game.mapSizeX
zSize = Game.mapSizeZ
for x = 0,xSize,1 do
for z = 0,zSize,1 do
Spring.RemoveGrass(x,z)
end
end
Code: Select all
[f=0000000] Warning: [Watchdog] Hang detection triggered for Spring 98.0.
Tried to use mapSize/Game.squareSize but didn't work.
Re: Overgrown Maps
Is there maybe a table where all grass is stored so you don't have to go through all potential locations
Re: Overgrown Maps
This:raaar wrote:Thanks.
I tried that now and it didn't work, though, not even on the second attempt :/.
Code: Select all
Spring.SendCommands("grassdetail 0")

If you want to remove grass, look how the ugly but simple xta options does it:
https://code.google.com/p/xta-springrts ... ns.lua#701
Needs restart.
Edit: Not really sure what GrassDetail = 1 does, it seems it's not really a boolean value. Probably alters how many grass leaves show or something similar. But hey com'on, it's just grass, who cares about how it sways

- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Overgrown Maps
Good call...
Made you a widget that works this time (after starting spring the second time):
Made you a widget that works this time (after starting spring the second time):
Re: Overgrown Maps
This is not good, you are disabling grass for anyone running this map. You are never resetting the value on exit. would be best if you store the player's current settings are then restored them on widget exit. Even still having maps play with user settings is bad imo.
Re: Overgrown Maps
You are just afraid of the next inevitable thing smoth. War of the Coders.
Maps mined with code that kills features from other games.
Widgets that kill all enemy UIs.
It was only a question of time, before RTS-making would become a Meta-RTS. Finally- there is a Spring-game, and to play in it, you got to have a game.
So much defeat, on so many levels. :)
Maps mined with code that kills features from other games.
Widgets that kill all enemy UIs.
It was only a question of time, before RTS-making would become a Meta-RTS. Finally- there is a Spring-game, and to play in it, you got to have a game.
So much defeat, on so many levels. :)
Re: Overgrown Maps
No, I am just mentioning something people are not thinking about. IMO all games should be able to specify their own config file. Relying on a widget to reset the config is dangerous as well, I don't like what could happen in the case of a widget crash in one game. It is going to be fun work to fight that.
Re: Overgrown Maps
Shit like this is why i .
Code: Select all
chmod -w ~/.springrc
Re: Overgrown Maps
Don't abuse it to remove all grass ffs.
If you want to see no grass, disable it in your settings.
If you want to remove grass under factories, provide a helpful patch to your favourite game developer to implement this.
edit: blah:
If you want to see no grass, disable it in your settings.
If you want to remove grass under factories, provide a helpful patch to your favourite game developer to implement this.
edit: blah:
Code: Select all
function RemoveGrassSquare(x, z, r)
local startX = math.floor(x - r/2)
local startZ = math.floor(z - r/2)
for i = 0, r, Game.squareSize * 4 do
for j = 0, r, Game.squareSize * 4 do
--Spring.Echo(startX + i, startZ + j)
Spring.RemoveGrass((startX + i)/Game.squareSize, (startZ + j)/Game.squareSize)
end
end
end
GG.RemoveGrassSquare = RemoveGrassSquare
function RemoveGrassCircle(cx, cz, r)
local r2 = r * r
for z = 0, 2 * r, Game.squareSize * 4 do -- top to bottom diameter
local lineLength = math.sqrt(r2 - (r - z) ^ 2)
for x = -lineLength, lineLength, Game.squareSize * 4 do
Spring.RemoveGrass((cx + x)/Game.squareSize, (cz + z - r)/Game.squareSize)
end
end
end
GG.RemoveGrassCircle = RemoveGrassCircle
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Overgrown Maps
According to JK's past statements, due to the way grass is done, everyone should always have grassdetail on 0, so I suppose you could consider it a public service. *shrug*smoth wrote:This is not good, you are disabling grass for anyone running this map. You are never resetting the value on exit. would be best if you store the player's current settings are then restored them on widget exit. Even still having maps play with user settings is bad imo.
After hearing his explanation as to why, I agree with him btw.