[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Standard methodology for different game screens
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Standard methodology for different game screens
- From: Devon Scott-Tunkin <djvonfunkin@xxxxxxxxx>
- Date: Sat, 19 Sep 2009 13:30:59 -0700 (PDT)
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sat, 19 Sep 2009 16:31:03 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1253392260; bh=1joXV8qOy+MKI/wTzpL/Swq7+xabzhCwlftpyBH8kyo=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=tcqFp/bIv+ojhqR8Rzi0qPL5W61M2J/i5DHqwOtX5qOEexzuKRhenKkwAzA2xMNLzs9WHFfk52dK9EHILCbluE4/4grWBA+5PY7/+5jQP+G8oN6NlRFRKwLZpPiqr60X0pIkIKBMOym0+gIEREjqonuM3yFOE4L6SmaKyVDMZLg=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=5nErjtcT2onSXUZIO4uc5QsfTmd7BXVf1g+e252sAk5TyBw9mgx1RZH2yCi3b56vJXi11QuhCY1HGdF7j0kewB8k99pGONFJgNOKAOorX9CsTV+EAn+8rOyCehvwBFsFf5KlsUGhYLEkk5Y9VB0fVm9x1LAlFlD3cPqACVRrxLo=;
- In-reply-to: <e6f1edf30909191113nf1fa0f2p95fd972b207f48cf@xxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
A state machine or stack is a usual way to do it, where each state/scene has its own update stuff and event handling and the pygame loop just uses the current scene.
--- On Sat, 9/19/09, Pablo Moleri <pmoleri@xxxxxxxxx> wrote:
> From: Pablo Moleri <pmoleri@xxxxxxxxx>
> Subject: [pygame] Standard methodology for different game screens
> To: pygame-users@xxxxxxxx
> Date: Saturday, September 19, 2009, 1:13 PM
> Hello,
>
> I'm going through a game code
> written in pygame, the game shows different screens:
> - an introduction
>
> - a menu
> - and then it enters to different game modes.
>
> For each of these parts there's a different pygame
> loop, which doesn't seem right.
> I would like to know if there's a standard way to use
> pygame in this scenario.
>
>
> Thanks in advance,
> Pablo
>
>
>