This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-12-28 11:53:52

Gravitation
New Scratcher
Registered: 2012-09-26
Posts: 500+

I need some Python help

I'm making a little game using Pyglet for practice, and it'll connect to a server (sort of) to save progress, and you login when it launches, and it retrieves your progress.

It auto-saves every time the game changes (about every minute or so). I'll "connect" using urllib. It'll get the contents of a page on a website for it (with the save data sent using GET parameters) and the page will be blank. Of course, the PHP scripts in that page will run and modify the database, so the data can be accessed later. My program will repeat this until the data it gets is blank, because my host sometimes throws errors, and then the save fails. Retrieving progress will work much the same, but data will be printed to the page, so I'll need a more complex anti-server-error system.

The problem is, see, while it's saving/retrieving progress, my game freezes. Can somebody explain to me how to create a parallel process without creating another window? Thanks in advance  big_smile

Offline

 

#2 2012-12-28 13:03:40

Gravitation
New Scratcher
Registered: 2012-09-26
Posts: 500+

Re: I need some Python help

I think I can use the threading module...?

Offline

 

Board footer