Re: [pygame] Is there some type of hex codes to rgb converter or something?

2007-09-10 Thread Noah Kantrowitz
#abc -> #aabbcc -> (0xaa, 0xbb, 0xcc) --Noah On Sep 10, 2007, at 7:08 PM, Lamonte Harris wrote: I like using HTML hex, is there a library or something on pygame or python it self to convert hex to rgb

Re: [pygame] Is there some type of hex codes to rgb converter or something?

2007-09-10 Thread Luke Paireepinart
Lamonte Harris wrote: It works well for me. Its just a snippet i grabed from my class O_o. The fact that it works doesn't mean it's good practice. This also works: a = 1 b = a + 1 c = b + 1 d = c + 1 e = d + 1 but it's much more common (and better practice) to just straight-away say e = 5 unles

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Lamonte Harris
Sorry I forgot the map1.map file. On 9/10/07, Lamonte Harris <[EMAIL PROTECTED]> wrote: > > Ok heres my outcome. main2.py is the newer one. main.py is the older > one. > > On 9/10/07, Lamonte Harris <[EMAIL PROTECTED] > wrote: > > > > Yeah I just seen it lol sorry my mistake. I'll email back wh

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Lamonte Harris
Ok heres my outcome. main2.py is the newer one. main.py is the older one. On 9/10/07, Lamonte Harris <[EMAIL PROTECTED]> wrote: > > Yeah I just seen it lol sorry my mistake. I'll email back when I'm done. > > Thanks for all the help, so far so good. > > On 9/10/07, Ethan Glasser-Camp <[EMAIL PR

Re: [pygame] Is there some type of hex codes to rgb converter or something?

2007-09-10 Thread Lamonte Harris
It works well for me. Its just a snippet i grabed from my class O_o. On 9/10/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote: > > Lamonte Harris wrote: > > I came up w/ this for my class: > > def hex_converter(self,hexcolorcode): > > hexcolorcode = hexcolorcode[1:] > > red = h

Re: [pygame] Is there some type of hex codes to rgb converter or something?

2007-09-10 Thread Luke Paireepinart
Lamonte Harris wrote: I came up w/ this for my class: def hex_converter(self,hexcolorcode): hexcolorcode = hexcolorcode[1:] red = hexcolorcode[0:2] red = int(red,16) blue = hexcolorcode[2:4] blue = int(blue,16) green = hexcolorcode[4:6]

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Lamonte Harris
Yeah I just seen it lol sorry my mistake. I'll email back when I'm done. Thanks for all the help, so far so good. On 9/10/07, Ethan Glasser-Camp <[EMAIL PROTECTED]> wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Lamonte Harris wrote: > > def __init(self): > > > > Is that a go

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Ethan Glasser-Camp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lamonte Harris wrote: > def __init(self): > > Is that a good start btw? Most people write __init__ instead of __init. The best way to figure out of something is a good start is to keep going with it and see what happens. Ethan -BEGIN PGP SI

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Lamonte Harris
Okay kool, I'll start rewriting and see what I come up with 2morrow :). import pygame,sys,string from pygame.locals import * class Block(pygame.sprite.Sprite): def __init(self): pygame.sprite.Sprite.__init__(self) Is that a good start btw? On 9/10/07, Ethan Glasser-Camp <[EMAIL PROT

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Ethan Glasser-Camp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lamonte Harris wrote: > Oh dude you might be a life saver I found this script on google and I > understand it. > > http://www.daniweb.com/code/snippet390.html thats what you ment right This is a good example of how objects are created and added to a

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Lamonte Harris
Oh dude you might be a life saver I found this script on google and I understand it. http://www.daniweb.com/code/snippet390.html thats what you ment right On 9/10/07, Ethan Glasser-Camp <[EMAIL PROTECTED]> wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Lamonte Harris wrote: > > Ok

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Ethan Glasser-Camp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lamonte Harris wrote: > Okay I'm a bit confused with the whole surfaces[i].image I understand > how to assign rects and all but what I mean is how would I go about > making that class into a list? In Python, lists contain other objects of any type. To

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Lamonte Harris
Okay I'm a bit confused with the whole surfaces[i].image I understand how to assign rects and all but what I mean is how would I go about making that class into a list? On 9/10/07, Ethan Glasser-Camp <[EMAIL PROTECTED]> wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Lamonte Harris

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Ethan Glasser-Camp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lamonte Harris wrote: > class map_: > def __init__(self,block=100,wndow=(300,300)): > self.BLOCK = block > self.size = wndow > self.map = [] > self.surfaces = [[],[]] > self.window = pygame.display.set_mode(s

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Lamonte Harris
Humm.. I don't see why/how I should use it. When it comes to my functions I don't see how I would use it. class map_: def __init__(self,block=100,wndow=(300,300)): self.BLOCK = block self.size = wndow self.map = [] self.surfaces = [[],[]] self.window =

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Ethan Glasser-Camp
Lamonte Harris wrote: > Can you give me a very basic example, I've been trying to look at code > examples and the docs and I'm still not catching on. Attached is a very basic example. Note that I use the Rect move_ip function; if you aren't familiar with pygame.rect.Rect, this might be new to you.

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Lamonte Harris
Can you give me a very basic example, I've been trying to look at code examples and the docs and I'm still not catching on. On 9/10/07, Ethan Glasser-Camp <[EMAIL PROTECTED]> wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Lamonte Harris wrote: > > I still don't understand the sprit

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Ethan Glasser-Camp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lamonte Harris wrote: > I still don't understand the sprite class yet. If you have time can you > give me a brief desc :). The sprite class is like one of your pairs: surface, rect. That's pretty much it. It just keeps the two things together in one

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Lamonte Harris
I still don't understand the sprite class yet. If you have time can you give me a brief desc :). On 9/10/07, Ethan Glasser-Camp <[EMAIL PROTECTED]> wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Lamonte Harris wrote: > > Okay :), I fixed it I had the x and y in the wrong spot: > >

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Ethan Glasser-Camp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lamonte Harris wrote: > Okay :), I fixed it I had the x and y in the wrong spot: > > self.create_box(self.map[z][q][0],self.map[z][q][1],(y,x)) is the > correct method. If you really mean for the variable "y" to mean "vertical position" and the vari

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Lamonte Harris
Okay :), I fixed it I had the x and y in the wrong spot: self.create_box(self.map[z][q][0],self.map[z][q][1],(y,x)) is the correct method. On 9/10/07, Ethan Glasser-Camp <[EMAIL PROTECTED]> wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Lamonte Harris wrote: > > My only flaw is,

Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Ethan Glasser-Camp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lamonte Harris wrote: > My only flaw is, the rects render upside down. What could I do to fix that? Hi, It isn't rendering upside down. If you try a map like: 1,1,1 2,1,2 1,2,2 You will see that in fact, it is rendering sideways. HTH, Ethan

RE: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread paris
flip?http://www.pygame.org/docs/ref/display.html#pygame.display.flipbest,p Original Message Subject: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today. From: "Lamonte Harris" <[EMAIL PROTECTED]> Date: Mon, September 10, 2007 9:05 pm To: pygame-us

[pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.

2007-09-10 Thread Lamonte Harris
Yeah took some time of thinking and fixing and rethinking. Pygame is like a strategy puzzle. I've just mapping script, where in the text file are numbers. I read the numbers from 1,2 and switch then into rects that I created. Them I displayed them on the screen. Its quite nice to make somethin

Re: [pygame] Is there some type of hex codes to rgb converter or something?

2007-09-10 Thread Lamonte Harris
I came up w/ this for my class: def hex_converter(self,hexcolorcode): hexcolorcode = hexcolorcode[1:] red = hexcolorcode[0:2] red = int(red,16) blue = hexcolorcode[2:4] blue = int(blue,16) green = hexcolorcode[4:6] green = int(green,16)

Re: [pygame] Is there some type of hex codes to rgb converter or something?

2007-09-10 Thread Lamonte Harris
Freaking thank you "Tries it out now" On 9/10/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote: > > Lamonte Harris wrote: > > I like using HTML hex, is there a library or something on pygame or > > python it self to convert hex to rgb > HTML hex colors are defined as such: > color = "#DEFFC3" > I.E

Re: [pygame] Is there some type of hex codes to rgb converter or something?

2007-09-10 Thread Luke Paireepinart
Lamonte Harris wrote: I like using HTML hex, is there a library or something on pygame or python it self to convert hex to rgb HTML hex colors are defined as such: color = "#DEFFC3" I.E. a pound sign, then 2 hex digits for red, 2 for green, and 2 for blue. This is very easy to convert between. F

Re: [pygame] Is there a downloadable Manual?

2007-09-10 Thread Lamonte Harris
Works now, a tip for others, save to ur computer before trying to unzip. Using Winzip, it'll say corrupted. On 9/10/07, Ethan Glasser-Camp <[EMAIL PROTECTED]> wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Lamonte Harris wrote: > > Doesn't work for me, let me know when it works. >

Re: [pygame] Is there a downloadable Manual?

2007-09-10 Thread Ethan Glasser-Camp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lamonte Harris wrote: > Doesn't work for me, let me know when it works. Hi, It works for me. If it doesn't work for you, the problem might be on your end. Ethan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG wit

Re: [pygame] Is there a downloadable Manual?

2007-09-10 Thread Lamonte Harris
Doesn't work for me, let me know when it works. On 9/10/07, Lenard Lindstrom <[EMAIL PROTECTED]> wrote: > > Lamonte Harris wrote: > > Life Saver :), can't wait til its updated. > > > > On 9/10/07, *Jason Marshall* <[EMAIL PROTECTED] > > > wrote: > > > > Lamonte, > > >

Re: [pygame] Is there a downloadable Manual?

2007-09-10 Thread Lenard Lindstrom
Lamonte Harris wrote: Life Saver :), can't wait til its updated. On 9/10/07, *Jason Marshall* <[EMAIL PROTECTED] > wrote: Lamonte, This is available, but it's not quite up-to-date: ftp://pygame.org/pub/pygame/pygame-docs-1.6.exe Jason M. ___

[pygame] Is there some type of hex codes to rgb converter or something?

2007-09-10 Thread Lamonte Harris
I like using HTML hex, is there a library or something on pygame or python it self to convert hex to rgb

Re: [pygame] draw.rect question real simple

2007-09-10 Thread Lamonte Harris
Ok kool I sort of thought so. Thanks for the quick reply. More questions coming soon :). On 9/10/07, Kris Schnee <[EMAIL PROTECTED]> wrote: > > Lamonte Harris wrote: > > So basically pygame.draw.rect basically draws on the rect onto the > > surface, so its not actually assigned to anything(such

Re: [pygame] draw.rect question real simple

2007-09-10 Thread Kris Schnee
Lamonte Harris wrote: So basically pygame.draw.rect basically draws on the rect onto the surface, so its not actually assigned to anything(such as a variable). Right; it just performs the action of drawing a rectangle on the specified surface. Note, though, that according to: http://pygame.or

[pygame] draw.rect question real simple

2007-09-10 Thread Lamonte Harris
So basically pygame.draw.rect basically draws on the rect onto the surface, so its not actually assigned to anything(such as a variable).

Re: [pygame] Is there a downloadable Manual?

2007-09-10 Thread Lamonte Harris
Life Saver :), can't wait til its updated. On 9/10/07, Jason Marshall <[EMAIL PROTECTED]> wrote: > > Lamonte, > > This is available, but it's not quite up-to-date: > ftp://pygame.org/pub/pygame/pygame-docs-1.6.exe > > Jason M. > > > > > _

Re: [pygame] Is there a downloadable Manual?

2007-09-10 Thread Jason Marshall
Lamonte, This is available, but it's not quite up-to-date: ftp://pygame.org/pub/pygame/pygame-docs-1.6.exe Jason M. Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. h

Re: [pygame] Is there a downloadable Manual?

2007-09-10 Thread Rikard Bosnjakovic
On 10/09/2007, Lamonte Harris <[EMAIL PROTECTED]> wrote: > its less RAM/CPU usage. Than what? -- - Rikard - http://bos.hack.org/cv/

Re: [pygame] Is there a downloadable Manual?

2007-09-10 Thread Lamonte Harris
Preferrable Compiled HTML Help File, runs smoother and its less RAM/CPU usage. On 9/10/07, Ian Mallett <[EMAIL PROTECTED]> wrote: > > On 9/10/07, Lamonte Harris <[EMAIL PROTECTED]> wrote: > > Would be nice to have one :). > > I second that. >

Re: [pygame] Is there a downloadable Manual?

2007-09-10 Thread Ian Mallett
On 9/10/07, Lamonte Harris <[EMAIL PROTECTED]> wrote: > Would be nice to have one :). I second that.

[pygame] Is there a downloadable Manual?

2007-09-10 Thread Lamonte Harris
Would be nice to have one :).