Solved Layer Parameter Questions

Question that is answered or resolved.

ABK

Well-known member
Ok so in theory i can use bglayer as panel ?

Cause now i cant use background layer as panel cause background layer has own hardcoded speed which is strange at this point since eveyrything else got so customised that background layer is still with autoscroll or without autoscroll but with own hardcoded speed and no control over it.
 
Solution
Wheres the quake thingy switch for bglayer and fglayer?
oh, I can't believe this isn't on the manual yet! I never realized it before and will fix it asap.

The manual contains this information:
fglayer {path} {z} {xratio} {zratio} {xposition} {zposition} {xspacing} {zspacing} {xrepeat} {zrepeat} {transparency} {alpha} {watermode} {amplitude} {wavelength} {wavespeed} {bgspeedratio}

  • This is for setting custom foreground layer in current level.
  • {path} is the location relative to data folder where the graphic is
  • Just like any image used by OpenBoR, fglayers must use paletted images. In 8 bit colourdepth (default), it must use same palette as 'background' (see above). In 16/32 bit, it can use different palette...
I am aware that there is a method using screens, but wouldn't they be only limited to background or foreground stuff?

but still, for big "dynamic" crates (visual side textures), as components of doorways, and i can even go as far changing their platform values frame by frame, ( or have a "clipping" entitiy instead for the Physics instead)
deco entities have to be used

You don't seem to understand at all. Screens don't act on backgrounds, they act on sprites... Everything on screen (including screens themselves) is just part of the sprite cue. Do you get it? It doesn't matter if it is a background, a piece of text, entity, or even a direct drawn shape. Screens can do anything to anything, even another screen.

So forget vertical, you can go diagonal or full rotation if you want, and that doesn't scratch the surface. There's a spell I'm working on for my original project that warps reality by smashing the entire world inward centered on the character, balloons it back out again, and rotates it in all directions at random (based on Phase Shift from the original Vandal Hearts).

I've even got a way (not coded yet, but I already know how to make it work) to do pixel shading effects, the one native effect not already in OpenBOR's gfx suite.

DC
 
Personally, I prefer to use an entity for this, especially because I can reuse the same entity for several animations in the same scenario and, if I used this method, it would be chaos.
Yeah, for certain effects I'm still using entities too, but for simple things that appear in the entire level like sky, banners, small lights, etc this method can be less costly than loading an entire entity, specially if you need to repeat them many times during the level.
 
@oldyz Hmm I think no, I'm using the cycleSprite script since SOR2X v2.3.1 packed in 2021 but the DC's resources points to 2022. I don't remember exactly but maybe I had made some subsequent improvements in my code looking his code.


View attachment 5894

@Kratus, Not to be too pedantic, but I first posted that as a tutorial in 2020 (see the discussion thread), and had it in github several years before that. I just moved to a resource in 2022 because that's where tutorials belong.

You even said you got the idea from me here:


I really don't care either way and I'm not asking for credit. I posted it for people to use. The only thing that bugs me is someone is likely to come along and accuse me of copying you. That happens a lot (in general, not related to you) and I have to admit it's pretty frustrating.

DC
 
Last edited:
@Kratus, Not to be too pedantic, but I first posted that as a tutorial in 2020 (see the discussion thread), and had it in github several years before that. I just moved to a resource in 2022 because that's where tutorials belong.

You even said you got the idea from me here:


I really don't care either way and I'm not asking for credit. I posted it for people to use. The only thing that bugs me is someone is likely to come along and accuse me of copying you. That happens a lot (in general, not related to you) and I have to admit it's pretty frustrating.

DC
Sorry buddy, I really don't remember exactly, but once your codes are much more advanced than mine usually I only try to understand your concept and develop using my format instead of copy/paste yours directly. But I remember looking at your code certainly (like I always do with all your codes in order to learn more :) ), I only do not remember if I developed mine before or after your post/resource.
 
You don't seem to understand at all. Screens don't act on backgrounds, they act on sprites... Everything on screen (including screens themselves) is just part of the sprite cue. Do you get it? It doesn't matter if it is a background, a piece of text, entity, or even a direct drawn shape. Screens can do anything to anything, even another screen.

So forget vertical, you can go diagonal or full rotation if you want, and that doesn't scratch the surface. There's a spell I'm working on for my original project that warps reality by smashing the entire world inward centered on the character, balloons it back out again, and rotates it in all directions at random (based on Phase Shift from the original Vandal Hearts).

I've even got a way (not coded yet, but I already know how to make it work) to do pixel shading effects, the one native effect not already in OpenBOR's gfx suite.

DC
can't wait to see this!

as for walls , i can only speculate here, we have this entity that is... - say a television - this entity is only the front face of the TV, using a screen, this front face can be projected on it and the screen itself can simulate a textured polygon face effect.

i suppose users can animate and deform this face frame by frame i need be,
or it can also become an automated thing using script for it to behave like a vertical
Watermode 3 / beginsize / endsize Fglayer, but with the advantage that it can also ocupy entity space.

Its weird, because one thing I wish we could do easily is to have entities behave like Fglayers when it come to the variety of effects

and for some things have fglayers behave more like entities, with an actual offset, and space in the playable area like for fog and smoke effects that could have infite scroll effect or so....

@Kratus
thanks to your post i was finally able to make the some stuff work now, i don't know how in the heck i could not understand the tutorial, it was so obvious
 
Its weird, because one thing I wish we could do easily is to have entities behave like Fglayers when it come to the variety of effects
but... you can do it. Almost everything you do with fglayer, you can do with an entity. Some stuff is easier, some harder, but you can do it.
The only thing you can't do, natively, is tiling.

If you are talking about water transformations, see the video above. The background here is an entity where I use water transformations on it.
The only "native" backgrounds is the Avengers mountain and the sky behind it.

This is an example of a case where entities as animations are better than updatescript, because every animation here has a different delay and, after a certain time, the animations get randomized. You can do this by code? yes, but is nowhere easy as this method. And the cameos on the screen are the same entity too and, again, you get a random cameo each time you play (I am addicted to random things, lol)

And to complement what @DCurrent was talking about screens, the zoom out at the start of the stage is a screen in use. SInce I am manipulating the main screen, everything drawn on it get scaled too (including the hud, the menu, etc).
 
You even said you got the idea from me here:
@DCurrent My bad, I looked at the original post and now I remember that I incorporated your brilliant concept of temporizing layers in order to use as an animation, the confusion happened because I was already using the changelevelproperty to switch layers after looking at the source code directly and most part of the script already were ready, I only added the timer.

I really don't care either way and I'm not asking for credit. I posted it for people to use
Same as you honestly I don't care about the credit too, I just want to solve the topic's problem.

The only thing that bugs me is someone is likely to come along and accuse me of copying you
Don't worry buddy, the resource is entirely yours and if someone makes this kind of accusation I will defend you myself.
 
@DCurrent My bad, I looked at the original post and now I remember that I incorporated your brilliant concept of temporizing layers in order to use as an animation, the confusion happened because I was already using the changelevelproperty to switch layers after looking at the source code directly and most part of the script already were ready, I only added the timer.


Same as you honestly I don't care about the credit too, I just want to solve the topic's problem.


Don't worry buddy, the resource is entirely yours and if someone makes this kind of accusation I will defend you myself.

Thank you @Kratus, I really appreciate that!

DC
 
Something I just discovered and will correct in the manual for the fglayer:

fglayer {path} {z} {xratio} {zratio} {xposition} {zposition} {xspacing} {zspacing} {xrepeat} {zrepeat} {transparency} {alpha} {watermode} {amplitude} {wavelength} {wavespeed} { bgspeedratio} {quake} {neon}

{neon}, unlike panel, IS NOT the path to the file we will use as neon, it is a boolean value:

• 0 disabled (default)
• 1 enabled

I was testing it this way and saw that it didn't work (but the engine doesn't return any errors)

fglayer data/levels/4-G-Axe/GAXE_4v2_neon.gif -2 0 0 0 0 0 0 -1 1 0 0 0 0 0 0 0 1 data/levels/4-G-Axe/GAXE_4v2_neon.gif

However, changing it to 1, the neon starts to work (the image itself already has the colors in the correct positions)

fglayer data/levels/4-G-Axe/GAXE_4v2_neon.gif -2 0 0 0 0 0 0 -1 1 0 0 0 0 0 0 0 1 1

For sure, to make it work, it must use the same palette of the background layer
 
Back
Top Bottom