[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] scaling the entire screen



On Tue, Mar 18, 2008 at 11:45 PM, Thiago Chaves <shundread@xxxxxxxxx> wrote:
Pardon my ignorance, but isn't it simpler to just scale every separate
image only once when you're loading them? Then you'd keep scale
information in a variable so you can tell what's the apropriate
spacing between images. What's flawed in my idea?
  Nothing.  You just have to chose how you'll do it.  It is all a matter of how you want to do it.  There is no "right" way, but there are very wrong ways and more right ways than others.  

--For example, if you're going to scale everything, it will be faster to do it beforehand, instead of repeatedly.  This will help simplicity.  
--Of course, if your graphics get rotated when you play the game, then you should use rotozoom() as that will be the equivalent to rotating the max. resolution image, then scaling the rotated image, (as opposed to rotating the small image, which leads to unnecessary visual distortions).  
--You don't, want to scale a small surface (like 100x100) to a large resolution (like 200x2000) EVERY frame.  That will be slow.  
--What is more correct is to scale things first, before the game starts.  
--But, if the graphics are always going to be at a set resolution, then it is more correct to keep your images in a lower (or higher) resolution to begin with.  
--This also applies if you are going to scale the images up, but the images are scaleable.  (For instance, a single pixel in the center of a blank 3x3 image can be blown up to like 100x100 without any visual mess-ings up).  
--Remember, scaling things up takes longer than scaling things down.

Ian