[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] timing question
- To: pygame-users@xxxxxxxx
- Subject: [pygame] timing question
- From: "Miguel Sicart" <mundial82@xxxxxxxxx>
- Date: Tue, 29 Jan 2008 11:06:06 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Tue, 29 Jan 2008 05:06:15 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=00Zu/0nkkGS67t58gJpUz+2IMmZCnCIP8h8aqzDlA9E=; b=gex3M7TbxBoHxAbwC59l8yM82tXVb54rWerXstRYiR8++QpHVcMjvi1RZqhtTTnCY0LWSIkbamAfgOT3ui7iQGm99dmXthEeOCynz8M0DymXabmG7rYbFnncJwqMX7MbO+SkSdoB0Rf1BuecKnfh9J1x5e/fJeOo5uwCDdDve+s=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=UqtLC0SR0s0Kf2JKJVBSzLRi4IktJ5rqI8/ug/7YWIP/aJ+vdlxfjwsr+nOHpPBwTZMbJn8G87M/OtJOjYxkv1931VHZViXsIXnc30T8TyG2c93sK7qOcFWwu8UNcwa34XNLv/yyUd+MEC5uSMWe9+SRFPQxfY/zTvXHOyKzbTY=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi all,
I'm writing a little text-based game and I have stumbled upon a strange newbie problem.
In this game, the player has to input a number of commands in order to interact with the game. I am using raw_input to get input from the player.
My problem is that I want to make it turn based, and I want to limit the amount of time players have per turn. And I don't know how to do that. I have tried to create an event and push it to the event list, but it doesn't act until the player provides input, so it is not working.
So the idea is:
player provides specific input (raw_input)
game objects are affected by input
+1 turn
if turns = x:
game over
I am quite sure this is a simple problem, but I have been going around it for a couple of days with no success - help! :)
thanks!
mundial