[engine] Parallax Scrolling
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
[engine] Parallax Scrolling
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.)
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.)
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Re: [engine] 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.
The fog of war is not a good candidate to handle in such a way, imho.For example: the fog layer (or maybe other things like storm clouds) could be on a top, fast-scrolling layer.
I can see the usecase with chasms. But is it worth to implement the feature just for making chasms prettier?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 would like to hear more ideas how the feature could be used.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.
A dynamic layer (depending on game status), matching the underlying terrain, would be much more work.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.
Re: [engine] Parallax Scrolling
I don't think there is enough depth in wesnoth to justify this, a visual example would be needed.
Re: [engine] Parallax Scrolling
That might be all. If it were tile-able, would that still be OK?fabi wrote:Just having a big image in the background and foreground with transparent chasm tiles might only be a medium coding task.
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 can see the usecase with chasms. But is it worth to implement the feature just for making chasms prettier?
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.fabi wrote:I would like to hear more ideas how the feature could be used.
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): 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.
Sorry, I'm not sure what you mean by this.fabi wrote:A dynamic layer (depending on game status), matching the underlying terrain, would be much more work.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Re: [engine] Parallax Scrolling
Tiling is no big deal.doofus-01 wrote:That might be all. If it were tile-able, would that still be OK?fabi wrote:Just having a big image in the background and foreground with transparent chasm tiles might only be a medium coding task.
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?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 can see the usecase with chasms. But is it worth to implement the feature just for making chasms prettier?
Uh, that sounds strange, not sure I understand it right. Can you produce a simple mockup?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.
Okay.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.
Nice. What campaign is this one part of?To use an example from one of my campaigns (just because I am familiar with it, there may be better examples out there):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.
Oh, you want to display some gui in the 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.
The simple single image approach vs a layer produced from game state information and the terrain underlying, much like you suggested for the fog.Sorry, I'm not sure what you mean by this.fabi wrote:A dynamic layer (depending on game status), matching the underlying terrain, would be much more work.
Re: [engine] Parallax Scrolling
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: 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?
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:Uh, that sounds strange, not sure I understand it right. Can you produce a simple mockup?
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: Nice. What campaign is this one part of?
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.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.
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.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Re: [engine] Parallax Scrolling
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.
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.
Re: [engine] Parallax Scrolling
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Re: [engine] Parallax Scrolling
Fine, thank you.
Let's hope we get around to implement it some day.
Let's hope we get around to implement it some day.