Thread advantages

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
AlexsSteel
Prole
Posts: 17
Joined: Sat Dec 27, 2014 2:11 am

Thread advantages

Post 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.
User avatar
Linkpy
Party member
Posts: 102
Joined: Fri Aug 29, 2014 6:05 pm
Location: France
Contact:

Re: Thread advantages

Post 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. ^^
Founder of NeoShadow Studio. Currently working on the project "Sirami".
github / linkpy
User avatar
AlexsSteel
Prole
Posts: 17
Joined: Sat Dec 27, 2014 2:11 am

Re: Thread advantages

Post by AlexsSteel »

Thanks.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests