Solved Level design bug?

Question that is answered or resolved.

dantedevil

Well-known member
Lately I have noticed that in the levels with multiple panels, the scroll causes the panels not to be seen correctly.

So far I have not worried too much about that, but now that I started using animations in the panels, it turns out to be a big problem.
As it is something difficult to explain, I preferred to upload a video to show what I mean:


As you can see in the video, after walking a few steps, the animated panel gets out of place. At the time 0:20 approximately, we can see how the upper part of the arcade screen of the medium, becomes wider or finer when walking forward or backward.

Here the level:
Code:
music        data/music/stage3-1.ogg
 
fglayer data/bgs/lights/light3.png   -70    0 0 99   -15    95 0  3 1 1 1 0 0 0 0 0
fglayer data/bgs/lights/lamp.png     -68    0 0 170  -40   235 0  3 1 1 0 0 0 0 0 0

panel        data/bgs/stage3/stage3-1-2/panel1.png
panel        data/bgs/stage3/stage3-1-2/panel2.png
panel        data/bgs/stage3/stage3-1-2/panel3.png
panel        data/bgs/stage3/stage3-1-2/panel4.png
panel        data/bgs/stage3/stage3-1-2/panel5.png
panel        data/bgs/stage3/stage3-1-2/panel6.png
panel        data/bgs/stage3/stage3-1-2/panel7.png
panel        data/bgs/stage3/stage3-1-2/panel8.png
panel        data/bgs/stage3/stage3-1-2/panel9.png
panel        data/bgs/stage3/stage3-1-2/panel10.png

Wall 85 250 -500 -500 84 12 63 5000
Wall 927 275 -100 -7 500 500 87 5000
 
order           abcdefghij

direction       both

spawn1 40 50 135
spawn2 50 55 135
spawn3 60 60 135

light    -32 -32
at 0

shadowcolor 1
at 0

shadowalpha -1
at 0


#z 200 270

type        0
settime        99
notime        0
stagenumber    3


#######################################

spawn   inout
coords  240 272
at      0

spawn   st3panel
coords  495 200
flip    1
at      0

spawn  endstage0
coords  -100 270 0
at      0

Here the animation panel:
Code:
name    st3panel
type    none
speed   0
setlayer -4
shadow  0
nomove  1

anim idle
    loop    1
    offset    495 200
    delay    30
    frame    data/bgs/stage3/stage3-1-2/neon.png
    frame    data/chars/misc/empty.png

The 10 panels are the same width and height, I do not know what else may be causing this ...
 
Last edited:
Solution
Finally I was able to find the best way to solve the problem and work more productively with the stages.

Here the entity type panel, with all the panels of this stage:
Code:
name st3_1_2pan

type    panel

shadow 0

setlayer 1
offscreenkill 10000





palette      data/bgs/stage3/stage3-1-2/neon1.png
alternatepal data/bgs/stage3/stage3-1-2/panel1.png
alternatepal data/bgs/stage3/stage3-1-2/panel2.png
alternatepal data/bgs/stage3/stage3-1-2/panel3.png
alternatepal data/bgs/stage3/stage3-1-2/panel4.png
alternatepal data/bgs/stage3/stage3-1-2/panel5.png
alternatepal data/bgs/stage3/stage3-1-2/panel6.png
alternatepal data/bgs/stage3/stage3-1-2/panel7.png
alternatepal data/bgs/stage3/stage3-1-2/panel8.png
alternatepal...
O Ilusionista said:
That is strange, I had no issue with that on my game. And some stages there are made with animated panels.
The Bonus Stage select, for example, is one of the cases.

All my panels have their own individual pallets, that is like your mod?
 
dantedevil said:
All my panels have their own individual pallets, that is like your mod?

This wouldn't be the issue, because whether or not you use different or the same colors for one entity vs. another, each has its own palette anyway. This goes for all types of entities, including panel type entities.

You can make an entity use the global (stage/background) palette, but you have to use a specific attribute to do so.

DC
 
I'm a bit confused about this, because in the manual talks about using panels with their own palette and the only condition is that it is 16/32 bit and about the background palette.
My Mod is in 32 bit and my level not use background.

Code:
~Just like any image used by OpenBoR, panels 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
~Beware though, if panels use different palette than background, 'palette' command (see below) won't work

 
We got some wires crossed.

I see now you are using panels and not panel entities. I'm not sure then, what you mean by animated panels - since in OpenBOR, panels and layers don't support any kind of animation at all. Only scrolling and a color cycle function. To get animation, you'd need panel type entities.

Anyway, all modules are 32 bit now unless you are using an old version of OpenBOR. But even that doesn't matter, because all layers and panels still use a global palette. It works like this:

Independent Palettes: Fonts, scripted sprites, and models (default behavior for all models).
Global Palette: Background, bglayer, fglayer, panels, models (optional on a per model basis).

Unless you're using 32bit files, which is a whole new animal, you're using these behaviors whether you know it or not. That's just how OpenBOR works.

DC


 
Thanks for the explanation my friend!
I take in count.

Abut animated panel, I mean this entity type none:
Code:
name	st3panel
type	none
speed   0
setlayer -4
shadow  0
nomove  1

anim idle
	loop	1
	offset	495 200
	delay	30
	frame	data/bgs/stage3/stage3-1-2/neon.png
	frame	data/chars/misc/empty.png

This entity make change animation on the arcade screens and the change in the neon letters.
 
Code:
Global Palette:
Background, bglayer, fglayer, panels,
models (optional on a per model basis).

I'm using OpenBoR Build 6315.

So if I understood correctly, I'm limited to using the same palette of 256 colors of the stage, for panels Background, bglayer, fglayer, panels?
 
dantedevil said:
Code:
Global Palette:
Background, bglayer, fglayer, panels,
models (optional on a per model basis).

I'm using OpenBoR Build 6315.

So if I understood correctly, I'm limited to using the same palette of 256 colors of the stage, for panels Background, bglayer, fglayer, panels?

Strange, I come using different palettes between different layers (panel - background) and animated entities(type panel and none) and I do not have that problem.
second, if it were an error product of different pallets, then, the error should always be presented, not only when you move the scroll. Personally, I doubt it's a pallet problem.

Can you share the images you are using to test?
What speed do you have for that character?
 
O Ilusionista said:
So if I understood correctly, I'm limited to using the same palette of 256 colors of the stage, for panels Background, bglayer, fglayer, panels?

No. You don't even need to use 8bit images for that if you want.

Ok, then... I have 10 panels for this level, each one have their individual palette.
So, what do I need to change to eliminate the bug of the video?
And what am I supposed to be doing wrong?
 
O Ilusionista said:
Are you using 10 different entities for that? If so, its not needed at all. Use only one and call them in different animations.

Plus, they should be type panel, not none.

No, I'm using 10 common panels, as you can see in the stage that I attached below. Each of these 10 panels, have the same width and the same height, but each one has its own palette.

The only entity I'm using is st3panel, which you can see your spawn in txt as well.

Code:
music		data/music/stage3-1.ogg
 
fglayer data/bgs/lights/light3.png   -70    0 0 99   -15    95 0  3 1 1 1 0 0 0 0 0
fglayer data/bgs/lights/lamp.png     -68    0 0 170  -40   235 0  3 1 1 0 0 0 0 0 0

panel    	data/bgs/stage3/stage3-1-2/panel1.png
panel    	data/bgs/stage3/stage3-1-2/panel2.png
panel    	data/bgs/stage3/stage3-1-2/panel3.png
panel    	data/bgs/stage3/stage3-1-2/panel4.png
panel    	data/bgs/stage3/stage3-1-2/panel5.png
panel    	data/bgs/stage3/stage3-1-2/panel6.png
panel    	data/bgs/stage3/stage3-1-2/panel7.png
panel    	data/bgs/stage3/stage3-1-2/panel8.png
panel    	data/bgs/stage3/stage3-1-2/panel9.png
panel    	data/bgs/stage3/stage3-1-2/panel10.png

Wall 85 250 -500 -500 84 12 63 5000
Wall 927 275 -100 -7 500 500 87 5000
 
order           abcdefghij

direction       both

spawn1 40 50 135
spawn2 50 55 135
spawn3 60 60 135

light	-32 -32
at 0

shadowcolor 1
at 0

shadowalpha -1
at 0


#z 200 270

type		0
settime		99
notime		0
stagenumber	3


#######################################

spawn   inout
coords  240 272
at      0

spawn   st3panel
coords  495 200
flip    1
at      0

spawn  endstage0
coords  -100 270 0
at      0


its not needed at all. Use only one and call them in different animations.
But if I do this, the 10 panels should share the same palette right?
Thus they could no longer maintain their own palette. Which would mean a great loss of color.
 
Finally I was able to find the best way to solve the problem and work more productively with the stages.

Here the entity type panel, with all the panels of this stage:
Code:
name st3_1_2pan

type    panel

shadow 0

setlayer 1
offscreenkill 10000





palette      data/bgs/stage3/stage3-1-2/neon1.png
alternatepal data/bgs/stage3/stage3-1-2/panel1.png
alternatepal data/bgs/stage3/stage3-1-2/panel2.png
alternatepal data/bgs/stage3/stage3-1-2/panel3.png
alternatepal data/bgs/stage3/stage3-1-2/panel4.png
alternatepal data/bgs/stage3/stage3-1-2/panel5.png
alternatepal data/bgs/stage3/stage3-1-2/panel6.png
alternatepal data/bgs/stage3/stage3-1-2/panel7.png
alternatepal data/bgs/stage3/stage3-1-2/panel8.png
alternatepal data/bgs/stage3/stage3-1-2/panel9.png
alternatepal data/bgs/stage3/stage3-1-2/panel10.png


anim idle
	
	loop	1
	offset	0 0
	delay	30
	frame	data/bgs/stage3/stage3-1-2/neon0.png
	frame	data/bgs/stage3/stage3-1-2/neon1.png





anim freespecial1	
	offset	0 0
	delay	-1000
        drawmethod remap 1
	frame	data/bgs/stage3/stage3-1-2/panel1.png


anim freespecial2	
	offset	0 0
	delay	-1000
        drawmethod remap 2
	frame	data/bgs/stage3/stage3-1-2/panel2.png




anim freespecial3	
	offset	0 0
	delay	-1000
        drawmethod remap 3
	frame	data/bgs/stage3/stage3-1-2/panel3.png



anim freespecial4	
	offset	0 0
	delay	-1000
        drawmethod remap 4
	frame	data/bgs/stage3/stage3-1-2/panel4.png



anim freespecial5	
	offset	0 0
	delay	-1000
        drawmethod remap 5
	frame	data/bgs/stage3/stage3-1-2/panel5.png



anim freespecial6	
	offset	0 0
	delay	-1000
        drawmethod remap 6
	frame	data/bgs/stage3/stage3-1-2/panel6.png



anim freespecial7	
	offset	0 0
	delay	-1000
        drawmethod remap 7
	frame	data/bgs/stage3/stage3-1-2/panel7.png



anim freespecial8	
	offset	0 0
	delay	-1000
        drawmethod remap 8
	frame	data/bgs/stage3/stage3-1-2/panel8.png



anim freespecial9	
	offset	0 0
	delay	-1000
        drawmethod remap 9
	frame	data/bgs/stage3/stage3-1-2/panel9.png



anim freespecial10	
	offset	0 0
	delay	-1000
        drawmethod remap 10
	frame	data/bgs/stage3/stage3-1-2/panel10.png

As you can see, with this method each panel has its own palette.



And here the level using all this panels:
Code:
music		data/music/stage3-1.ogg
 
fglayer data/bgs/lights/light3.png   -65    0 0 99   -15    95 0  3 1 1 1 0 0 0 0 0
fglayer data/bgs/lights/lamp.png     -63    0 0 170  -40   235 0  3 1 1 0 0 0 0 0 0

panel    	data/bgs/stage3/stage3-1-2/panel.png	none  none


Wall 100 250 -500 -500 84 12 63 5000
Wall 932 275 -100 -7 500 500 87 5000
  

order           a

direction       both

spawn1 40 50 135
spawn2 50 55 135
spawn3 60 60 135

light	-32 -32
at 0

shadowcolor 1
at 0

shadowalpha -1
at 0


#z 200 270

type		0
settime		99
notime		0
stagenumber	3


#######################################



spawn   inout
coords  240 272
at      0


spawn st3_1_2pan
@script 
void main() {
	performattack(getlocalvar("self"), openborconstant("ANI_freespecial1"));
} @end_script
coords 0 0
flip 1
at 0

spawn st3_1_2pan
@script 
void main() {
	performattack(getlocalvar("self"), openborconstant("ANI_freespecial2"));
} @end_script
coords 100 0
flip 1
at 0

spawn st3_1_2pan
@script 
void main() {
	performattack(getlocalvar("self"), openborconstant("ANI_freespecial3"));
} @end_script
coords 200 0
flip 1
at 0

spawn st3_1_2pan
@script 
void main() {
	performattack(getlocalvar("self"), openborconstant("ANI_freespecial4"));
} @end_script
coords 300 0
flip 1
at 0

spawn st3_1_2pan
@script 
void main() {
	performattack(getlocalvar("self"), openborconstant("ANI_freespecial5"));
} @end_script
coords 400 0
flip 1
at 0

spawn st3_1_2pan
@script 
void main() {
	performattack(getlocalvar("self"), openborconstant("ANI_freespecial6"));
} @end_script
coords 500 0
flip 1
at 0

spawn st3_1_2pan
@script 
void main() {
	performattack(getlocalvar("self"), openborconstant("ANI_freespecial7"));
} @end_script
coords 600 0
flip 1
at 0

spawn st3_1_2pan
@script 
void main() {
	performattack(getlocalvar("self"), openborconstant("ANI_freespecial8"));
} @end_script
coords 700 0
flip 1
at 0

spawn st3_1_2pan
@script 
void main() {
	performattack(getlocalvar("self"), openborconstant("ANI_freespecial9"));
} @end_script
coords 800 0
flip 1
at 0

spawn st3_1_2pan
@script 
void main() {
	performattack(getlocalvar("self"), openborconstant("ANI_freespecial10"));
} @end_script
coords 900 0
flip 1
at 0



spawn st3_1_2pan
coords  0 0
flip    1
at      0


spawn  endstage0
coords  -100 270 0
at      0


##################

The level looks great and without losing color!  ;D
 
Solution
But if I do this, the 10 panels should share the same palette right?
Thus they could no longer maintain their own palette. Which would mean a great loss of color.
For sure they can have their own palette, if you use palette none. Or you can just change the palette on that animation (which would be better, memory wise).

Finally I was able to find the best way to solve the problem and work more productively with the stages.
Yeah, what I told you above :) You don't need to make 10 different entities for that. Just use one, change their animations and palettes.

 
Back
Top Bottom