Post by EightBitDragon on Jan 21, 2012 18:07:05 GMT -5
Black Screen of Death
This usually occurs on internal graphics cards, low end graphics cards, and on some Intel chipsets. There is no solution yet other than upgrading your graphics card. You could try the GraphicsLost() function (Blitz3D v1.99) to check if the graphics buffer has crashed, and then re-execute the Graphics() call, and then reload the stage. You could also try converting the engine to Xors3D which uses DirectX 9, which may or may not be more stable. (I don't know of anyone who has tried, but its something to check out.)
Memory Access Violation
99% of the time, this error occurs because a resource (a sound, model, texture) has been misplaced. It is an easy bug to fix with the compiler's debug enabled. Often, the debug window will jump right to the line in question, which may have your LoadSound() LoadMesh() functions, and you may have made a simple typo in the file name.
Other reasons this happens, is when an object gets freed (deleted), a mesh becomes a child of another mesh, or a variable gets deleted. The game is trying to access a resource which was there, but now it isn't. Check your code for any instances where the object may have been parented or deleted by accident. Also, check the stage.xml, and make sure your syntax has no errors, and there are no misspellings.
This error can also occur because of exported models. If your model has a scene root, and you try to access an object by name, it can give you an error because all the entities within the mesh are now child objects of the scene root. The exporter, especially the 3DS Max exporter, can be tricky sometimes. The exporter may not export some models with relative paths, which can also lead to the error. (dds textures anyone?)
Unable to Create 3D Scene
This problem is rare, but can happen for any number of reasons. Most often, its a mistake made by newbies to Blitz3D. If you try to create or load a 3D object before you initialize the graphics with Graphics3D() you will get this error. Be sure to load 3D stuff after the Graphics3D() call.
However, this is not the only reason. Every Blitz3D game can fail, not just BlitzSonic, because of various PC related issues. The first thing to check is that no other programs have 'hijacked' the video card. I've read in the BlitzBasic forums that Netmeeting can do this.
Also, Some PC's have issues running Blitz3D games in windowed mode. Try to go full screen by editing the config.xml file. Also, try changing the bit depth.
I had this issue the other day, so I began killing background programs to no avail. I kept searching for more reasons this would be happening because I didn't have another game running, I didn't have 3DS Max running, I didn't have Netmeeting even installed, and no Blitz3D application would run - not even full screen. Finally I got tired of searching and closed FireFox.....and THEN EVERYTHING STARTED WORKING AGAIN! Turns out FireFox can eat up a lot of ram, enough to prevent some programs from starting up or functioning properly. It really can be caused by anything!
If all else fails, update your graphics card drivers, and restart. If nothing else, just restart, restarting your PC tends to fix a lot of issues for some reason. Hence, HARD RESET!
Illegal Type Conversion
When working with 'types' (called structures and/or classes in other programming languages) it is important to remember that a object created with a type object is just that - a type object. You cannot create a function like UpdateSpikes(s) and send a Spike object to it. It must always reference the type definition to know what it is. Much like when you define a variable to be a string$ you must add the $ to tell the compiler that its a string variable. Now, the function UpdateSpikes(s.Spike) will work if you have defined a type called Spike, because you have told it that its a type variable, and more specifically a Spike variable. Now you can access the components of the s.Spike object within the function.
Anytime you work with types, you must remember to add the .Name to the variable when it is created or when it is to be accessed in a function, exactly like using $ to define and access a string.
Sonic is: running sideways / lying down / face planting / velcro'd on my stage!
There are 2 reasons this happens:
The first and most common is smoothing groups. In 3D modeling, polygons are shaded to be smooth based on which groups they belong to, hence they are called smoothing groups in 3DS Max, but they may be called other things in other software. Anyway, when you export your model, the groups get exported as well. When Sonic encounters a smoothing group, the normal of the polygon (which way is up, down,...) is 'interpolated', meaning it varies from one polygon to the other, even if they are right angles. Blitz3D and just about every engine does this, its how the engine shades the polygon properly. To fix this, all you need to do is remove the offending polygons from that smoothing group. Alternatively, you could create a collision mesh, remove all smoothing from it, set the visible flag to 0 in the stage.xml file, and then remove collision from the visible mesh by setting collision to 0.
The other reason could be the pivot point. Whether or not you are aware of it, your model has a pivot point in Blitz3D, which tells the engine which direction is up, down, left or right. If this pivot is mirrored or rotated the wrong way, then all the polygons facing in that general direction will be affected. To fix the pivot, in your 3D app, create a cube and attach your stage to it. Then delete the cube's polygons. The stage should retain the cube's pivot. Depending on your software, you could also manipulate the pivot itself without having to create a cube for it's pivot. Simply mirror, flip, or rotate the pivot as needed until it fixes the problem.
This usually occurs on internal graphics cards, low end graphics cards, and on some Intel chipsets. There is no solution yet other than upgrading your graphics card. You could try the GraphicsLost() function (Blitz3D v1.99) to check if the graphics buffer has crashed, and then re-execute the Graphics() call, and then reload the stage. You could also try converting the engine to Xors3D which uses DirectX 9, which may or may not be more stable. (I don't know of anyone who has tried, but its something to check out.)
Memory Access Violation
99% of the time, this error occurs because a resource (a sound, model, texture) has been misplaced. It is an easy bug to fix with the compiler's debug enabled. Often, the debug window will jump right to the line in question, which may have your LoadSound() LoadMesh() functions, and you may have made a simple typo in the file name.
Other reasons this happens, is when an object gets freed (deleted), a mesh becomes a child of another mesh, or a variable gets deleted. The game is trying to access a resource which was there, but now it isn't. Check your code for any instances where the object may have been parented or deleted by accident. Also, check the stage.xml, and make sure your syntax has no errors, and there are no misspellings.
This error can also occur because of exported models. If your model has a scene root, and you try to access an object by name, it can give you an error because all the entities within the mesh are now child objects of the scene root. The exporter, especially the 3DS Max exporter, can be tricky sometimes. The exporter may not export some models with relative paths, which can also lead to the error. (dds textures anyone?)
Unable to Create 3D Scene
This problem is rare, but can happen for any number of reasons. Most often, its a mistake made by newbies to Blitz3D. If you try to create or load a 3D object before you initialize the graphics with Graphics3D() you will get this error. Be sure to load 3D stuff after the Graphics3D() call.
However, this is not the only reason. Every Blitz3D game can fail, not just BlitzSonic, because of various PC related issues. The first thing to check is that no other programs have 'hijacked' the video card. I've read in the BlitzBasic forums that Netmeeting can do this.
Also, Some PC's have issues running Blitz3D games in windowed mode. Try to go full screen by editing the config.xml file. Also, try changing the bit depth.
I had this issue the other day, so I began killing background programs to no avail. I kept searching for more reasons this would be happening because I didn't have another game running, I didn't have 3DS Max running, I didn't have Netmeeting even installed, and no Blitz3D application would run - not even full screen. Finally I got tired of searching and closed FireFox.....and THEN EVERYTHING STARTED WORKING AGAIN! Turns out FireFox can eat up a lot of ram, enough to prevent some programs from starting up or functioning properly. It really can be caused by anything!
If all else fails, update your graphics card drivers, and restart. If nothing else, just restart, restarting your PC tends to fix a lot of issues for some reason. Hence, HARD RESET!
Illegal Type Conversion
When working with 'types' (called structures and/or classes in other programming languages) it is important to remember that a object created with a type object is just that - a type object. You cannot create a function like UpdateSpikes(s) and send a Spike object to it. It must always reference the type definition to know what it is. Much like when you define a variable to be a string$ you must add the $ to tell the compiler that its a string variable. Now, the function UpdateSpikes(s.Spike) will work if you have defined a type called Spike, because you have told it that its a type variable, and more specifically a Spike variable. Now you can access the components of the s.Spike object within the function.
Anytime you work with types, you must remember to add the .Name to the variable when it is created or when it is to be accessed in a function, exactly like using $ to define and access a string.
Sonic is: running sideways / lying down / face planting / velcro'd on my stage!
There are 2 reasons this happens:
The first and most common is smoothing groups. In 3D modeling, polygons are shaded to be smooth based on which groups they belong to, hence they are called smoothing groups in 3DS Max, but they may be called other things in other software. Anyway, when you export your model, the groups get exported as well. When Sonic encounters a smoothing group, the normal of the polygon (which way is up, down,...) is 'interpolated', meaning it varies from one polygon to the other, even if they are right angles. Blitz3D and just about every engine does this, its how the engine shades the polygon properly. To fix this, all you need to do is remove the offending polygons from that smoothing group. Alternatively, you could create a collision mesh, remove all smoothing from it, set the visible flag to 0 in the stage.xml file, and then remove collision from the visible mesh by setting collision to 0.
The other reason could be the pivot point. Whether or not you are aware of it, your model has a pivot point in Blitz3D, which tells the engine which direction is up, down, left or right. If this pivot is mirrored or rotated the wrong way, then all the polygons facing in that general direction will be affected. To fix the pivot, in your 3D app, create a cube and attach your stage to it. Then delete the cube's polygons. The stage should retain the cube's pivot. Depending on your software, you could also manipulate the pivot itself without having to create a cube for it's pivot. Simply mirror, flip, or rotate the pivot as needed until it fixes the problem.