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

Re: [pygame] Best practices for creating multiple resolution 2D pixel-art games?



.svg image's have a width/height in the data. So it might be set to 100x100 units in the vector image, and I tell it to render to 320x320 pixels in game. Or 10x10 pixels. Or squish it.

Using cairo+rsvg You can render as a pygame surface, from the .svg data. ( Trying to fully learn this myself, have it mostly working, but problem with color channels being swapped : http://stackoverflow.com/questions/10163870/wrong-color-channels-pygame-cairo-rsvg-drawing/10168809#10168809 )

Although, You can render from .svg directly to png, later to be loaded in game.

Spriter *just* released a new beta: http://www.kickstarter.com/projects/539087245/spriter/posts

On Fri, Apr 6, 2012 at 6:46 AM, Sam Bull <sam.hacking@xxxxxxxx> wrote:
On Thu, 2012-04-05 at 18:24 +0200, Santiago Romero wrote:
>  How do you think I should be handling all this?

One idea not mentioned, that I'm thinking about implementing, is to use
vector graphics. I'm presuming that when you import an svg file into a
game, it is turned into a standard bitmap.
       But, I see no reason you can't scale it to the correct size for
whatever resolution is selected on the fly, before the code imports it
as a bitmap. This means you would always have a perfect full-resolution
image for any selected screen resolution.

You would probably need to decide on an aspect ratio and stick with it
though, how you decide to adjust to different screen ratios is up to
you.




--
Jake