Hypothetical pygame

Discussion in 'Python' started by mann7, Jun 20, 2015.

  1. mann7

    mann7

    Joined:
    Jun 20, 2015
    Messages:
    1
    Likes Received:
    0
    I've been looking up various ways to do this, and python seems a pretty strong contender, still???
    I'm thnking of using pygame to start with.
    Now I'm assuming there's an import statement where I can import into pygame some existing short image sequences or png's and use them as sprites. I don't want to draw anything in python.
    Is that true?
    This is NOT a big action game with plenty of movement; and I'm not interested in the Apple app store, Google Play and I DON'T want to use Windows at all.
    I could use some tutorials or point me in the right direction?
    I'll need a python random number generator or fucntion
    I'll need something on timers (there will actually be 8 small games each with a different timer)
    How does one get the scores in a game to a database (or somewhere else) haven't seen anything on that.
    And if you want to send people from your web site to actually play the game, what game engine would be best, fast, etc. (with python) with the least amount of hassle and time?
    I've looked at cocos2D and cocos3D-x , but any other possibilities?
    I've fooled around a little with Blender, but modeling everything, etc. would take way to much time for this. For this I can get away with 2-D or pseudo 3-D.
    Thanks
     
    mann7, Jun 20, 2015
    #1
    1. Advertisements

  2. mann7

    Joshua Ferguson Abel

    Joined:
    Jan 28, 2016
    Messages:
    5
    Likes Received:
    0
    copy the images to ur current working directory(cwd), then try this

    sprite =pygame.image.load("name.extension")

    this would load the image to the identifier sprite and u can start writting custom function to manipulate the image.

    Note:you can also use file module to trace your image files if they are not in ur cwd

    if u are an intermediate developer consider using sprite module

    hope this helps....
     
    Joshua Ferguson Abel, Jan 28, 2016
    #2
    1. Advertisements

  3. mann7

    Joshua Ferguson Abel

    Joined:
    Jan 28, 2016
    Messages:
    5
    Likes Received:
    0
    for the random part use this:
    import random
    value =random.randint(startnum,endnum)

    this wil choose a random value between startnum and endnum and store it in variable value....hope this helps, u can try reading the pygame documentation for sprite and python documentation for random.

    Hope this helps
     
    Joshua Ferguson Abel, Jan 28, 2016
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hazz

    hypothetical org chart solution

    Hazz, Dec 1, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    661
  2. JTMOBAP
    Replies:
    3
    Views:
    492
    Oscar kind
    Apr 7, 2005
  3. Juha Kettunen
    Replies:
    30
    Views:
    1,209
    Steven T. Hatton
    Apr 14, 2004
  4. AnsNum

    mpeg problem with pygame

    AnsNum, Aug 27, 2003, in forum: Python
    Replies:
    2
    Views:
    867
    Fredrik Lundh
    Aug 27, 2003
  5. Kathleen Kudzma

    Tkinter and Pygame

    Kathleen Kudzma, Sep 16, 2003, in forum: Python
    Replies:
    0
    Views:
    553
    Kathleen Kudzma
    Sep 16, 2003
  6. Pete Shinners

    Pygame 1.6 Released

    Pete Shinners, Oct 23, 2003, in forum: Python
    Replies:
    0
    Views:
    433
    Pete Shinners
    Oct 23, 2003
  7. Alex
    Replies:
    1
    Views:
    387
    BGB / cr88192
    Mar 15, 2010
  8. rantingrick

    [pygame-bug] Pygame.cdrom bug

    rantingrick, Jan 30, 2011, in forum: Python
    Replies:
    1
    Views:
    591
    Benjamin Kaplan
    Jan 30, 2011
Loading...