Play while loading

Blitz3D Forums/Blitz3D Programming/Play while loading

PeachJay(Posted 2003) [#1]
Having already written some java applets (even a game).
With java I have the oppertunity to run the code in several threads. I use one thread for downloading the data and graphics, and an other thread for the actual game.
The advantage is, that as soon as a minimum amount of graphics are loaded, the game can start. And while the game is running, graphics are loaded for the next level (in the background).

What about Blitz3d? Is there a posibility to do such "Background" file loading eg. graphics or music while the game is running, without having the short breaks (pauses) while the system is accessing the hard drive?

It's just boring to wait in front of a status bar waiting for all of the graphics etc. to be loaded, before beeing able to start playing.

Thanks for any ideas.


Rob(Posted 2003) [#2]
You can start music playing but thats about it.


Bot Builder(Posted 2003) [#3]
you could right your own loading functions that only do a bit at a time. not worth it though.


LostCargo(Posted 2003) [#4]
technically you could do it. but you would have to write your own loader manager. You can do that without threads. Just have a function that gets called every few frames to load more materials. Once the key materials and meshes are loaded that you need, then you can begin play. Problem with loading large meshes materials and music is that it takes time. which means that the game can hitch cause its reading from the HD for physical materials. the only way to fix that is to break meshes/materials up into smaller chunks. I will assume you did not have a java loader that loaded only a few bytes at a time, so you would have suffered the same problem if you had been loading large contents.


PeachJay(Posted 2004) [#5]
It works perfectly with java. Even large files downloading from the internet.

Please have a look at the following sample:
<a=href"http://www.johner.de/fun/java/spiel/index.html">http://www.johner.de/fun/java/spiel/index.html</a>

I hope "Multithreading" will be included in future blitz versions.

PS: How can I find out if this would be a good idea??
Can I contact Mark Sibly directly and ask him if he would implement such a feature in Blitz-Max?


PeachJay(Posted 2004) [#6]
UUppss.
Here is the correct link:

http://www.johner.de/fun/java/spiel/index.html


eBusiness(Posted 2004) [#7]
Huh, that's a hard game.