Full screen mode blues

Blitz3D Forums/Blitz3D Beginners Area/Full screen mode blues

Drekinn(Posted 2005) [#1]
Just a few various questions:

1) Is it possible to detect what the current sound or channel volume is of a particular sound/channel?

2) Does the system mouse pointer always disappear when in full screen mode? If so, can someone please tell me the most effective way to use a graphic as a mouse pointer?

I'm currently using this method:
DrawImage pointerGfx,MouseX(),MouseY()

but it gives quite slow and jerky results and I have definitely seen much quicker/smoother results in other Blitz programs. Please help!

3) When the graphics mode is changed, do the Global variables containing graphics that were lost need to be reinitiated as Globals? This becomes a bit tricky when Globals can only be initiated outside functions. I've played around with labels and Gosub & Return but with uncertainty. Can someone suggest an effective way to restore the lost variables when changing graphics modes?

Any assistance would be greatly appreciated.

Thanks.


Jeppe Nielsen(Posted 2005) [#2]
1. I don't think you can do that, you will have to keep track of this yourself.

2. Yes. Your method should be fine, although some graphics cards don't like 2d over 3d if thats what you're using.

3. They don't need to be reinitiated as globals, once set as globals always globals, You will need to load your graphics into the same variables after you change the graphics mode. Just have a function or something that load all the required media, and call this every time you change the graphics mode.

Hope this is of any help.


Mustang(Posted 2005) [#3]
2. I use that too and it's OK but I use it only on my "setup" screen... if you want faster mouse, try using a sprite similar way - like using "LoadPanel(X,Y,Path,Flags)" from the code archives and then moving that (created quad mesh) object around?

http://www.blitzbasic.co.nz/codearcs/codearcs.php?code=1152


Drekinn(Posted 2005) [#4]
Jeppe,
3) They don't? That's good to know. The error I got must have been referring to something else.

Mustang,
2) I'm only coding in 2D, so any further assistance with zippy mouse pointers using 2D would be great.
Hmm, just realised I'm using the WaitTimer command. Could this be having an effect?

Thanks for the help guys.


Drekinn(Posted 2005) [#5]
2) Aha! I figured out why my graphic mouse pointer was jerking around the screen. It seems the effect of the TileImage command was causing the slowdown - without it the pointer now zips about effortlessly. Yippee! Odd though, the tiled image was only a 1kb 12x12 pixel png. Hmm.. Does using TileImage always slow things down so much? Makes me wonder how Blitz would cope with a multi-layered starfield.


big10p(Posted 2005) [#6]
That is odd. TileImage should be blindingly fast - it always is for me. I guess using a small 12x12 image is going to slow it down a bit, but still...

If you dont need masked pixels, you could try using TileBlock, instead.


Drekinn(Posted 2005) [#7]
big10p,
You're probably right about the small dimensions causing Blitz to do more work, plus it -was- a masked image. I'll be sure to do some tests.


Drekinn(Posted 2005) [#8]
Tests done.
Yes, it seems the slow-down was entirely due to the small pixel dimensions of the image and seemingly not the mask effect. To test this I used an image a 1/4 size of the screen with TileImage and my mouse pointer danced around as smooth as silk. :)