Overgrown Maps

Overgrown Maps

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Overgrown Maps

Post by PicassoCT »

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?
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Overgrown Maps

Post by enetheru »

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.
raaar
Metal Factions Developer
Posts: 1095
Joined: 20 Feb 2010, 12:17

Re: Overgrown Maps

Post by raaar »

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)

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;
...
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:
Image
Attachments
bug_grass_buildings.jpg
grass showing through a factory's building platform
(159.92 KiB) Downloaded 1 time
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Overgrown Maps

Post by FLOZi »

Grass can already be removed, and having units move off factory ramps is easier done by just animating the pad piece.
raaar
Metal Factions Developer
Posts: 1095
Joined: 20 Feb 2010, 12:17

Re: Overgrown Maps

Post by raaar »

ah! grass can be removed? how?
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Overgrown Maps

Post by Jools »

raaar wrote:ah! grass can be removed? how?
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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Overgrown Maps

Post by Forboding Angel »

You can disable it in springsettings.cfg I believe with a grassdetail setting of 0. Untested, going off of memory.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Overgrown Maps

Post by Jools »

Yup, thanks. This works:

Code: Select all

GrassDetail = 0
For reference, because pictures speak more than 1000 words, this is how it looks like:

Image
raaar
Metal Factions Developer
Posts: 1095
Joined: 20 Feb 2010, 12:17

Re: Overgrown Maps

Post by raaar »

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
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Overgrown Maps

Post by Forboding Angel »

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
Last edited by Forboding Angel on 09 Feb 2015, 07:09, edited 1 time in total.
raaar
Metal Factions Developer
Posts: 1095
Joined: 20 Feb 2010, 12:17

Re: Overgrown Maps

Post by raaar »

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:

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
but it takes a few seconds even on my relatively fast processor. It even triggers the hang detection

Code: Select all

[f=0000000] Warning: [Watchdog] Hang detection triggered for Spring 98.0.
map like DSD is 20x10, or roughly 10K*5K size units, meaning 50M iterations!

Tried to use mapSize/Game.squareSize but didn't work.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Overgrown Maps

Post by smoth »

Is there maybe a table where all grass is stored so you don't have to go through all potential locations
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Overgrown Maps

Post by Jools »

raaar wrote:Thanks.

I tried that now and it didn't work, though, not even on the second attempt :/.
This:

Code: Select all

Spring.SendCommands("grassdetail 0")
won't work because it's not a UI command. You can see list of UI commands here: http://springrts.com/wiki/UI_commands (easiest to find that is by remembering url or googling for 'springrts uicommands', don't even try finding it in index :P )

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 :P
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Overgrown Maps

Post by Forboding Angel »

Good call...

Made you a widget that works this time (after starting spring the second time):
gfx_disablegrass.lua
(316 Bytes) Downloaded 22 times
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Overgrown Maps

Post by smoth »

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.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Overgrown Maps

Post by PicassoCT »

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. :)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Overgrown Maps

Post by smoth »

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.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Overgrown Maps

Post by Anarchid »

Shit like this is why i

Code: Select all

chmod -w ~/.springrc
.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Overgrown Maps

Post by FLOZi »

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:

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
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Overgrown Maps

Post by Forboding Angel »

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.
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*

After hearing his explanation as to why, I agree with him btw.
Post Reply

Return to “Map Creation”