Archived

This topic is now archived and is closed to further replies.

Skibum

Thread usage (when to do so)

Recommended Posts

Skibum    122
I''m working on a tile based single player scripted RPG, and was wondering where and if i should use any threads besides the main process. A link to a good tutorial on when to use and when not to use threads in games and applications would be of a lot of use. Thanks in advance.

Share this post


Link to post
Share on other sites
Shannon Barber    1681
There''s an article on GameDev about making a thread for the message pump and one for the game loop.

A thread (or thread pool) for asyncronous IO can be useful too. (loading large files, or network IO).

If a task needs to be performed infrequently (relative to computer speeds) but needs to be hot (needs to happens right away when it does need to happen) it''s a good canidate for a thread.

If you''re using DirectX, it''ll employ threads where it sees fit, with DirectSound or DirectPlay most notably.

I, unfortunetly, do not know of any tutorials.

Share this post


Link to post
Share on other sites