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

Re: [pygame] Newbie needs help, what's the most efficient (or easiest) way to do this?



I would like to ask you guys another question. If you feel in the mood to help me out, feel free... but it turns out that I don't have as much time as I had hoped, because they (my teachers) want something I can demonstrate out by early May. >.< I need to get moving on this, and find some sprites if I can't contact my cousin any time soon...

Is there any way to get pygame to get the right y coordinates of a rect? because I would like to have my text on the right side of the screen and if I knew how to get that, it would be a walk in the park. I know you can do it with some sort of freaky math but I'm trying to figure out how. I'm pretty sure if I googled it longer I could have figured it out but I have 1 minute before I have to get out of this classroom...

A more difficult problem is the timers. I would like to have three of them, but I don't know how to use the pygame.time.Clock() other than setting a framerate. Does anybody have an example of how to use pygame.time.Clock () to keep track of how much time has elapsed since an event and only start after everything else has loaded? Because it would suck to have the clocks start while the program is still loading. That would ruin people's scores.

On 2/4/07, Charles Christie <sonicbhoc@xxxxxxxxx> wrote:
Ha~! I got it working! I went over my code and compared it to a pygame example, and noticed I didn't add my new classes to the "all.add(textsprite)" at the bottom! Well, now it works, but it places the text in the wrong place. I know how to fix that, though! I will have to change parts of the code to be owned by the textsprite class so that the scoring class can access it later, though. Things are definitely shaping up! If my commenting on my progress is getting annoying or if I should only ask for help and not send messages like this, then just say so. I'm still VERY new to this mailing list thing and I'm really excited and loaded up with sugar right now, so forgive my overenthusiasm.

I'm going to go and ask the guy that's helping me with sound how far he's gotten later. If you see anything wrong with the code, or see any places I can improve, can you just say something? I want to get as good at this as I can and I'm willing to invest as much time as I need to in order to make this something memorable and net me that A+ that I really want. ;)


On 2/2/07, Charles Christie < sonicbhoc@xxxxxxxxx> wrote:
Crap. My hard drive died. Good thing I backed this thing up, huh? Well, now that I've recovered, I will post the code as an attatchment like I said I would. Here you go.


On 1/31/07, Charles Joseph Christie II <sonicbhoc@xxxxxxxxx> wrote:
I figured I was doing something wrong... I didn't know I could include
attachments. Sorry, this is really the first experience I've had with
a mailing list...

A few e-mails up, I said I was trying to get the game to display the
letters and words you typed correctly in a row. Someone said to put the
sprites in their own group, so I thought he meant class. So that's what
I did. Yet, the text still doesn't show up on screen... What am I doing
wrong?

Yeah. So when I get back to my laptop I'll attach the code instead of
sending it in the body of my message next time. Sorry about that.

On Tue, 30 Jan 2007 16:26:30 -0600
Luke Paireepinart < rabidpoobear@xxxxxxxxx> wrote:

> Charles Christie wrote:
> > Aww.... it still doesn't work... am I doin' it right?
> What doesn't work?
> it's easier to give you help if you explain the problem you're having
> and only include
> code snippets you think are relevant...
> I have zero desire to read through all your code and try to figure
> out what the problem is,
> especially since if you think there is a problem you probably know
> approximately where it is occurring...
> :)
> Also attachments are better than including the whole thing in your
> e-mail because then you can be
> sure that it isn't messing up your tabs, and you won't have problems
> with wrapping
> -Luke