To my understanding, threads speed up processing by splitting the processes. For example, if I want something done without it lagging the game, I can have it processed outside of gm as if it were a separate thread? And if that's the case, does this mean doing everything in their own threads will speed up things?
Situation:It takes 4 seconds for 60mb worth of external images to be unpacked (just a folder with 300 random images for testing), and then repacked back to it's compressed state. (Sorta like a zipped package of resources). Would doing the unpacking/packing process in it's own thread speed up the process? Or will it just eliminate lag on the screen?I'd like to learn more about threads. I've been interested in this topic for awhile and have tried numerous times to mess with them but not doing so well.
Not even seperate paces, it's just that the CPU will flip flop between the two so that both appear to happen concurrently. Best not to think of "making things faster" so much as "running things in the background".
If you had to unpack, process, and repack, then threads could really help by letting you process at the same time as you're unpacking others. It lets you run more than one thing in parallel, but your algorithm has to be able to split things into parallel parts that don't rely on each other to run. For example, you could split, say, physics from objects that aren't interacting into different threads, but you couldn't put physics from two colliding objects in different threads because they rely on information from each other, which they obviously don't have because the other may or may not have been processed yet.
Most tasks can't be split into threads like that, but if they can you can get good performance boosts. It isn't an easy performance boost, by any means, it requires a fundamentally different train of thought to design a threaded game engine than a non-threaded engine.Grand-High seems to be stuck back in the 20th century, where multi-core processors weren't commonplace and true concurrency was impossible. This is no longer the case.My main reason for external resources is initial loading time. Most players won't see half the content in the game unless they play it to the fullest. I feel that loading only the resources needed (as you get further into the game) is just common sense. Plus editing content without forcing people to redownload everything makes patching easy. Especially if you have a big project with lots of images/music that take up space. No one wants to download 60mb every time there's an update, lol. But even if I do only load a little bit at a time throughout the game, the idea of using threads to make it more efficient and getting rid of the split second pause on the GM window is attractive to me.
If I wanted to use this: http://gmc.yoyogames.com/index.php?showtopic=390517 would it do what I'm looking for? Have any of you tried using this DLL?I drive a 96' Ford Thunderbird….