Currently Online

Latest Posts

Topic: Attempting lava-stone1 and lava-stone2; plus some ideas

Astuur
Avatar
Joined: 2009-02-28, 10:08
Posts: 733
Ranking
One Elder of Players
Location: Frankfurt / Germany
Posted at: 2011-10-25, 13:32

Starting out from our current lava set of tiles in blackland (lava, lava-stone1 and lava-stone2)
I tried to interpret how this division is used by most maps.
(their use inside the random map generation process is different, more random, and for the moment
does not factor in here.)
I found, that most maps use these tiles like this:

  • lava: a fluid boiling substance, mostly inside craters.
  • lava-stone1: a still very hot, partly liquid substance that flows and forms stone that are carried away downhill.
  • lava-stone2: a stagnant mass consisting predominantly of hot stone, that forms cracks and opens the view to the underlying, still glowing lava.

I think this functional division is a useful one.
So I tried to improve the optical representation of these concepts.

Lava tiles:

I failed to come up with anything better than what we have.
I have experimented with a simulated upward thrusting movement (like boiling) and also with some
lava bombs being ejcted, but in the end had to give up.
The continous repetition of an non-dislocated, but moving pattern, while attempting not to show the
tiles too clearly, gave very unsatisfying results.
Anything I tried, just looked ridiculous, mostly because any visible "action" happens at all the tiles
at exactly the same time.
This could be overcome by creating 2 or more different lava tiles with their animation each
at a different time offset, but even a thoughtful placing of such tiles, still did not show
convincing results. Besides, we are limited to 16 terrain types and have exhausted that limit.
Also, of course, if you would want some action (like a lava bubble) to happen, let's say
every 30 seconds, you would need a sequence of pictures to fill 30 seconds at least.
With a framerate near 10 fps (in order not to degrade the animation to a slide show) this
would result in huge increase of files.
So,I think we must stay with the amorphous lava that we now have.
At least it gives the impression of "boiling" in a way, and it hides the tiles' borders quite well.

Lava-stone1: When trying to show a flow of lava, some things seemed important to me from the visual aspect:

  • Forming stones as cold patches must flow slower than underlying hot lava.
  • There should be a credible illusion that symbolizes adding new stones at the lower end of the lava flow.
  • The lava movement, though perceived as a constant flow mainly, should, in parts, show waves of lava, that wash over
    and consume stagnant patches.

I found some of it could be done to some extent by multiple layers using alpha channel transparency.
The time loop and the seamless tiling severely limit the available options and require a full shifting cycle in 64 steps (tiles are 64 x 64). It still is not perfect. One of the "jumps" is just the repeating animated gif, but the other one is inside the animation.
I have not managed to get this really "seamless" in both time and geometry. (see below).


lava-stone2

You can also see them above. It's the terrain with the firery cracks
It's a simple animation since lava-stone2 is stagnant. This could immediately replace the existing tiles, if agreed upon.

About animation

Flowing lava would be the first terrain that shows a direction when moving on the map.
In that sense it could also be seen as a model for other possible terrain additions like
rivers, glaciers,and landslides etc.
All these additions are currently not really possible. So, at best, look at the animation above as a conceptional study.
It shows what can be achieved without a change of code.
Even that will not enter the game, since a lava flow to the south-west must be accompanied
by similar flows in other directions and the 16 terrain type limitation forbids this.
Adding code to mirror and rotate the lava-stone1 tiles, may however be possible within that boundry.
A final, proper solution for a less static landscape will however not only break that 16 terrain boundry, but possibly also require some sort of scripting for terrain tiles.

Having that would allow timed low frequency incidents (like a geysir, a vulcano eruption, a landslide)
I am uncertain how much could be done with LUA in this respect, but the Atlantean campaign seems to prove that changing the map within the game is quite possible.

In the end all this is a question of how much work the coders (or one of them) like to invest in things that are pure eye candy. Since only they will be able to estimate this, I will leave this question open.
Maybe our programmers want to comment on this?

Edited: 2011-10-25, 16:53

Being no programmer, I apologize for all my suggestions that imply undue workload and for other misjudgements due to lack of expertise or relevant skills.
I am on Win32, have no means to compile, and rely on prefabricated distributions (Thanks to Tino).

Top Quote
chuckw
Avatar
Joined: 2010-03-15, 16:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2011-10-25, 15:49

@Astuur I like what you are attempting and your results so far.

I agree there is little we might do to improve on the Lava terrain as such given the current functionality within the game engine. We might consider introducing events like geysers, "lava bombs", etc. as animated immovables versus terrain. The challenges of timing and loop duration remains, however, and anything larger than one tile would require careful placement by the map-maker to avoid impacts with roads and buildings.

Your Lava-stone1 is BEAUTIFUL! and I think you have done a masterful job achieving a very credible effect of flowing lava with it, but I agree the problem of direction and orientation remain prohibitive obstacles to its use currently.

Your Lava-stone2 looks great, too, and I would not oppose adding it to the game immediately as it stands.

All in all, I feel you have made a strong case for some code development to increase the terrain-type limit for worlds and support scripting for animated terrain and immovables, both of which are enhancements I would welcome heartily.


I see little people.

Top Quote
Astuur
Avatar
Joined: 2009-02-28, 10:08
Posts: 733
Ranking
One Elder of Players
Location: Frankfurt / Germany
Posted at: 2011-10-25, 17:08

Thank you , Chuck - always happy when I can contribute something that others like face-smile.png
Here are the lava-stone2 pngs in case you want to push them.

One more thing:
You may want to use /Widelands/tribes/empire/fisher/menu.png to replace widelands/tribes/barbarians/fisher/menu.png. The latter still shows the "old fishing stick" face-smile.png


Being no programmer, I apologize for all my suggestions that imply undue workload and for other misjudgements due to lack of expertise or relevant skills.
I am on Win32, have no means to compile, and rely on prefabricated distributions (Thanks to Tino).

Top Quote
Shevonar
Joined: 2011-09-05, 21:28
Posts: 136
Ranking
At home in WL-forums
Posted at: 2011-10-25, 17:36

Hey Astuur!

I have to agree with chuck. I really like what I see face-smile.png

Just recently I looked into the renderer code because of the still existing OpenGL problems and I found unused code that allows to "Draw things on the triangle (nothing to draw yet)" according to the comment. I think this code can be used to realize your lava bombs or chucks geysers. Basically an immovable that is not drawn on a node but on a triangle. However I don't want to promise to much here.

I'll address your idea on the WiHack (to discuss about it). I haven't yet decided what area of widelands I'll concentrate on, but I'm interested in the appearance of the game at the moment (fixed lots of window bugs etc.). I don't know how active the (openGL) renderer developers are, but i might work on thas as well. So there is at least one coder who supports your ideas face-smile.png Though I cannot say for sure that I will have much time in the future (this semester might get stressful).


Top Quote
chuckw
Avatar
Joined: 2010-03-15, 16:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2011-10-25, 17:58

@Astuur - Thanks for the lava-stone2 pngs and the "fishing tip". face-wink.png

@Shevonar - Thanks for your post and your support, even if it is only "moral support". You give hope that at least some of the functionality we are seeking may become reality in the not-so-distant future. Drawing on the triangle I think would actually be preferred in this case. I appreciate, understand and sympathize with the demands that a RL can have on a Widelands developer. From that, none of us is excluded, but I would add that all are excused. face-smile.png


I see little people.

Top Quote
Astuur
Avatar
Joined: 2009-02-28, 10:08
Posts: 733
Ranking
One Elder of Players
Location: Frankfurt / Germany
Posted at: 2011-10-25, 18:12

Great news, Shevonar! face-smile.png
Just take a good look at it if you will; if it turns out to be too much work, your efforts may be better rewarded elsewhere, but I'd of course welcome anything that helps with graphics.

Top priority on my wishlist would be this:

  • Play terrain animation "a" for a configurable time, then show animation "b" in the same place for some other time (alternatively "as long as the exisiting pngs last with the given fps").
  • Go on to "c" or repeat all over again.

Being no programmer, I apologize for all my suggestions that imply undue workload and for other misjudgements due to lack of expertise or relevant skills.
I am on Win32, have no means to compile, and rely on prefabricated distributions (Thanks to Tino).

Top Quote
SirVer
Joined: 2009-02-19, 15:18
Posts: 1438
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2011-10-25, 19:06

Just recently I looked into the renderer code because of the still existing OpenGL problems and I found unused code that allows to "Draw things on the triangle (nothing to draw yet)" according to the comment. I think this code can be used to realize your lava bombs or chucks geysers. Basically an immovable that is not drawn on a node but on a triangle. However I don't want to promise to much here.

I thing this is code from Erik (sigra). He wanted at one time to move all immovables onto the triangles and prepared some code to do this. resistance from other coders (mainly because there was much interest to KEEP the immovables on the fields) and lack of time made him stop. I'd say adding immovables onto triangles is not a bad or unusuable concept at all, but it must fit neatly into the current game concept. I am very much for discussing this on the wihack.


Top Quote
chuckw
Avatar
Joined: 2010-03-15, 16:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2011-10-25, 19:57

Astuur's new Lava-stone2 terrain for the blackland world has been added to the trunk in r#6041.


I see little people.

Top Quote