Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
In Depth Background DC tutorial
#1
A background without a background is dull and boring; on the other hand, if we fight in a good one, our skillz might be enhanced! So here goes all the information that I know on DCing backgrounds.

name:
%s
width: %d
zboundary: %d %d
shadow: %s shadowsize: %d %d

name:
Quite obviously the name of the background

width:
the width of the horizontal plane of the background

zboundary:
the width of the vertical plane of the background

there are 2 values here. the one in front is the upper limit of the playable area, the latter defines the lower limit of the playable area
Since y: 0 ~ 120 is covered by the player HP/MP indicators, that's why the upper limit is usually set at a value greater than 200

shadow:
the file path for the shadow sprite of the background

shadowsize:
dimensions of the shadow
there are 2 values, so use the width and height of the sprite of the shadow

1st type (which uses only pictures)
layer:
%s (file path of the sprites)
transparency: %d
width: %d
x: %d
y: %d
loop: %d
cc: %d
c1: %d
c2: %d
layer_end

transparency:
0 non-transparent; black bits of the background would not be displayed as transparent
1 transparent; black bits of the background would be displayed as transparent

width:
This is to create the parallax scrolling effect, which gives a sense of depth to backgrounds
A norrmal background that is wider than 794 and you want to enable parallax scrolling, this value needs to be greater than 794 and smaller than the width of the background (not the layer)
for example: Lion Forest's width is 3200, and the layer width is 2900 for the forest trees (forestt)
here's an approximate formula:
(2900-800)/(3200-800) = 7/8; when you move 8 pixels to the right, the trees (forestt) of the background would move 7 pixels towards the left
another example: the skyline and some mountains (forests)'s width is 800
(800-800)/(3200-800) = 0; no matter how much you move around, this layer is fixed
As I said earlier, this formula is approximate, because 800 is not the actual value, but it does make nicer numbers for the ratios

x: y:
the starting coordinates where the layers are placed in the background

loop:
If you want repeated images on the same plane, looping makes it more convenient

Now for the animated bits
cc:
the total time which one loop of the animation lasts (time units should be the same as wait values in character data files)
the animation will keep on repeating

c1: %s c2: %s
The values there determine how long that particular picture lasts before moving on to the next layer.
For example in HKC, we have:
cc: 16 c1: 0 c2: 7
cc: 16 c1: 8 c2: 15
so the run time may seem to be 7 units of time, but it actually is 8 units of time, because "0" is one unit as well, so we have "0", "1", "2" .... "7", after that, we go to the second layer, which again has 8 units of waiting time "8", "9", "10", "11" .... "15", thus the total units of time for the whole animation to run before looping is 16, thus cc is 16

2nd Type (which uses blocks of colours to fill in the background)
layer:
%s(file path, any pic shall do)
rect: %d
x: %d
y: %d
width: %d
height: %d
layer_end

rect:
Colour codes under 16 Bit Colour Mode
It's still a mystery as for why marti did not implement it in the 32 bit colour mode...

x: y:
coordinates of the starting point

width: height:
dimensions of the desired colour block

Rect values' corresponding colours:
An extremely professional explanation by YinYin


legend:
%s = string
%d = number


Special thanks to Windmill who taught me everything that I need to know on background data.
Massive thanks to YinYin who made rect values clear as crystal.
you don't want to see this (Click to View)
avatar by Una
the other by xFire
Reply
Thanks given by: Dr. Time


Messages In This Thread
In Depth Background DC tutorial - by Marshall - 05-03-2008, 05:29 PM
RE: In Depth Background DC tutorial - by MH-Razen - 05-03-2008, 05:33 PM
RE: In Depth Background DC tutorial - by Marshall - 05-03-2008, 06:28 PM
RE: In Depth Background DC tutorial - by YinYin - 05-03-2008, 10:09 PM
RE: In Depth Background DC tutorial - by MH-Razen - 05-04-2008, 01:58 AM
RE: In Depth Background DC tutorial - by YinYin - 05-06-2008, 12:24 PM
RE: In Depth Background DC tutorial - by MH-Razen - 05-06-2008, 02:00 PM



Users browsing this thread: 3 Guest(s)