Release mode problems

Blitz3D Forums/Blitz3D Programming/Release mode problems

nivek(Posted 2004) [#1]
Why does my game work differently in Release mode than in Debug mode. When in Debug mode everything worked perfect. However, when I go to Release mode the mouse pointer disappears when it should be visible, my human figure model LOOKS different and one of my sprites doesn’t show up, all I get is a white square. If things work properly in Debug mode it should work properly in Release mode. This is a major problem that must be fixed!


Damien Sturdy(Posted 2004) [#2]
Well, my gawd, this is a first
Slight differences usually appear in front/backbuffer issues wen in debug mode but nothing like this...
ANyone any ideas?

i found upping my AGP aparture size in the bios helped (and agp share size to increase memory in onboard systems) altho im not 100% sure why this fixed "white square" issues i had ages and ages back....


jfk EO-11110(Posted 2004) [#3]
I never experienced problems like that. Yes, make sure you handle the backbuffer correctly. If you completely omit to set it, the output may be pretty randomly.

Also make sure to set the window or fullscreen mode since Blitz will use windowed in debug mode and fullscreen mode in release when you omit that setting, if I remember right. so

Graphics3D 640,480,32,2
setbuffer backbuffer()

...

while not game_end
; do things
flip
wend


Should look the same in both modes.


nivek(Posted 2004) [#4]
Whan I set the color depth to 32 everything looks ok except for the sprite. The sprite is still just a white square. I already made sure the .bmp file is in the same folder as the program and the executable file but it doesn't work. It does, however, still work in debug mode. Any ideas to fix the sprite.

Thanks!


EvilMeowChi(Posted 2004) [#5]
make the executable in the same folder as your code. Just in case.


nivek(Posted 2004) [#6]
The executable file is in the same folder.


nivek(Posted 2004) [#7]
MORE PROBLEMS:

When launching from the editor in Release mode it works, even the sprite works. But when I compile NOTHING works. I get a "Memory access violation". What would cause that.

Thanks


GfK(Posted 2004) [#8]
Re: Mouse Problem:
You have to manually draw the mouse pointer in 'fullscreen' mode. Use a 2D image, or a 3D sprite if you're clever.


Re: Things looking 'different':
Try forcing 16 or 32-bit colour mode in fullscreen.


Gabriel(Posted 2004) [#9]
When launching from the editor in Release mode it works, even the sprite works. But when I compile NOTHING works. I get a "Memory access violation". What would cause that.


Errors in your code. Without seeing your code, and knowing a lot more about where all the files are, that's about as much as anyone could say.


nivek(Posted 2004) [#10]
If there was an error in my code shouldn't the memory violation occur when I run from the editor? Why would it work when run from the editor but not when compiled. That doesn't make a lot of sense. Why would the compiled code be trying to access memory it shouldn't access. I have no control over the memory that's accessed. This looks like a problem with the compiler and Blitz3D!


nivek(Posted 2004) [#11]
The problem is with the sprite. When I remove either the HideSprite or PositionEntity command the compiled program works. The sprite produces a muzzle flare for a gun. Here's the code:

Global flare=LoadSprite ("fire.bmp",mesh)
ScaleSprite flare,.04,.04
PositionEntity flare,-.145,.018,-6.1
HideEntity flare

Do you see anything wrong with it?

Thanks


TomToad(Posted 2004) [#12]
the way you are using the LoadSprite() command it's using "mesh" as a texture flag, not as the parent.

LoadSprite ( tex_file$[,tex_flag][,parent] )

It may work in debug mode because whatever screen settings debug mode uses, the incorrect flag may work ok, or may be ignored completely.

Try using LoadSprite("fire.bmp",1,mesh)

or
Global flare=LoadSprite("fire.bmp")
EntityParent flare,mesh

(edited for clarity)