re. the Stunt Car MAV - loading B3Ds

Blitz3D Forums/Blitz3D Programming/re. the Stunt Car MAV - loading B3Ds

Vorderman(Posted 2005) [#1]
I've upgraded to XP and running the game in the Blitz IDE I get the MAV that lots of others have been getting.

It's caused by the game loading a B3D file that the game editor produces, using the public B3D code (that I believe is either in the archives or comes in a demo program from Mark) that is shown below.

If I use a B3D exported from 3DSMax then it all works just fine, so the B3D code must be the cause of this problem.

Now, it works on Win2000, BUT I can get win2000 to MAV also if I move the .B3D file from the SCR folder root into a subfolder, but by messing with the lines that write the texture paths I can sometimes get it to work, but I don't understand *WHY* it works or doesn't work - I think it's looking for the textures relative to the B3D, but creating an identical directory structure in a different place still causes a MAV.

So, I think the MAV is being caused by some difference between XP and 2000 that means when Blitz loads the B3D file, for some reason it can't locate the textures.

Anyone got any ideas how I can fix this by modifying the .B3D saving code shown below?




big10p(Posted 2005) [#2]
Have you tried storing your textures in the same folder as the models and then setting the texture paths to "." (which is the current directory). Then, before loading, ChangeDir to the model/texture directory.

I have no idea if this'll work, tbh, as I'm not familiar with the B3D format - do all texture paths have to be absolute? Hmm, surely not - that'd be a nightmare. :P

Strange this is an XP/2000 specific problem, though.

[edit] If by some freak of nature this method does work, you could alternativey set all texture paths to "..\textures" (or whatever) if you wanted to keep the textures in a separate folder.


Vorderman(Posted 2005) [#3]
OK, I think I sorted it -

can you XP users who were getting MAVs please download this new file - http://www.jameskett.dsl.pipex.com/SCR_XP.zip

REMEMBER YOU NEED THE COMPLETE ORIGINAL SCR DEMO - www.jameskett.dsl.pipex.com/SCR_Demo.zip

it's a new EXE (SCR_winXP.exe) and a new DLL for mipmapping and a new track, so unzip it to the original SCR demo folder and overwrite EXPORTED_TRACK.b3d.

It should now work in normal (non-win98-compat) mode in XP, so please can you guys test it and let me know if it works. You'll all have a nice new track to play also!

thank you
James


big10p(Posted 2005) [#4]
Was I way off then, Vorderman? I guess no comment speaks a thousand words. lol.


Vorderman(Posted 2005) [#5]
Sorry, I didn't mean to ignore what you posted, but I was reading through the code and spotted that a small change I had made has screwed up the b3d file structure, so it was my fault and not the original code (posted in the archives by JFK) - it was writing out a blank line for loads of non-existant textures, rather than stopping after it had written out however many were actually used. Why this worked under Win2000 and not XP I don't know, but hopefully it's now sorted.


VP(Posted 2005) [#6]
XP seems to catch some types of illegal memory accesses.

Blitz likes to MAV when you try and access e.g. past the end of an array, WritePixelFast'ing outside of the screen etc.


Beaker(Posted 2005) [#7]
I remember an X file (fredborgs dotmybot demo) that would MAV on some machines and not others. It was fine after I imported/exported it thru Unwrap3D (I think).


Murilo(Posted 2005) [#8]
This version works fine for me :) Both of the previous builds gave me a MAV... Woohoo!

Nice one Vord...


Vorderman(Posted 2005) [#9]
Great, that's really good to hear!

Thanks Daze.


LineOf7s(Posted 2005) [#10]
All fix0red. w00t! :o)


EOF(Posted 2005) [#11]
Working here too now. No errors.
I like to huuuuge jump in the new track. I could almost fit in a cuppa coffee before I land.
Love it :)


VP(Posted 2005) [#12]
Argh, dude! I can't play it!!

Seriously, I don't have a joypad and can't seem to select mouse control.

*whimper*


EOF(Posted 2005) [#13]
I was reading through the code and spotted that a small change I had made has screwed up the b3d file structure
That explains why I could not view the track in Blitz MediaViewer (enhanced). I kept getting a MAV.
Works perfectly now though:



Baystep Productions(Posted 2005) [#14]
OHH MY GOD! THATS HELLA FUN! Love it, top notch.
Physics are perfect, controls perfect, car perfect, views perfect. 10


Oddball(Posted 2005) [#15]
This game is awesome so far. I think the physics feel a lot better than Track Mania, which I found a little disappointing. Hope you finish this and release it.

Argh, dude! I can't play it!!

Seriously, I don't have a joypad and can't seem to select mouse control.

*whimper*
I find it strange that so many games developers don't have joypad or joysticks. What are you people using to test your games?


Damien Sturdy(Posted 2005) [#16]

This game is awesome so far. I think the physics feel a lot better than Track Mania, which I found a little disappointing. Hope you finish this and release it.



I agree with that 100%. Vorderman's done a kickass job :)


VP(Posted 2005) [#17]
@Oddball: I'm not current interested in developing games that require the use of a joypad.

Joypad owners are in a minority. Perhaps M$ will make good on the promise of Xbox360 joypad compatability in Vista and things will change.