Advertisement

Game state management in Python (threads, generators, etc)

Started by August 27, 2004 07:57 PM
11 comments, last by GameDev.net 19 years, 11 months ago
Using real thread is, on nowadays PC and console, a really specific operation that should be used only for really known thing...
That is a game can have thread for low level sound (DirectSound does for you ), or low level network ( you must have a thread that listen to what's happening on your ports ).

Other uses are begging for problems. Multi thread make programming much more comlpicated and bug proned. And for most of the code, solid code is the number one mandatory property.

It may change in near future, with the Xbox2, and the PS3, but it's no good news...


For what you want, generators seems just perfect...

Hope it helps,
Quote: Original post by Anonymous Poster
Other uses are begging for problems. Multi thread make programming much more comlpicated and bug proned.
Not with the advent of multicore processors. Intel has proclaimed (and I mean that with all the hype and fanfare that insinuates) that all of its future processors will be multicore, which means that you better get comfortable with MT code if you want decent performance.

Just a friendly heads-up.
Advertisement
In the fact, there are only a few few people that have a multiprocessor computer...

there will be quite some time for it to become the standard, if it is to become the standard.

Threads are a nightmare to synchronized, but for some really simple places.

I can't imagine the win to have a complex code, bug prone, that run slower on most computer, just to win a few FPS on a few computer, that should the fastest...

Quake 3 was optimised for multithreading, and Carmack said it was a mistake... So much work, so little gain...

Creating a game is now a _huge_ work, so many things to do, so little time, so whenever you can avoid spending some time on an hazardous direction, do it...

This topic is closed to new replies.

Advertisement