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

Re: [pygame] Hello, how to display a background around a active play screen?



Thanks Paul, The image is a png, i use the transform_alpha() before I fliped the image, and it loads.

I had a look around and I cant seem to find a well documented pong example. is there one floating around on the net? the version I am looking at is quite complex (to my simple brain anyway.) What I was looking for is something simple and contained so I could play around with setting up a background graphic ect...




On Tue, Apr 30, 2013 at 9:35 PM, Paul Vincent Craven <paul@xxxxxxxxxxxxxxxx> wrote:
Make sure it isn't a JPG. See here if you want more info on how to set transparency:
http://programarcadegames.com/index.php?chapter=bitmapped_graphics_and_sound&lang=en#section_12

Paul Vincent Craven


On Tue, Apr 30, 2013 at 8:15 AM, Frank Butcher <zxcomputeruser@xxxxxxxxx> wrote:
Hi Paul,

I meant cabinet graphic, but yea basically it was a graphic that would surround the play space. Thanks for your help I will have a play this evening and get it working.

Dan.


On Tue, Apr 30, 2013 at 9:08 PM, Paul Vincent Craven <paul@xxxxxxxxxxxxxxxx> wrote:
I'm not sure what you mean by 'cab', but if it is a graphic, just create the graphic, set the inside color to transparent using setcolorkey, then blit it to the screen after you do all your other drawing and before the flip.

Paul Vincent Craven


On Tue, Apr 30, 2013 at 3:46 AM, Frank Butcher <zxcomputeruser@xxxxxxxxx> wrote:
Afternoon,

Please forgive my newbie question.

I am trying to re-create a arcade cabinet design in pygame. So that the cab displays around the play area.

How can I do this? What I want is say the game to display in 600x400 and the cab to take up the rest of the screen.

Thanks,

Dan.