[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] GSoC



Sam Bull wrote:

But, from a conversation with someone else about this, it was suggested
that this could complicate the game code, and it would be better to use
events in order to keep the game code and GUI code separated.

It's not necessary to use pygame events to achieve that. Techniques
for keeping GUI and application code decoupled are well known. Google
"MVC" for more information.

The only good reason I can think of for using events this way is if
for some reason you need to handle the event asynchronously, i.e. you
need to ensure that all processing for the current event is completed
before carrying out the action. Otherwise, using an event is probably
just needless complication.

--
Greg