[engine] Parallax Scrolling

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderators: Developers, Forum Moderators

Forum rules
Before posting a new idea, you must read the following:

[engine] Parallax Scrolling

Postby doofus-01 » July 27th, 2013, 2:57 pm

Hi,

How difficult would it be to implement some form of parallax scrolling?

For example: the fog layer (or maybe other things like storm clouds) could be on a top, fast-scrolling layer. The middle layer would be just like things are now. And the bottom layer would be a slow-scrolling background, there could be images in the chasm depths.

This would be purely cosmetic, but the graphics are important, and if the capability is there, I'm sure someone could have a more creative use for it than clouds. There would be some complications (like fog of war sliding off its correct locations if it were placed on the top layer), but I don't think that's a reason not to ask. If lack of art for this is a hold-up, I would of course work to get us past that.

(I have a feeling I've either asked this before, or read a post asking this, but if so, the correct term wasn't used, and a forum search didn't turn up much that was relevant.)
Bad Moon Rising | Trinity | Archaic Era | Tales of the Setting Sun(WIP)
Available for BfW 1.10 but only actively developed for BfW 1.11/1.12
User avatar
doofus-01
Art Contributor
 
Posts: 2684
Joined: January 6th, 2008, 9:27 pm
Location: US of AAA

Re: [engine] Parallax Scrolling

Postby fabi » July 27th, 2013, 5:44 pm

doofus-01 wrote:Hi,

How difficult would it be to implement some form of parallax scrolling?

Difficult to say. It depends on exactly what you want.
Just having a big image in the background and foreground with transparent chasm tiles might only be a medium coding task.

For example: the fog layer (or maybe other things like storm clouds) could be on a top, fast-scrolling layer.

The fog of war is not a good candidate to handle in such a way, imho.

The middle layer would be just like things are now. And the bottom layer would be a slow-scrolling background, there could be images in the chasm depths.

I can see the usecase with chasms. But is it worth to implement the feature just for making chasms prettier?

This would be purely cosmetic, but the graphics are important, and if the capability is there, I'm sure someone could have a more creative use for it than clouds.

I would like to hear more ideas how the feature could be used.

There would be some complications (like fog of war sliding off its correct locations if it were placed on the top layer), but I don't think that's a reason not to ask. If lack of art for this is a hold-up, I would of course work to get us past that.

A dynamic layer (depending on game status), matching the underlying terrain, would be much more work.
fabi
Developer
 
Posts: 1117
Joined: March 21st, 2004, 2:42 pm
Location: Germany

Re: [engine] Parallax Scrolling

Postby Crow_T » July 27th, 2013, 8:45 pm

I don't think there is enough depth in wesnoth to justify this, a visual example would be needed.
User avatar
Crow_T
 
Posts: 678
Joined: February 24th, 2011, 4:20 am

Re: [engine] Parallax Scrolling

Postby doofus-01 » July 28th, 2013, 12:54 am

fabi wrote:Just having a big image in the background and foreground with transparent chasm tiles might only be a medium coding task.
That might be all. If it were tile-able, would that still be OK?

fabi wrote:I can see the usecase with chasms. But is it worth to implement the feature just for making chasms prettier?
Well, it would be just for appearances, yes. But it wouldn't need to be for chasms only. Deep water could have something similar. If the feature existed, some semi-obscuring terrain would make sense, like netting or gratings.

fabi wrote:I would like to hear more ideas how the feature could be used.
Aside from the above, the lower layer could be a preview of the next map in multilevel/multi-scenario caves (assuming the idea is to go further down). Even if the lower layer had to be created manually with a screenshot, versus being magically generated from map-data.

The upper layer could be for weather effects, like snow or rain, (though the motion may be too resource intensive?). Similar to clouds would be smoke from big fires. There could probably also be some magic ability special-effects, if it is changeable via the [terrain] tag. It might also be useful to decoratively obscure the map-edges, though that wouldn't be a strong reason on its own.

To use an example from one of my campaigns (just because I am familiar with it, there may be better examples out there):
mountain-shot2.jpeg
That is supposed to be a mountain summit. It would be more convincing if the sky and far away mountains were on a lower/deeper, slower-scrolling layer.

Lastly, just to stretch for something off the top of my head that would be non-standard, but that still might be cool would be an airborne setting (what that has to do with elves & orcs, not sure, but could be in UMC). It might also be a useful effect for an "inventory system" scenario, like was in... I forget the add-on that had something like that, but if I find it I'll edit this.

fabi wrote:A dynamic layer (depending on game status), matching the underlying terrain, would be much more work.
Sorry, I'm not sure what you mean by this.
Bad Moon Rising | Trinity | Archaic Era | Tales of the Setting Sun(WIP)
Available for BfW 1.10 but only actively developed for BfW 1.11/1.12
User avatar
doofus-01
Art Contributor
 
Posts: 2684
Joined: January 6th, 2008, 9:27 pm
Location: US of AAA

Re: [engine] Parallax Scrolling

Postby fabi » July 28th, 2013, 2:36 am

doofus-01 wrote:
fabi wrote:Just having a big image in the background and foreground with transparent chasm tiles might only be a medium coding task.
That might be all. If it were tile-able, would that still be OK?

Tiling is no big deal.

fabi wrote:I can see the usecase with chasms. But is it worth to implement the feature just for making chasms prettier?
Well, it would be just for appearances, yes. But it wouldn't need to be for chasms only. Deep water could have something similar. If the feature existed, some semi-obscuring terrain would make sense, like netting or gratings.

I see. But the usecase you describe is not going to create a background for the deep water automatically, we still use a single background image, right?

Aside from the above, the lower layer could be a preview of the next map in multilevel/multi-scenario caves (assuming the idea is to go further down). Even if the lower layer had to be created manually with a screenshot, versus being magically generated from map-data.

Uh, that sounds strange, not sure I understand it right. Can you produce a simple mockup?

The upper layer could be for weather effects, like snow or rain, (though the motion may be too resource intensive?). Similar to clouds would be smoke from big fires. There could probably also be some magic ability special-effects, if it is changeable via the [terrain] tag. It might also be useful to decoratively obscure the map-edges, though that wouldn't be a strong reason on its own.

Okay.

To use an example from one of my campaigns (just because I am familiar with it, there may be better examples out there):
mountain-shot2.jpeg
That is supposed to be a mountain summit. It would be more convincing if the sky and far away mountains were on a lower/deeper, slower-scrolling layer.

Nice. What campaign is this one part of?

Lastly, just to stretch for something off the top of my head that would be non-standard, but that still might be cool would be an airborne setting (what that has to do with elves & orcs, not sure, but could be in UMC). It might also be a useful effect for an "inventory system" scenario, like was in... I forget the add-on that had something like that, but if I find it I'll edit this.

Oh, you want to display some gui in the layer?

fabi wrote:A dynamic layer (depending on game status), matching the underlying terrain, would be much more work.
Sorry, I'm not sure what you mean by this.

The simple single image approach vs a layer produced from game state information and the terrain underlying, much like you suggested for the fog.
fabi
Developer
 
Posts: 1117
Joined: March 21st, 2004, 2:42 pm
Location: Germany

Re: [engine] Parallax Scrolling

Postby doofus-01 » July 28th, 2013, 6:20 am

fabi wrote: see. But the usecase you describe is not going to create a background for the deep water automatically, we still use a single background image, right?
Right. Automatic image generation from map-data would be pretty cool (if that is what you meant by automatically?), but not necessarily what I am pushing. A single large hand-drawn image would still fit the bill. Maybe a new, translucent terrain called "deep-deep water" would be needed to show the lower layer, but this is a detail that we could work out. If this were to be implemented, I'd be happy to work on an image to be used for each reasonable situation. And I'm pretty sure other people would contribute later - it would be like terrain art without all the transitions headache, the barrier would be fairly low.

fabi wrote:Uh, that sounds strange, not sure I understand it right. Can you produce a simple mockup?
I'm not sure how to convey this in a GIF, so I may need to upload a test campaign. If you have any further questions that should go in there, let me know and I'll try to demonstrate in the same test campaign.

fabi wrote:Nice. What campaign is this one part of?

It is in BfW 1.11.x server as add-on Bad Moon Rising, though I think you will need to download at least Archaic Resources (and maybe Archaic Era as well, because I am disorganized). The map name is "Bad_Moon_Rising/maps/2_07_Salvation.map". I should mention that the way I implemented that was a bunch of silly crap that a real artist probably wouldn't have the patience for. If an independent background layer does nothing else but make it easier to recreate the same situation, there will be better art.

fabi wrote:The simple single image approach vs a layer produced from game state information and the terrain underlying, much like you suggested for the fog.
OK, I think I get it. Those are things that I don't even grasp how to deal with conceptually, so I completely understand how they would be hard to implement. Let's forget the suggestion of "fog" and call it "mist" if we call it anything at all.

If it distills things into something achievable, let's say I am requesting that there be two new layers, and are each one large image, optionally tile-able, specified in the [scenario] level if not in the map data (which I know you are working on). One of these images is drawn over everything else (sprites, halos, everything), and scrolls at, say, 1.2 speed. The other layer is drawn below everything specified in terrain-graphics, and scrolls at 0.8 speed. I'm not sure about those speeds, I pulled them out of my hat, but they sounded good.
Bad Moon Rising | Trinity | Archaic Era | Tales of the Setting Sun(WIP)
Available for BfW 1.10 but only actively developed for BfW 1.11/1.12
User avatar
doofus-01
Art Contributor
 
Posts: 2684
Joined: January 6th, 2008, 9:27 pm
Location: US of AAA

Re: [engine] Parallax Scrolling

Postby fabi » July 28th, 2013, 9:36 pm

Okay, the suggestion sounds fine.
And I must admit that parallax scrolling is a nice thing to have in a retro themed gamed.

The biggest problem hindering the implementation is the lack of an active developer who knows enough about the rendering system.
Thus we can't even properly estimate the actual amount of work involved.

Please take the time and submit a feature request at bugs.wesnoth.org.
We will see if the idea can be implemented when the situation changes.
fabi
Developer
 
Posts: 1117
Joined: March 21st, 2004, 2:42 pm
Location: Germany

Re: [engine] Parallax Scrolling

Postby doofus-01 » July 28th, 2013, 11:15 pm

OK, I have submitted a feature request.

https://gna.org/bugs/index.php?20991
Bad Moon Rising | Trinity | Archaic Era | Tales of the Setting Sun(WIP)
Available for BfW 1.10 but only actively developed for BfW 1.11/1.12
User avatar
doofus-01
Art Contributor
 
Posts: 2684
Joined: January 6th, 2008, 9:27 pm
Location: US of AAA

Re: [engine] Parallax Scrolling

Postby fabi » July 29th, 2013, 12:19 am

Fine, thank you.
Let's hope we get around to implement it some day.
fabi
Developer
 
Posts: 1117
Joined: March 21st, 2004, 2:42 pm
Location: Germany


Return to Ideas

Who is online

Users browsing this forum: No registered users and 2 guests