• All, Gmail is currently rejecting messages from my host. I have a ticket in process, but it may take some time to resolve. Until further notice, do NOT use Gmail for your accounts. You will be unable to receive confirmations and two factor messages to login.

Stage Creation Tutorial?

DatKofGuy

Member
Heyo, so I am slowly getting back into getting the hang of things, but seems most of my knowledge of stage creation has departed my brain.
Is there any indepth tutorials any where, that covers the use of the different types of background, layer, fglayer, etc?

Because I checked the wiki and google and didnt really come across an entry for just the layer element.
I have been looking through other mods, and people have their stages set up, but the numbers set for the values of all the parameters dont always line up, so Im a bit confused.

For now, I just want to have a stage that has a background, then some layers in front of it, but behind the player and enemies, and I dont want it to scroll. I want it to be locked in place as well. I have tried the different bglayer elements, but either openbor crashes, or the layer still scrolls.

I wanna get that working before moving on to more advanced ideas I have.

And help would be appreciated.
 
  • Like
Reactions: NED
Heyo, so I am slowly getting back into getting the hang of things, but seems most of my knowledge of stage creation has departed my brain.
Is there any indepth tutorials any where, that covers the use of the different types of background, layer, fglayer, etc?

Because I checked the wiki and google and didnt really come across an entry for just the layer element.
I have been looking through other mods, and people have their stages set up, but the numbers set for the values of all the parameters dont always line up, so Im a bit confused.

For now, I just want to have a stage that has a background, then some layers in front of it, but behind the player and enemies, and I dont want it to scroll. I want it to be locked in place as well. I have tried the different bglayer elements, but either openbor crashes, or the layer still scrolls.

I wanna get that working before moving on to more advanced ideas I have.

And help would be appreciated.
Hi friend. I suggest you take a look at the level section in the manual.
 
  • Like
Reactions: NED
When it comes to layers, I usually just trial n error until I get it right. That's for all parameters.
Since layers are stage properties, I could trial n error by doing this:
1. Declare a layer with proper path.
2. Set values to parameters of that layer.
3. Play the stage and check the layer.
4. Fix respective parameter by adjusting value set there.
5. Exit the level to main menu.
6. Repeat #3 until I get it the layer right.

then some layers in front of it, but behind the player and enemies, and I dont want it to scroll. I want it to be locked in place as well.

Hmmm.... that means you want to set scrolling factor in both x and y of the layer to 0. I suggest something like this:

bglayer {path} 0 0 0 0 0 0 1 1 1

Replace {path} with proper path.
 
  • Like
Reactions: NED
@DatKofGuy

another tip, you can use excel or openoffice calc to make bglayer/fglayer tools to punch in the numbers you need under cells that have descriptions and or reminders of what the values do, or try chronocrash modders tools....
 
Hi friend. I suggest you take a look at the level section in the manual.
Hey, I did actually consult that, I meant that when I said wiki, I should have said manual instead of wiki.

bglayer {path} 0 0 0 0 0 0 1 1 1

Replace {path} with proper path.

I did actually have that set up, but then openbor crashed, but will retry. Thanks

EDIT: So tried it again and OpenBor crashed again.

This is how my stage is now set up


Code:
music        data/music/FF-DreamAmusement.bor
background    data/levels/LVL_DreamAmusement_1/bg.png
bglayer        data/levels/LVL_DreamAmusement_1/mg.png 0 0 0 0 0 0 1 1 1

direction       both
light          10   -30
at           0
settime         0
noslow          1
order        a
cameratype     1
spawn1         200 200 0

spawn   BossRaiden
coords  200 200
at      0

@DatKofGuy

another tip, you can use excel or openoffice calc to make bglayer/fglayer tools to punch in the numbers you need under cells that have descriptions and or reminders of what the values do, or try chronocrash modders tools....

That's actually a pretty smart idea! Thanks.
 
Last edited:
Hey, I did actually consult that, I meant that when I said wiki, I should have said manual instead of wiki.
@DatKofGuy No problem buddy :)

EDIT: So tried it again and OpenBor crashed again.
I believe that the crash is related to the missing "panel" command in your level file, it needs to be declared mainly because the image size will define the level width.
You can also use an empty image that contains only the transparent color, this way allowing you to apply the visual content using bglayer/fglayer.
 
I believe that the crash is related to the missing "panel" command in your level file, it needs to be declared mainly because the image size will define the level width.
You can also use an empty image that contains only the transparent color, this way allowing you to apply the visual content using bglayer/fglayer.
That prevented the crash, and the layer is now showing, however its still moving, so I am still getting that parallax effect, which I am trying not have.
Im probably just gonna have to merge the layer and background into a one image for now.
 
That prevented the crash, and the layer is now showing, however its still moving, so I am still getting that parallax effect, which I am trying not have.
In the xratio parameter use 1 to stop the layer scrolling, or 0 to move together with the panel.

Code:
background    data/levels/LVL_DreamAmusement_1/bg.png
bglayer        data/levels/LVL_DreamAmusement_1/mg.png 1 0 0 0 0 0 1 1 1

1729029854204.png

EDIT: The same goes for the background too:

Code:
background    data/levels/LVL_DreamAmusement_1/bg.png 1 0 0 0 0 0 1 1 1
 
Last edited:
however its still moving, so I am still getting that parallax effect, which I am trying not have.

I think we have misunderstanding here. When you say "not scrolling", do you mean:
1. The layer stays in place and could be left behind. Ex: street lamp, signs and poles.
OR
2. The layer moves together with player and never left the screen. Ex: lifebar, time and lives counter.
 
In the xratio parameter use 1 to stop the layer scrolling, or 0 to move together with the panel.

Code:
background    data/levels/LVL_DreamAmusement_1/bg.png
bglayer        data/levels/LVL_DreamAmusement_1/mg.png 1 0 0 0 0 0 1 1 1

View attachment 9395

EDIT: The same goes for the background too:

Code:
background    data/levels/LVL_DreamAmusement_1/bg.png 1 0 0 0 0 0 1 1 1
Tried that, the bglayer now doesnt display . I tried using both bglayer and layer. if I change it back to 0 0 0 0 0 0 1 1 1, it displays.


I think we have misunderstanding here. When you say "not scrolling", do you mean:
1. The layer stays in place and could be left behind. Ex: street lamp, signs and poles.
OR
2. The layer moves together with player and never left the screen. Ex: lifebar, time and lives counter.
So what I want is for it to be like option 1, that everything is locked in place. But instead, it moves as I walk, like when you have a foreground element.
Think it will be better explained with a video example.
So currently what happens is this, look at the popcorn stand and bench, and how it moves.
What I want is for it to be like this (this is with the background having all the layers flattened into one image)

For now I think I will just have to go with this fix for now. I dunno why it's being this weird.
 
Tried that, the bglayer now doesnt display . I tried using both bglayer and layer. if I change it back to 0 0 0 0 0 0 1 1 1, it displays.
Strange, I pasted your parameters in my level file and worked fine.

Maybe something is wrong with the images or the transparent color, this would explain why one layer covers another. In my case I'm using pink as transparent color and then the engine will make these parts transparent, allowing certain layers to be visible through others.

1729119813241.png
1729119822135.png
1729119826391.png
1729119829240.png

Take a look at this video, I changed both background/bglayer separately and they still display normally. The -1 parameter makes layers to always repeat, leaving no empty black spaces.

 
What I want is for it to be like this (this is with the background having all the layers flattened into one image)

Ah I see, then you need to set 0.5 for xratio like this:

bglayer data/levels/LVL_DreamAmusement_1/mg.png 0.5 0 0 0 0 0 1 1 1

0.5 is the default xratio of background. 0 is for panels while 1 is for HUD.

Tried that, the bglayer now doesnt display

I think I know why. Your popcorn stand is placed offscreen so when you scroll forward, it scrolls at same speed IOW stays offscreen no matter where you move.
 
Maybe something is wrong with the images or the transparent color, this would explain why one layer covers another. In my case I'm using pink as transparent color and then the engine will make these parts transparent, allowing certain layers to be visible through others.
Oh I am well aware of how transparencies work.
These are the images I am using
Background
bg-1.png

Layer
mg-1.png

Panel, just a blank panel as advised earlier.
blank.png


All are the same dimensions. I'll attach the stage text file as well.

EDIT: I just tested what BB said, and that worked.


Ah I see, then you need to set 0.5 for xratio like this:

bglayer data/levels/LVL_DreamAmusement_1/mg.png 0.5 0 0 0 0 0 1 1 1

0.5 is the default xratio of background. 0 is for panels while 1 is for HUD.

I think I know why. Your popcorn stand is placed offscreen so when you scroll forward, it scrolls at same speed IOW stays offscreen no matter where you move.

Thanks! That worked, just needed to change the width of the panel to accommodate for the stage scrolling.
 

Attachments

Back
Top Bottom