Page 1 of 1

changing tides

Posted: 13 May 2010, 20:53
by oksnoop2
Is there any way to raise and lower the water level during a game?

Re: changing tides

Posted: 13 May 2010, 21:35
by PicassoCT
There is a LUA-Script to change the Maps- heightmap in game by zwzsg for a KP-Map, if you would use this, you could simulate the effect.

Re: changing tides

Posted: 13 May 2010, 22:11
by Beherith
Short answer is no. Long answer is yes, but its not worth the trouble.

Re: changing tides

Posted: 13 May 2010, 22:27
by oksnoop2
Hmm it would be cool to see the terrain change. what KP map is it?

Re: changing tides

Posted: 13 May 2010, 22:38
by Beherith
Palladium

Re: changing tides

Posted: 14 May 2010, 01:01
by zwzsg
Changing the water level would mean changing the height of the whole map, and for some unclear reason that is slow.

Re: changing tides

Posted: 14 May 2010, 07:57
by hunterw
zwzsg wrote:Changing the water level would mean changing the height of the whole map, and for some unclear reason that is slow.
the reason is clear, pathing has to be reapplied to the entire map. takes a few seconds, like it does when pathing a map for the first time.

Re: changing tides

Posted: 14 May 2010, 10:06
by zwzsg

Re: changing tides

Posted: 15 May 2010, 04:50
by Google_Frog

Code: Select all

local function RaiseWater( raiseAmount)
	spAdjustHeightMap(0, 0, Game.mapSizeX, Game.mapSizeZ, -raiseAmount)	
end
It's not really that slow. Make your map 12x12 or smaller and the slowdown isn't noticeable.

Re: changing tides

Posted: 15 May 2010, 18:33
by trepan
As I mentioned in the initial post that demo'ed the Lua
heightmap alteration routines, you can spread out the
processing by adjusting the map in segments. As an
example, you could split the map into 8x8 segments,
and process one segment every X number of game frames.
Tides don't move that quickly (even where I live, next to
the highest tidal variations in the world.)

http://springrts.com/phpbb/viewtopic.ph ... 00#p172300

Re: changing tides

Posted: 15 May 2010, 18:55
by trepan
Something that I didn't mention in the initial post is that
you can mitigate the slope changes between segments by
running a smoothing pass along the segment seams after
it has been adjusted. The width of the smoothing segment
would be determined by the slope adjustment that you can
tolerate, and the amount of shift done in the adjustment.

A large area shift + seam smoothing passes is probably the
fastest way to go. The other thing that you might want to
look into is whether or not the water rendering state would
need to be updated for large heightmap changes (ask jk).

Re: changing tides

Posted: 16 May 2010, 09:14
by PicassoCT
trepan wrote: (even where I live, next to
the highest tidal variations in the world.)

Wrong, wrong, the highest tidal variations occur where you live good Sir, and that is not just a coincedence. You create your own gravity field, that attracts all the water, now my company is willing to bid against every other bidder adding up +2000$ on the highest, just to have you near our tidal powerplants. This is a standing offer!

Re: changing tides

Posted: 16 May 2010, 09:56
by Das Bruce
Was that a fat joke?

Re: changing tides

Posted: 16 May 2010, 10:28
by Neddie
Either way it made me laugh.

Re: changing tides

Posted: 19 May 2010, 07:05
by Forboding Angel
Neddie wrote:Either way it made me laugh.
+1 :lol:

Re: changing tides

Posted: 19 May 2010, 07:53
by hunterw
PicassoCT wrote:
trepan wrote: (even where I live, next to
the highest tidal variations in the world.)

Wrong, wrong, the highest tidal variations occur where you live good Sir, and that is not just a coincedence. You create your own gravity field, that attracts all the water, now my company is willing to bid against every other bidder adding up +2000$ on the highest, just to have you near our tidal powerplants. This is a standing offer!
PicassoCT's first foray in to trolling and jokes? :regret:

Re: changing tides

Posted: 23 May 2010, 00:24
by AF
hunterw wrote:
PicassoCT's first foray in to trolling and jokes? :regret:
Trolling? Seemed factually accurate...