Difference between revisions of "HowTo:Make Base Backgrounds"
Line 9: | Line 9: | ||
=Making Base Backgrounds= | =Making Base Backgrounds= | ||
− | - Comments by MamiyaOtaru in Forums | + | ==Image Format== |
+ | |||
+ | ==Location Co-Ordinates== | ||
+ | |||
+ | ==Comments by MamiyaOtaru in Forums== | ||
First off, the bases are not full screen due to the config file, not the sprite file. Change that first to have fullscreen bases. So, the explanation: | First off, the bases are not full screen due to the config file, not the sprite file. Change that first to have fullscreen bases. So, the explanation: | ||
Line 36: | Line 40: | ||
=Python Scripts= | =Python Scripts= | ||
+ | |||
=See Also= | =See Also= | ||
− | * See the following Forums [http://vegastrike.sourceforge.net/forums/viewtopic.php?t=4636], | + | * See the following Forums [http://vegastrike.sourceforge.net/forums/viewtopic.php?t=4636], [http://vegastrike.sourceforge.net/forums/viewtopic.php?t=1679&start=0&postdays=0&postorder=asc] |
+ | * Example Scripts | ||
--- | --- |
Revision as of 09:46, 5 August 2005
Make Splash Screens | HowTos | Add Warp Trails |
---
Contents
Making Base Backgrounds
Image Format
Location Co-Ordinates
Comments by MamiyaOtaru in Forums
First off, the bases are not full screen due to the config file, not the sprite file. Change that first to have fullscreen bases. So, the explanation:
In the coordinate system, 0,0 is at the center not the top left. The coordinate system is cartesian, left to right is -1 to 1 x, top to bottom is 1 to -1 y.
Width 2 means the width of the screen (two halves, from -1 to 1) and height 2 means the height of the screen.
In your example, the image is meant to take up 3.104/2 screen widths and 2.4832/2 screen heights. This is because the actual used part of the image (320x200) is approx 512*(2/3.2) x 256*(2/2.5). 3.104 and 2.4832 stretch the image beyond fullscreen, so that the part of the image that actually has something in it (which is only 320x200) will take up fullscreen.
The next two numbers are where the image is centered. Often, those two numbers are actually stored elsewhere. In cockpits, they are stored in the .cpt file and only the dimensions are actually in the .spr file. Here, the X and Y coordinates for the center of the image are in /bases/*.py. Your example is in /bases/pleasure_land.py
Your example is therefore actually 3.104 2.4832 width and height and 0.582 -0.2716 centerX and centerY
The center of the image is thus a little more than half the distance from the center of the screen to the right hand side of the screen. This serves to place the center of the area that has actual content at the center of the screen. The center is a bit more than a quarter of the way from the center to the bottom of the screen for the same reason.
If you use an image that fills up the whole bitmap, without empty space like the priv remake backgrounds, to go fullscreen you would use something like this 2 2 (2 half widths and half heights, from -1, -1 to 1, 1) 0 0 (centered in the center of the screen)
Oh, and pleasure_land.py is also where the animations are linked, if you'd like to remove them for a different background. The animations are the water and the building lights: Jolson_LandingBay_wtr and Jolson_LandingBay_blt respectively. Remove their lines.
Python Scripts
See Also
---
Make Splash Screens | HowTos | Add Warp Trails |