realbasic-games
[Top] [All Lists]

Re: SuperSpriteSurface Resizing and Cloning in Code

To: realbasic-games at lists dot realsoftware dot com
Subject: Re: SuperSpriteSurface Resizing and Cloning in Code
From: James Noe <jamninak at go dot com>
Date: Tue, 27 Sep 2005 17:24:47 -0700 (PDT)
Delivered-to: realbasic-games at lists dot realsoftware dot com
Jesse Simko wrote:

>If you change the aspect ratio of a SuperSpriteSurface while scaling it, the 
>sprites will be stretched and distoreted. But scaling the SuperSpriteSurface 
>without changing its aspect ratio works great. (You still might need to call 
>"reset" to make it look right.)
>That's why in my game engine, every screen setting conforms to a 4:3 aspect 
>ratio.
>--Jesse


That?s a good tip. That matches what I am seeing on my screen. Does that cause 
the sprites to also get scaled with the size of the SuperSpriteSurface? I can 
see situations where you would want that behavior and situations where you 
wouldn?t want it. I imagine if the sprites are scaled you could always iterate 
through all of the sprites and change it back to 1 if that is what you are 
looking for.

As I was trying to come to grips with this I tried making the 
SuperSpriteSurface as large as my largest window size and if I made my window 
size smaller, I made sure in code to keep all of the sprites in the visible 
portion of the surface. This worked Ok for my simple demo project but may use 
up more graphic memory. I am not sure if portions of the surface outside the 
window border get culled or not. If you want your sprites scaled you also need 
to do that in code as well, to match the new window size.

Thanks, Jim


___________________________________________________
Check-out GO.com
GO get your free GO E-Mail account with expanded storage of 6 MB!
http://mail.go.com


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>