need help with wld level 3d viewer

Blitz3D Forums/Blitz3D Programming/need help with wld level 3d viewer

Caton(Posted 2014) [#1]

It won't read the tiles and objects right , can somebody help?


Midimaster(Posted 2014) [#2]
Your error description is very short. Could you please state it more precisely?


Two here two first tests:

I.
------
you could test if an object was found or not:
FloorTex=LoadTexture("ROOT\Graphics\floor.jpg")
DEBUGLOG "Floortext=" + FloorText
If the debug logger prints a zero, the file could not be found on the hard disc.


II.
---------
Do you really have a folder named "ROOT"? Is it really next ( means in the same folder) to your sourcecode?


Caton(Posted 2014) [#3]
It is realy data not realy root
it will not read the level tiles or objects right I'm trying to get it to read the wonderland levels.
It only won't load the tiles or objects right and in the right places


Caton(Posted 2014) [#4]
Can Somebody help me with this to load the tiles and objects thats, what that does not work right.


Caton(Posted 2014) [#5]
and all the objects are found and models,textures but can somebody fix my code so it will load the level file correctly?


Matty(Posted 2014) [#6]
What does it do?

Do you get an error message?

Is it possible that the scene loads but your camera is pointing at the wrong location?

You will need to be more specific about what is actually going wrong.


Caton(Posted 2014) [#7]
if you herd of wonderland.
I am trying to get this program to read the tiles and objects but when I try that I don't know how to get it to work.


Caton(Posted 2014) [#8]
I used the hex editor to see the code of the level but I see tiles and objects after the tiles code.


Doggie(Posted 2014) [#9]
You're probably going to have to make a zip file with the code and all assets
so a person can actually load and try your program.


Floyd(Posted 2014) [#10]
In order to load a .lev file you need to know exactly how information is arranged in the file. Is that documented anywhere?


Caton(Posted 2014) [#11]
https://www.dropbox.com/s/w5dh0b17f3fc543/wld%20lev%20viewer.zip?dl=1 here it is.


Floyd(Posted 2014) [#12]
Okay, what's the problem? The program runs and reads some stuff. Are the numbers not what you expected?

x and y both run from 0 to 21.

Here are the x,y,z and map(x,y,z) values which result. The ones up to about y=10 look reasonable.




Doggie(Posted 2014) [#13]
Ok. Doubt I can be of any help since I've no idea how to handle the lev file.
It would be my best guess that the file references assets which you dont have
therefore you get only the white shapes. Have you contacted the Return To WOnderland devs at midnight@... ? From the looks of their website and what they say about themselves they might be willing to help you out. Looks like a fun game and I can see why you'd like to be able to use the level editor..I wouldn't mind doing the same. Visiting their site I was able to download a free copy of Operation Carnage(which I remember playing all those years ago) It loads and runs perfect with D-Fend Reloaded.
Hope you get this sorted.


Caton(Posted 2014) [#14]
how do I use that code in my program?
and I have the game assets



Floyd(Posted 2014) [#15]
how do I use that code in my program?


No idea, sorry.

The numbers came from your code for reading the .lev file:

;read tile layer
For y = 0 To mapy
	For x = 0 To mapx
		For z = 0 To 1
			map(x,y,z) = ReadInt( levelin )
		Next
	Next
Next


After that there is some code which implies that x,y is a location on a grid while z = 0 or 1 means tile or obj. The map value is a code indicating what is being defined. For example 200 is TileWall and 201 is TileWallDown, whatever that means.

All I'm doing is reading your code and guessing. Some of the values don't seem to fit with the others.
For example map(7,20,0) = 1768759397.

Ultimately you will have to work this out. It's your code and your level file.


Caton(Posted 2014) [#16]
this level is from the first wonderland game developed by midnight synergy.


xlsior(Posted 2014) [#17]
For example map(7,20,0) = 1768759397.


Could potentially be multiple assets numbers, bit-shifted to fit in the same single variable


Caton(Posted 2014) [#18]
.Lev format
coily.lev
================
String:Level Info = Stinky & Loof Level File
String:Levelname = coily
String:LevelTile = Coily on the Loose!
Float:LevelTimer = 300
Int:LevelTexture= 4
Int:LevelBackground= 5
Int:LevelHeight= 21
Int:LevelHeight= 21
Int:LevelTiles = Tile Types
Int:LevelObjects = Object Types
?String:LevelLetter = LetterString?
?String:LevelLetter = LetterString?
?String:LevelLetter = LetterString?
?String:LevelLetter = LetterString?
?String:LevelLetter = LetterString?
?String:LevelLetter = LetterString?
? Int:LevelMusic = ?


Caton(Posted 2014) [#19]
somebody help me with this. so I can have the program handle the lev file.


Floyd(Posted 2014) [#20]
You apparently believe that someone here knows how .lev files are structured, but I see no evidence of that. The only documentation we have is your program. It produces plausible looking values for most of the map. But the following block of numbers doesn't look anything like the others and the meaning is unknown:

    x    y    z      map 

    1   20    1      1701669204
    2   20    0      544434464
    2   20    1      544501614
    3   20    0      2032168559
    3   20    1      544372079
    4   20    0      1701079411
    4   20    1      1868112686
    5   20    0      1852776565
    5   20    1      1746958700
    6   20    0      543520353
    6   20    1      1701996660
    7   20    0      1768759397
    7   20    1      1702131054
    8   20    0      1869881459
    8   20    1      1836016419
    9   20    0      1952803952
    9   20    1      1752440933
   10   20    0      1814066025
   10   20    1      1818588773
   11   20    0      589308705
   11   20    1      9504
   12   20    0      1918981888
   12   20    1      1735289198
   13   20    0      589373729
   13   20    1      1635214658
   14   20    0      1864394098
   14   20    1      1126309990
   15   20    0      2037148015
   15   20    1      555819298
   16   20    0      539172899
   16   20    1      2301987
   17   20    0      1750335488
   17   20    1      543519333
   18   20    0      543519329
   18   20    1      544173940
   19   20    0      2037277037
   19   20    1      543584032
   20   20    0      1835362420
   20   20    1      589308705
   21   20    0      589308704



Caton(Posted 2014) [#21]
a example code please?