Multiple "Threads"
Blitz3D Forums/Blitz3D Beginners Area/Multiple "Threads"
| ||
Hi, is it possible to create multiple threads, which run independent from each other like you could do it in Java? I have to connect to an internet server and wait for the server's answer. Now if I put the server call in the app's main loop and the server response is very slow, the whole execution of the app is halted until the message arrives, isn't it? How could it be done polling a server without affecting the app /game's rendering? Thanks |
| ||
Nopez, Blitz3D doesn't support threads. |
| ||
I use C++ for the server and Blitz3D for the client because of this... Regards - Xaron |
| ||
Or you could use a dll which uses thread (in C++, or Purebasic, etc) |
| ||
that could be handy! could be interesting on how to make a dll execute parts of the blitz code. theory here, thread1% = calldll("createthread.dll", "code.bb") RunThread(thread1%) StopThread(thread1%) if someone could work out someting like that, blitz 3D would have an advancement just by doing that, i would LOVE to make a loading sequence or animated mesh while the level is loading! |
| ||
Would it be difficult to access an image and frontbuffer from a DLL? You could have a DLL in a seperate thread which updates an image drawn to the screen :) |
| ||
@Neomancer, how would you compile the .bb? @Cygnus, you could pass the blitz internal image structure find the offset to the raw image data. modify it from there, it might work. |
| ||
Apparently it ripped through the town centre, and caused 5m pounds worth of improvements. It would work. it's been done, however, its the accessing of the frontbuffer thats key to seeing these updates, and that hasn't been done yet :) |
| ||
@Kev, if it was possible, but i guess your right, i didn't think about that! |