Can Blitz read .wld Files?

Blitz3D Forums/Blitz3D Beginners Area/Can Blitz read .wld Files?

Crazy4Code(Posted 2005) [#1]
I made a dungeon using Maplet, and I want to put some meshes into it using World Assembler off this site. I did this and could either save it as an editor file or a world(.wld) file. Can Blitz read either of these? and if it can, how do I load them?


WolRon(Posted 2005) [#2]
No.


WolRon(Posted 2005) [#3]
Here are some file formats Blitz can read (probably not all of them):
.x
.3ds
.b3d

.md2
.bsp

.bmp
.png
.jpg

.raw
.wav
.ogg
.mp3
.mid
.mod
.s3m
.xm
.it
.rmi
.mp2
.wma
.asf

.gif
.avi
.mpeg (or is it .mpg?)


Crazy4Code(Posted 2005) [#4]
Then why can you download World Assembler off this site when you can't even make a world in a file that blitz can read?


WolRon(Posted 2005) [#5]
I don't know anything about World Assembler but you are probably supposed to write your own importing code to load the file. Check the documentation with World Assembler.


Snarkbait(Posted 2005) [#6]
Use the 'world loader.bb' include file that came with world assembler.


Crazy4Code(Posted 2005) [#7]
Oh, I was wondering what that was. Thanks.

For some reason, blitz won't read the b3d files I made with Maplet. Also, Maplet crashes when I try to export in .x. Maybe I should re download it and install it?

Also, is there anything I have to do to load the worlds besides include the one .bb file?


Crazy4Code(Posted 2005) [#8]
I redownloaded Maplet and it still does the same thing. Why would it do that?

I also found out that World Assembler can read the b3d files that blitz can't.

It also says that World Assembler can export in b3d format, but I don't see that anywhere,

This is exactly what I wrote:
crypt\entity = LoadMesh("Crypt1demo.b3d")

but blitz says it doesn't exist. It's in the same folder and World Assembler can read it. What's going on?


Ross C(Posted 2005) [#9]
See right after that loading statement, do

debuglog(crypt\entity)

and see what the debuglog spits out. If it spits out zero, the file probably isn't there. Double, triple check the file .b3d is in with the code your running.


Crazy4Code(Posted 2005) [#10]
I put that right after the loading statement, but It didn't do anything it went right to:
PositionEntity crypt\entity,crypt\x,crypt\y,crypt\z
and said File does not exist.

The File is DEFINATELY in there.

Also, You know how I said that Maplet crashed when I tried to make a .x file? It only does that on the map that I made, but not on the ones maplet came with. Why?


Crazy4Code(Posted 2005) [#11]
I just tried making a new maplet map and it made a .x file. Why does it work now? This is so weird.


Crazy4Code(Posted 2005) [#12]
Yep, It works to make one now. But I spent so much time making that last map and now it doesn't work!


Crazy4Code(Posted 2005) [#13]
It seems like my Blitz can't read b3d at all, because I tried several different meshes that I didn't even make, and it still doesn't work!


Snarkbait(Posted 2005) [#14]
post the code you are trying.


Crazy4Code(Posted 2005) [#15]
I sorta did up there, but I'll do it again:

player\entity = LoadMesh("player.b3d")

Is there any other part I should post?


Erroneouss(Posted 2005) [#16]
Update B3D. I had that problem. Some
older versions of b3d can't load .b3d files.
Ironic, 'eh?


BlitzSupport(Posted 2005) [#17]

Update B3D. I had that problem. Some
older versions of b3d can't load .b3d files.
Ironic, 'eh?


Versions 1.66 and upwards support .b3d. Blitz was unable to support .b3d before because... the .b3d format didn't exist.


Crazy4Code(Posted 2005) [#18]
Oh, thanks. Where do I get an update? (I'll probably find it before you reply)


Erroneouss(Posted 2005) [#19]
http://blitzbasic.com/Community/posts.php?topic=44434


Crazy4Code(Posted 2005) [#20]
It just says internal error


Crazy4Code(Posted 2005) [#21]
Found it!


Crazy4Code(Posted 2005) [#22]
About the .wld files: So all I do is include the world loader.bb and then it works?


DH(Posted 2005) [#23]
No, use the function in the Worldloader.bb for loading .wld files.


Crazy4Code(Posted 2005) [#24]
You mean LoadWorld? And also, When the world is loaded, can I control each mesh that I put in that world?


Ross C(Posted 2005) [#25]
You will probably need to use the FindChild() command to extract them :o)


Crazy4Code(Posted 2005) [#26]
okay, I'll try it.


Crazy4Code(Posted 2005) [#27]
So far, this is what I did, but it doesn't work. I made the .wld, included the World Loader.bb file, but what I did was replaced my Crypt.x file which was just the map itself, and replaced it with Crypt.wld, but it says entity does not exist.

crypt\entity = LoadWorld("Crypt.wld")

Are .wld's treated differentlty than meshes?


Luke.H(Posted 2005) [#28]
Look at the "Example Game.bb"

And you will see the command 'LoadWorld("In-door Map.wld")'

That is what you use


Crazy4Code(Posted 2005) [#29]
Okay.