Results 1 to 2 of 2

Thread: randomly generate surfaces in pygame

  1. #1
    Join Date
    Jun 2008
    under a box
    Ubuntu 8.04 Hardy Heron

    Question randomly generate surfaces in pygame

    Is there a way to generate random surface names in pygame? I'm trying to make it so when you press the mouse button, a random image will come up where the cursor is (like a stamp.)

    I have the mouse position varuables set up already. I was thinking I could make a list with all of the image names then use .pop(randomnumber) to take it out and return it. But then how do I position them? and If there are duplicates, will the original stamp simply snap to where the new one will go?

    I need help

  2. #2
    Join Date
    Feb 2007

    Re: randomly generate surfaces in pygame

    Your question is probably within my domain of knowledge, but I don't have the time to figure out a precise answer for it. I will, however, make a pathetic attempt at being useful in suggesting that you ask here if no one here can help you.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts