Re: [pygame] PySpaceWar 0.9.3
Hi, On 1/5/07, Marius Gedminas <[EMAIL PROTECTED]> wrote: And now the svn version has sound effects and support for music. No actual music, though. Any ideas where I might get freely redistributable soundtracks? For example from flashkit.com, but there are more links in the wiki ("Resources"). Marius Gedminas Greetings Kai
Re: [pygame] when pygame 1.8 will be released?
Why do you want the final release? I assume it's cause you want one that is fully testing and finished --- If you are willing to use a version that is not fully tested and finished, you can always use the latest Release Candidate If you want one that is fully tested and finished, then you can't get one until it's finished --- No matter what your expectations are, what I said above is reality. If you forced a specific release date, and released before it was finished, then the released version wouldn't be fully tested and finished, so you still wouldn't get what you want. I'd suggest you relax about the exact time. You're asking people to predict the future, and all people can ever give is their best guess. ...A better question may be what is still holding back the final release (i.e. what is not fully tested or what is not finished). Then you'd have a sense of the risk you'd be taking by using a release candidate, and also people would know how they can help to finish things sooner. On 1/4/07, flyaflya <[EMAIL PROTECTED]> wrote: I want to use 1.8 in my new game,now it has been finished 90%,I have waited the 1.8 released version almost one month,but it usually been Postponed. so please tell me the Exact time it release. -- http://www.flyaflya.com powered by pygame+python
Re: [pygame] when pygame 1.8 will be released?
they wont i asked this same question about 2 weeks ago. On 1/4/07, flyaflya <[EMAIL PROTECTED]> wrote: I want to use 1.8 in my new game,now it has been finished 90%,I have waited the 1.8 released version almost one month,but it usually been Postponed. so please tell me the Exact time it release. -- http://www.flyaflya.com powered by pygame+python -- Join phpdiscovery.com Now!
Re: [pygame] PySpaceWar 0.9.3
On Thu, Jan 04, 2007 at 05:25:55PM +0100, Kai Kuehne wrote: > On 1/4/07, Marius Gedminas <[EMAIL PROTECTED]> wrote: > >On Tue, Jan 02, 2007 at 06:23:32PM +0100, Kai Kuehne wrote: > >> [Feedback] > >Done in Subversion. You're right, this makes the game considerably more > >fun. > > Great, much better. :) And now the svn version has sound effects and support for music. No actual music, though. Any ideas where I might get freely redistributable soundtracks? Marius Gedminas -- For vi emulation of emacs, just type ":sh emacs" (without the quotes). signature.asc Description: Digital signature
[pygame] when pygame 1.8 will be released?
I want to use 1.8 in my new game,now it has been finished 90%,I have waited the 1.8 released version almost one month,but it usually been Postponed. so please tell me the Exact time it release. -- http://www.flyaflya.com powered by pygame+python
Re: [pygame] Newbie needs help, what's the most efficient (or easiest) way to do this?
On 1/5/07, Charles Joseph Christie II <[EMAIL PROTECTED]> wrote: Thanks for the replies, guys. I was afraid of using mailing lists because I thought I would get loads of "gtfo" and "noob" replies and, well, I never tried to figure out how they worked. That's usually the case for www-forums and IRC. I seldom see monkey wrench-comments like that on mailing lists. That's also a reason I prefer ML before forums. -- - Rikard.
Re: [pygame] Newbie needs help, what's the most efficient (or easiest) way to do this?
Sorry, forgot the smily: On 1/5/07, Kai Kuehne <[EMAIL PROTECTED]> wrote: Ok, knowing python could be useful to make a game in it. ;-) Kai
Re: [pygame] Newbie needs help, what's the most efficient (or easiest) way to do this?
Hi, On 1/5/07, Charles Joseph Christie II <[EMAIL PROTECTED]> wrote: Saw that, but I didn't feel like getting ideas from other people's code until I understood it myself. Oh yeah, and I couldn't make sense of anything I read in that the first time I looked it over (I'd probably get most of it now, but when I looked last time I didn't even know how to get the typing portion, and I couldn't distinguish it from the rest of the code :P ). Ok, knowing python could be useful to make a game in it.
Re: [pygame] Newbie needs help, what's the most efficient (or easiest) way to do this?
Charles Joseph Christie II wrote: Saw that, but I didn't feel like getting ideas from other people's code until I understood it myself. Oh yeah, and I couldn't make sense of anything I read in that the first time I looked it over (I'd probably get most of it now, but when I looked last time I didn't even know how to get the typing portion, and I couldn't distinguish it from the rest of the code :P ). Thanks for the replies, guys. I was afraid of using mailing lists because I thought I would get loads of "gtfo" and "noob" replies and, well, I never tried to figure out how they worked. Thanks for not outcasting me. You guys totally remind me of the Gentoo Linux forums (which is a very good thing) so thanks again! If you find you have any non-pygame-specific Python questions, the Python Tutor mailing list is very friendly also, and there are some really knowledgeable people on that list. You can subscribe to it from the python.org website. Hope to see you there! :) -Luke
Re: [pygame] Newbie needs help, what's the most efficient (or easiest) way to do this?
Saw that, but I didn't feel like getting ideas from other people's code until I understood it myself. Oh yeah, and I couldn't make sense of anything I read in that the first time I looked it over (I'd probably get most of it now, but when I looked last time I didn't even know how to get the typing portion, and I couldn't distinguish it from the rest of the code :P ). Thanks for the replies, guys. I was afraid of using mailing lists because I thought I would get loads of "gtfo" and "noob" replies and, well, I never tried to figure out how they worked. Thanks for not outcasting me. You guys totally remind me of the Gentoo Linux forums (which is a very good thing) so thanks again! On Fri, 5 Jan 2007 01:09:40 +0100 "Kai Kuehne" <[EMAIL PROTECTED]> wrote: > Hi, > > On 1/4/07, Charles Joseph Christie II <[EMAIL PROTECTED]> wrote: > > Well, actually, after I finish all of the homework that's due > > tomorrow. After I get this down, I just have to get the combo timer > > system thing up... But I'll ask about that a little later. Thank > > you! > > Maybe you can find some "ideas" in TypusPocus: > http://python.com.ar/juegos/TypusPocus > > Greetings > Kai
Re: [pygame] Newbie needs help, what's the most efficient (or easiest) way to do this?
Hi, On 1/4/07, Charles Joseph Christie II <[EMAIL PROTECTED]> wrote: Well, actually, after I finish all of the homework that's due tomorrow. After I get this down, I just have to get the combo timer system thing up... But I'll ask about that a little later. Thank you! Maybe you can find some "ideas" in TypusPocus: http://python.com.ar/juegos/TypusPocus Greetings Kai
Re: [pygame] Newbie needs help, what's the most efficient (or easiest) way to do this?
YOU'RE AWESOME! Thank you, I was trying to figure out how to do it, and after a while thought my idea was completely wrong... I owe you one, I'll go and try this right now! Well, actually, after I finish all of the homework that's due tomorrow. After I get this down, I just have to get the combo timer system thing up... But I'll ask about that a little later. Thank you! On Thu, 4 Jan 2007 15:24:46 -0500 Brandon N <[EMAIL PROTECTED]> wrote: > I will not give you the code since you have stated this in an > assignment, but hopefully I can help. > > You are correct that you will need an array, or a list in Python, to > store the strings. I would be more concerned with ease of > programming than efficiency, as this is a pretty straightforward and > non- demanding application. > > So, with that said, you will want your Textsprite class to take a > list of strings instead of just a string. You can do this by saying: > > a = Textsprite(["test string1", "another test!", "can you type > this?"]) > > Now, in your textsprite class, you have a variable that stores the > index of the current letter. You will also have to store the index > of the current string, and replace all references of self.text with > it, as in self.text[self.current_string]. Now, when the user > completes a string, you can increment self.current_string and reset > self.pos and the next string will be presented. > > I hope that this is helpful for you. > > Cheers, > Brandon > > On Jan 4, 2007, at 2:45 PM, Charles Christie wrote: > > > Hey, I am making a typing game in Python using pygame. I have > > finally hit a > > roadblock, and I think I'm toast. I started this game as my senior > > project, > > and I need to have something to at least demonstrate by June. > > > > I think I screwed myself on this one. I thought I knew a > > reasonable amount of > > programming, but absolutely none of it is coming in handy. I had > > to ask for > > help to get what I have now, and now I've hit a road block. > > > > So, what I need is: > > > > A. To find a way to feed multiple strings into the program. As in, > > when you > > finish one string, instead of starting it over again you instead go > > to the next word in the list, which I guessed should be an array of > > strings. I'm probably wrong, though. What's the most efficient (or > > easiest) way to do this? > > > > B. Two timers, a combo timer and a word timer that count backwards. > > I know I can figure out how to do these myself, though. > > > > The code I have so far looks like this: > > ** > > #Credit to scriptedfun (http://www.scriptedfun.com) for the help > > #Stil a very VERY barebones typing script. Still got one last part > > of the main > > #engine to go before getting to work on part two. > > > > import pygame > > from pygame.locals import * > > > > SCREENRECT = Rect(0, 0, 640, 480) > > > > class Textsprite(pygame.sprite.Sprite): > >def __init__(self, text): > >pygame.sprite.Sprite.__init__(self) > >self.text = text > >self.pos = 0 > >self.update() > >def update(self): > >self.image = pygame.font.Font(None, 36).render(self.text, > > 1, (0, 0, 0)) > >self.highlight = pygame.font.Font(None, > > 36).render(self.text[:self.pos], 1, (0, 0, 255)) > >self.image.blit(self.highlight, (0, 0)) > >self.rect = self.image.get_rect() > >self.rect.center = pygame.display.get_surface().get_rect > > ().center > >def keyin(self, key): > >if key == self.text[self.pos]: > >self.pos = self.pos + 1 > >self.combo = self.combo + 1 > >else: > >self.combo = 0 > >if len(self.text) == self.pos: > >self.pos = 0 > > > > def main(): > >pygame.init() > > > >screen = pygame.display.set_mode(SCREENRECT.size) > > > ># make background > >background = pygame.Surface(SCREENRECT.size).convert() > >background.fill((255, 255, 255)) > >screen.blit(background, (0, 0)) > >pygame.display.update() > > > ># keep track of sprites > >all = pygame.sprite.RenderUpdates() > > > ># keep track of time > >clock = pygame.time.Clock() > > > >textsprite = Textsprite('It works!') > >all.add(textsprite) > > > ># game loop > >while 1: > > > ># get input > >for event in pygame.event.get(): > >if event.type == QUIT: > >return > >elif event.type == KEYDOWN: > >if event.key == K_ESCAPE: > >return > >else: > >textsprite.keyin(event.unicode) > > > ># clear sprites > >all.clear(screen, background) > > > ># update sprites > >all.update() > > > ># redraw sprites > >dirty = all.draw(screen) > >pygame.display.update(dirty) > > > ># maintain frame rate > >clock.tick(3
Re: [pygame] Newbie needs help, what's the most efficient (or easiest) way to do this?
I will not give you the code since you have stated this in an assignment, but hopefully I can help. You are correct that you will need an array, or a list in Python, to store the strings. I would be more concerned with ease of programming than efficiency, as this is a pretty straightforward and non- demanding application. So, with that said, you will want your Textsprite class to take a list of strings instead of just a string. You can do this by saying: a = Textsprite(["test string1", "another test!", "can you type this?"]) Now, in your textsprite class, you have a variable that stores the index of the current letter. You will also have to store the index of the current string, and replace all references of self.text with it, as in self.text[self.current_string]. Now, when the user completes a string, you can increment self.current_string and reset self.pos and the next string will be presented. I hope that this is helpful for you. Cheers, Brandon On Jan 4, 2007, at 2:45 PM, Charles Christie wrote: Hey, I am making a typing game in Python using pygame. I have finally hit a roadblock, and I think I'm toast. I started this game as my senior project, and I need to have something to at least demonstrate by June. I think I screwed myself on this one. I thought I knew a reasonable amount of programming, but absolutely none of it is coming in handy. I had to ask for help to get what I have now, and now I've hit a road block. So, what I need is: A. To find a way to feed multiple strings into the program. As in, when you finish one string, instead of starting it over again you instead go to the next word in the list, which I guessed should be an array of strings. I'm probably wrong, though. What's the most efficient (or easiest) way to do this? B. Two timers, a combo timer and a word timer that count backwards. I know I can figure out how to do these myself, though. The code I have so far looks like this: ** #Credit to scriptedfun (http://www.scriptedfun.com) for the help #Stil a very VERY barebones typing script. Still got one last part of the main #engine to go before getting to work on part two. import pygame from pygame.locals import * SCREENRECT = Rect(0, 0, 640, 480) class Textsprite(pygame.sprite.Sprite): def __init__(self, text): pygame.sprite.Sprite.__init__(self) self.text = text self.pos = 0 self.update() def update(self): self.image = pygame.font.Font(None, 36).render(self.text, 1, (0, 0, 0)) self.highlight = pygame.font.Font(None, 36).render(self.text[:self.pos], 1, (0, 0, 255)) self.image.blit(self.highlight, (0, 0)) self.rect = self.image.get_rect() self.rect.center = pygame.display.get_surface().get_rect ().center def keyin(self, key): if key == self.text[self.pos]: self.pos = self.pos + 1 self.combo = self.combo + 1 else: self.combo = 0 if len(self.text) == self.pos: self.pos = 0 def main(): pygame.init() screen = pygame.display.set_mode(SCREENRECT.size) # make background background = pygame.Surface(SCREENRECT.size).convert() background.fill((255, 255, 255)) screen.blit(background, (0, 0)) pygame.display.update() # keep track of sprites all = pygame.sprite.RenderUpdates() # keep track of time clock = pygame.time.Clock() textsprite = Textsprite('It works!') all.add(textsprite) # game loop while 1: # get input for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_ESCAPE: return else: textsprite.keyin(event.unicode) # clear sprites all.clear(screen, background) # update sprites all.update() # redraw sprites dirty = all.draw(screen) pygame.display.update(dirty) # maintain frame rate clock.tick(30) if __name__ == '__main__': main() ** I've never used a mailing list before. I'm quite new at this. Sorry if I disobeyed a rule of conduct or did something considered implite/noobish/stupid.
[pygame] Newbie needs help, what's the most efficient (or easiest) way to do this?
Hey, I am making a typing game in Python using pygame. I have finally hit a roadblock, and I think I'm toast. I started this game as my senior project, and I need to have something to at least demonstrate by June. I think I screwed myself on this one. I thought I knew a reasonable amount of programming, but absolutely none of it is coming in handy. I had to ask for help to get what I have now, and now I've hit a road block. So, what I need is: A. To find a way to feed multiple strings into the program. As in, when you finish one string, instead of starting it over again you instead go to the next word in the list, which I guessed should be an array of strings. I'm probably wrong, though. What's the most efficient (or easiest) way to do this? B. Two timers, a combo timer and a word timer that count backwards. I know I can figure out how to do these myself, though. The code I have so far looks like this: ** #Credit to scriptedfun (http://www.scriptedfun.com) for the help #Stil a very VERY barebones typing script. Still got one last part of the main #engine to go before getting to work on part two. import pygame from pygame.locals import * SCREENRECT = Rect(0, 0, 640, 480) class Textsprite(pygame.sprite.Sprite): def __init__(self, text): pygame.sprite.Sprite.__init__(self) self.text = text self.pos = 0 self.update() def update(self): self.image = pygame.font.Font(None, 36).render(self.text, 1, (0, 0, 0)) self.highlight = pygame.font.Font(None, 36).render(self.text[:self.pos], 1, (0, 0, 255)) self.image.blit(self.highlight, (0, 0)) self.rect = self.image.get_rect() self.rect.center = pygame.display.get_surface().get_rect().center def keyin(self, key): if key == self.text[self.pos]: self.pos = self.pos + 1 self.combo = self.combo + 1 else: self.combo = 0 if len(self.text) == self.pos: self.pos = 0 def main(): pygame.init() screen = pygame.display.set_mode(SCREENRECT.size) # make background background = pygame.Surface(SCREENRECT.size).convert() background.fill((255, 255, 255)) screen.blit(background, (0, 0)) pygame.display.update() # keep track of sprites all = pygame.sprite.RenderUpdates() # keep track of time clock = pygame.time.Clock() textsprite = Textsprite('It works!') all.add(textsprite) # game loop while 1: # get input for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_ESCAPE: return else: textsprite.keyin(event.unicode) # clear sprites all.clear(screen, background) # update sprites all.update() # redraw sprites dirty = all.draw(screen) pygame.display.update(dirty) # maintain frame rate clock.tick(30) if __name__ == '__main__': main() ** I've never used a mailing list before. I'm quite new at this. Sorry if I disobeyed a rule of conduct or did something considered implite/noobish/stupid.
Re: [pygame] PySpaceWar 0.9.3
Hi, On 1/4/07, Marius Gedminas <[EMAIL PROTECTED]> wrote: On Tue, Jan 02, 2007 at 06:23:32PM +0100, Kai Kuehne wrote: > [Feedback] Done in Subversion. You're right, this makes the game considerably more fun. Great, much better. :) Marius Gedminas Kai