Page 1 of 4

(almost)MAV-less Blitz3D

Posted: Sat Aug 13, 2016 11:26 pm
by juanjp600
I was bored so I grabbed MSVC 6.0 from a shady corner of the Internet and modified Blitz3D to make a version that can produce executables that don't crash immediately when an error is found.
Instead, each error is added to a queue that you can retrieve details from by calling ErrorLog(), like so:

Code: Select all

Local errStr$ = ErrorLog() ;get first error
While Len(errStr)>0 ;if string is empty, there are no more errors
    ;do something with errStr here
    errStr$ = ErrorLog() ;get next error
Wend
When an error occurs, the function that had the error returns 0 instead of forcing the game to close, which means it could potentially keep running without major problems other than a missing or misplaced object.

MAV's aren't completely gone, but they should be a lot harder to get.
One instance where error checking is not performed is in WritePixelFast/ReadPixelFast, because adding that could ruin the purpose of those functions.

Download here:
https://www.dropbox.com/s/6pvl4sdldd8kx ... n.zip?dl=1

Source code:
https://github.com/juanjp600/blitz3d/
To install this, rename your Blitz3D bin folder and put this one in as a replacement. Any executables produced by this version require fmod.dll to run.

Re: MAV-less Blitz3D

Posted: Sun Aug 14, 2016 12:43 am
by Inclination
You da man.

Re: (almost)MAV-less Blitz3D

Posted: Sun Aug 14, 2016 7:25 am
by Sad_ness
juanjpro wrote:I was bored so I grabbed MSVC 6.0 from a shady corner of the Internet and modified Blitz3D to make a version that can produce executables that don't crash immediately when an error is found.
Instead, each error is added to a queue that you can retrieve details from by calling ErrorLog(), like so:

Code: Select all

Local errStr$ = ErrorLog() ;get first error
While Len(errStr)>0 ;if string is empty, there are no more errors
    ;do something with errStr here
    errStr$ = ErrorLog() ;get next error
Wend
When an error occurs, the function that had the error returns 0 instead of forcing the game to close, which means it could potentially keep running without major problems other than a missing or misplaced object.

MAV's aren't completely gone, but they should be a lot harder to get.

Download here:
https://www.dropbox.com/s/6pvl4sdldd8kx ... n.zip?dl=1 (I'll release the source code at some point, might need some cleanup first)
To install this, rename your Blitz3D bin folder and put this one in as a replacement. Any executables produced by this version require fmod.dll to run.

Where can I find my Blitz3D bin folder?

Re: (almost)MAV-less Blitz3D

Posted: Sun Aug 14, 2016 12:52 pm
by juanjp600
When you install Blitz3D, the default folder should be C:\Program Files (x86)\Blitz3D.

Re: (almost)MAV-less Blitz3D

Posted: Sun Aug 14, 2016 5:48 pm
by GeneralSilent
You're the hero we need.

Re: (almost)MAV-less Blitz3D

Posted: Sun Aug 14, 2016 6:25 pm
by Sad_ness
juanjpro wrote:When you install Blitz3D, the default folder should be C:\Program Files (x86)\Blitz3D.
I guess I don't have Blitz3D installed then. Where can I install the right one? There's multiple on the Blitz3D site and idk which one.

Re: (almost)MAV-less Blitz3D

Posted: Sun Aug 14, 2016 6:31 pm
by AgentParadox
Sad_ness wrote:I guess I don't have Blitz3D installed then. Where can I install the right one? There's multiple on the Blitz3D site and idk which one.
This one:
Image

Re: (almost)MAV-less Blitz3D

Posted: Sun Aug 14, 2016 6:41 pm
by juanjp600
Sad_ness wrote:I guess I don't have Blitz3D installed then. Where can I install the right one? There's multiple on the Blitz3D site and idk which one.
Here's where you sign up: http://www.blitzbasic.com/Account/signup.php. Just follow the steps in the image KirbyMario uploaded, and once you register the product to your account, download v1.108c from the updates page.

Here's a modified version of SCPCB that hopefully won't crash, but instead errors will be dumped into a log file: https://www.dropbox.com/s/rkegfhysmeken ... s.zip?dl=1

Re: (almost)MAV-less Blitz3D

Posted: Sun Aug 14, 2016 8:40 pm
by Sad_ness
juanjpro wrote:
Sad_ness wrote:I guess I don't have Blitz3D installed then. Where can I install the right one? There's multiple on the Blitz3D site and idk which one.
Here's where you sign up: http://www.blitzbasic.com/Account/signup.php. Just follow the steps in the image KirbyMario uploaded, and once you register the product to your account, download v1.108c from the updates page.

Here's a modified version of SCPCB that hopefully won't crash, but instead errors will be dumped into a log file: https://www.dropbox.com/s/rkegfhysmeken ... s.zip?dl=1
Alright, thanks.

edit: Is that modified version going to be updated when future updates come out?

Re: (almost)MAV-less Blitz3D

Posted: Sun Aug 14, 2016 8:54 pm
by juanjp600
If you're referring to the modified CB build, I wouldn't be surprised if it became an official part of the game.

As for Blitz3D itself, I'll never have to update code, because it's dead.