Attract-Mode Support > Scripting
Question about carrier.nut image sizing.
keithcorcoran:
What setting controls the size of the images in the carrier slider?
Aside from making wheel images exactly the size you want... I'd like to use existing wheel images, have 1 image display at a time with the rest off screen, but constrain the size of the image to a fixed width (without stretching the image)
Currently if I dont resize the image and feed it the image size I want on screen, the carrier scales the image to fit the width or height since there's only 1 on the screen.
thanks
zpaolo11x:
There are a couple of ways to obtain this, basically the carrier.nut image size is controlled by carrier width and height, number of tiles and padding. In your case you only have 1 tile so width and height directly apply to the image, while padding creates a blank border around that image.
So solution 1, if your images all share the same height, you can create your carrier as large as the screen and as high as desired, set to keep image aspect ratio. Let's say screen is 640x480 and images are 300x200, you define your carrier as 640x200, and you should be good to go. This will make your images all the same size, or all the same height if they are not all at the same proportion.
If your images are not at the same proportion, and you want to have them all at the same width, you have to play a bit with padding, so you create a carrier that has a 640xdesired.carrier.height and add padding so that the actual image width is the one you desire. I don't remember how padding is placed but I think it's half on every frame so in your case to have a 300 pixel image on a 640 screen your padding should be 340 pixels.
keithcorcoran:
good explanation. I'll mess with it and see what I come up with. The scraped wheel images tend to be pretty large so i'll have to tweak until i get something useable.
thanks.
zpaolo11x:
--- Quote from: keithcorcoran on January 15, 2019, 12:06:47 AM ---The scraped wheel images tend to be pretty large so i'll have to tweak until i get something useable.
--- End quote ---
If you want "pixel perfect" wheel images you should look for "Title" collections (that is the snap of the title screen) and crop them yourself, but you can always let AM scale down larger wheel images (and in this case setting obj.mipmap = 1 for every image object will improve on the downscale quality)
keithcorcoran:
that's actually what I did.
since this implementation only has 3 games it's like no effort.
that said, is there a way to keep AM from antialiasing when it scales to screen size?
(this is kind of a layout vs scripting question but...)
I plan to either go from RCA out to a CRT NTSC TV or figure out how to get video from the Pi into my arcade CGA with as little hardward(cost) as possible.
Unsure if I should design my theme at 320x240 or 640x480 (in case I am outputting HDMI to VGA to CGA - my least preferred option)
Since NTSC is '525 lines' I don't knwo what that ends up being in pixels for purposes of creating a theme that appears as hard pixels without antialiasing.
Navigation
[0] Message Index
[#] Next page
Go to full version