Hypothetical pygame


Joined
Jun 20, 2015
Messages
1
Reaction score
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
 
Ad

Advertisements

Joined
Jan 28, 2016
Messages
5
Reaction score
1
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....
 
Ad

Advertisements

Joined
Jan 28, 2016
Messages
5
Reaction score
1
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top