Page 1 of 1

Thread advantages

Posted: Mon Jul 13, 2015 9:55 pm
by AlexsSteel
Hello,

I have a question about the thread module benefits. If i'm using the love.physics module to create the main player and the love.image and love.draw to draw it, Is the thread module an alternative to obtain the player position and draw it in a more efficient way?

I'm sorry about my english.

Re: Thread advantages

Posted: Tue Jul 14, 2015 4:20 pm
by Linkpy
Helloooo !

You might do optimized drawing in the main thread, because (like says the love.thread wiki page), love.window and love.graphics have several restrictions with threading. But, you can use the main thread for drawing and events, and one or more threads for updates, networking, etc.

For exemple, you need to download a file for a server. You might use a thread to download the file and show the progress within the main thread, rather download in the main thread and show the process in another thread. ^^

Re: Thread advantages

Posted: Tue Jul 14, 2015 4:53 pm
by AlexsSteel
Thanks.