Type Panel Overlapping Issue

Bruce

Active member
Hello everyone,

Sorry if this similar question has been asked.
I started learning how to create a stage (level).
I created a simple desert stage (level) with the repeating dirt FX.
When the level starts, the dirt FX (as a panel type) works just fine. After the stage starts scrolling,
the dirt FX starts overlapping each other. Please take a look at the captured pictures.
I've been trying to fix it, but I could not find the cause of it, can someone please give me some advices?

Thank you so much for your help.

Training.txt
Code:
music        data/music/Training.ogg
panel        data/bgs/Desert.png
bglayer      data/bgs/BrightSky.png 0.4 0 0 0 0 0 1 1 1
fglayer      data/bgs/Sun.png -900 0.6 0 1600 -100 0 0 1 1   1 1   0 0 0 0 0
fglayer      data/bgs/Cloud.png -800 0.2 0 200 -50 0 0 1 1   1 1   0 0 0 0 0

maxtossspeed    1000
maxfallspeed    -400
gravity              -25
scrollspeed 2  #defines how fast screen scrolls when player scrolls the screen
             
order          a b c
type           1   # 0 for normal state, 1 is bonus stage (can use special attacks & no slow down on boss kill)
settime        0
notime         1  #Determines whether or not the player can see the game timer
shadowcolor    1
direction    both  #level scrolls both directions

stagenumber    100

# spawn1 {x} {z} {a}
spawn1  60 700 0  
spawn2  90 700 0  
spawn3  120 700 0  
spawn4  150 700 0  

light     256 -32 # X, Z  changes light direction for gfxshadow
at 0

spawn   DirtFX 1
coords 0 0
flip 0
at 0

spawn   DirtFX 1
coords 1920 0
flip 1
at 0

spawn   DirtFX 1
coords 3840 0
flip 0
at 0

DirtFX.txt
Code:
name        DirtFX
type        panel
speed        0
antigravity    100
alpha 1      #alpha transparency
setlayer    5000


anim  idle
    loop    1
    offset    960 0
    delay     10
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big09.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big10.png
    delay    20
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big11.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big12.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big13.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big14.png
    delay    25
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big11.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big12.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big13.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big14.png
    delay    22
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big11.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big12.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big13.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big14.png
    delay    18
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big11.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big12.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big13.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big14.png
    delay    24
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big11.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big12.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big13.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big14.png
    delay     19
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big15.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big16.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big17.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big18.png
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big19.png
    delay    200
    frame    data/chars/SkillEffects/TouchDownFX/TD_Big19.png
 

Attachments

  • Dirt01.png
    Dirt01.png
    2.3 MB · Views: 10
  • Dirt02.png
    Dirt02.png
    2.1 MB · Views: 10
  • Dirt03.png
    Dirt03.png
    2.5 MB · Views: 9
  • Dirt04.png
    Dirt04.png
    2.3 MB · Views: 10
Solution
I added the speedf 0 to DirtFX or changed panel to none, somehow DirtFX is missing at the end of the level. I even added more DirtFX to the training.txt
spawn DirtFX 1
coords 5760 0
flip 1
at 0

You could set high offscreenkill to prevent entities from being removed when being offscreen too far. However, I recommend spawning at proper scrollposes like this:
Code:
spawn   DirtFX 1
coords 0 0
flip 0
at 0

spawn   DirtFX 1
coords 1000 0
flip 1
at 920

spawn   DirtFX 1
coords 1000 0
flip 0
at 2840

spawn   DirtFX 1
coords 1000 0
flip 1
at 4760

You have to pay attention to how other entities are spawned if you do this though.
Well. I really cannot tell which one overlaps the other. But why not use type none instead of type panel? That always stays accordingly in levels.
 
Well. I really cannot tell which one overlaps the other. But why not use type none instead of type panel? That always stays accordingly in levels.
Dirt02 and Dirt04 have little vertical white line. It only overlaps probably a few pixels. It is not a huge problem, but it is bothersome to me. Thank you
 
Hmmm.... try setting speedf 0 to DirtFX.
I added the speedf 0 to DirtFX or changed panel to none, somehow DirtFX is missing at the end of the level. I even added more DirtFX to the training.txt
spawn DirtFX 1
coords 5760 0
flip 1
at 0

. Please see the attachment, thank you
 

Attachments

  • Untitled.png
    Untitled.png
    2.9 MB · Views: 3
I added the speedf 0 to DirtFX or changed panel to none, somehow DirtFX is missing at the end of the level. I even added more DirtFX to the training.txt
spawn DirtFX 1
coords 5760 0
flip 1
at 0

You could set high offscreenkill to prevent entities from being removed when being offscreen too far. However, I recommend spawning at proper scrollposes like this:
Code:
spawn   DirtFX 1
coords 0 0
flip 0
at 0

spawn   DirtFX 1
coords 1000 0
flip 1
at 920

spawn   DirtFX 1
coords 1000 0
flip 0
at 2840

spawn   DirtFX 1
coords 1000 0
flip 1
at 4760

You have to pay attention to how other entities are spawned if you do this though.
 
Solution
However, I recommend spawning at proper scrollposes like this:
Code:
spawn   DirtFX 1
coords 0 0
flip 0
at 0

spawn   DirtFX 1
coords 1000 0
flip 1
at 920

spawn   DirtFX 1
coords 1000 0
flip 0
at 2840

spawn   DirtFX 1
coords 1000 0
flip 1
at 4760

You have to pay attention to how other entities are spawned if you do this though.
I can't do this way because the DirtFX won't spawn until I get to the at xx and I want them all to spawn at the same time as a big long dirt FX.

I changed the DirtFX type to none and added offscreenkill 9999999999, everything seems to work properly - no more white lines!.
THANK YOU so much for your help, really appreciated!
 
Last edited:
Back
Top Bottom