Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Background: Size and Position
#1
Hi!

How do I determine the size of my bitmaps? I checked the dimensions and entered it to make a stage, but it doesn't seem correct and causes silly unrealistic camera moves.

Thanks in advance!
Reply
Thanks given by:
#2
I assume you're talking about the image dimensions, right? In Windows, it should be under file properties > Details tab > Dimensions. Pretty sure there's a similar thing in other OSs. Alternatively, load it into your favorite graphics editor which should display it as well.

Keep in mind that backgrounds feature the
width:
-property which lets images shift with the camera. A value of 794 means that it always moves with the camera or, in other words, it'll stay fixed at a certain position. Lower values are usually pointless, unless you do some magic shenanigans. Higher values make the images scroll, i.e. they do not move as fast as the camera and therefore appear to shift to the left/right of the bg upon movement (-> parallax). If you want to make a player run across the ground which shouldn't have any sort of parallax effect, use
width: [width of the bg]
.

Hope that helps!
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#3
Oh, I see... Is there anything like X-boundary? Can I limit the size of the BG, and make the part in the red rectangle inaccessible by objects?

[Image: iX9Q6yO.png]
Reply
Thanks given by:
#4
All defined through the
width
. Typical BG-start looks like this:
    DC-Code:
name: HK_Coliseum
width: 794   zboundary: 316 442
shadow: bg\sys\hkc\s.bmp  shadowsize: 37 9


794 equals the game's screen size, thereby allowing you to walk everywhere. Larger values will add bg-scrolling whereas lower will make portions of the bg inaccessible. You are in luck, as the accessible area starts from the right, thus you can have left portions for decoration only. Would, for example, look like this:

[Image: Cliff.png]
https://lf-empire.de/lfe-fileplanet/back.../470-cliff

Beware that anything that is dropped into such an area just disappears once hitting the ground. If the blocked zone is too wide, you'll also see projectiles disappearing mid-air.

If you, however, plan on having a scrolling background, i.e. >794 pixels, then this whole ordeal won't work. You'd have to spawn an object and use a zero placer to block access (itr/k14 etc). Works only semi-well because of the randomness of weapon-spawns, ability to roll through itr/k14, etc.
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)