![]() |
|
[BG] Size and Position - Printable Version +- Little Fighter Empire - Forums (https://lf-empire.de/forum) +-- Forum: Little Fighter 2 Zone (https://lf-empire.de/forum/forumdisplay.php?fid=7) +--- Forum: Data Changing (https://lf-empire.de/forum/forumdisplay.php?fid=11) +--- Thread: [BG] Size and Position (/showthread.php?tid=10855) |
|
Size and Position - seikosantana - 05-22-2018 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! RE: Size and Position - Silverthorn - 05-26-2018 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! RE: Size and Position - seikosantana - 05-27-2018 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? ![]() RE: Size and Position - Silverthorn - 05-27-2018 All defined through the width. Typical BG-start looks like this:
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: ![]() https://lf-empire.de/lfe-fileplanet/backgrounds/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. |