Jump to content

  • Log In with Google      Sign In   
  • Create Account


pygame: sprite blitting woes


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 AndrewBC   Members   -  Reputation: 280

Like
0Likes
Like

Posted 28 October 2008 - 05:47 PM

Hi. I'm having a few issues with my code, and I'm hoping I might get a fresh set of eyes, or a swift kick in the arse, to point me in the right direction. The idea of the "game" is simply to get a ball rolling along with a scrolling background, and all that you can do is go left or right, or stay still, or quit. The Source: http://gamedev.pastebin.com/m496dd379 EDIT: The ball spritesheet: http://tinypic.com/view.php?pic=1paq7o&s=4 The background: http://tinypic.com/view.php?pic=wc0ns4&s=4 (Note, these are obviously not finished products.) (Also, they're to be under the "Data" directory which resides with the source.) The first issue I'm having is that I can't seem to be able to do any clipping on the ball spritesheet, if I'm using the group's draw method. I've looked at the documentation and I can't figure it out. Am I missing something? The second issue I'm having is an odd sort of slowdown in the background's (and possibly the ball's) velocity, in certain situations. It's consistent at least. I would most likely be able to figure this one out, so feel free to only spend time on it if it's due to a glaring mistake you see. The third issue I'm having is about how to go about tiling the background as it scrolls. Of course the first issue will have to be solved prior to attempting to solve this one, but I'm rather inexperienced with doing this, so perhaps a light overview of the thought behind the process would suffice for when the time comes. In any case, if you spot anything else in my code that needs attention, I welcome the sharing of thoughts upon it. Furthermore, thank you for taking the time to read my post! [Edited by - OminousZounds on October 29, 2008 12:36:46 AM]

Sponsor:

#2 Oluseyi   Staff Emeritus   -  Reputation: 1670

Like
0Likes
Like

Posted 28 October 2008 - 06:23 PM

You should also upload the images you're using, so people can run your code immediately and possibly step through it.

This is a link to an incomplete article on implementing scrolling, with example code in Python. Unfortunately, it seems like GDNet's wiki is accessible right now...

#3 AndrewBC   Members   -  Reputation: 280

Like
0Likes
Like

Posted 28 October 2008 - 06:33 PM

Ah, I didn't think of that. Those will be edited into my original post shortly. And thanks for the wiki link, I'll check it out as soon as it's working.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS