Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (dr_panther, 1 invisible), 643 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
mouse_sync = on drives me mad #117292
03/14/07 02:18
03/14/07 02:18
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline OP
Expert
Uhrwerk  Offline OP
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Hello everybody,

my question is, if there are any further limitations than the bitmaps dimensions. If i got the point correctly, the the bitmap has to be 32x32 in window mode and 32x16 in fullscreen mode. My bitmaps fullfill that, but the cursor still gets scaled strangely.

Are there any restrictions other than that? Are maybe alpha channels forbidden? I don't get the point here...


Always learn from history, to be sure you make the same mistakes again...
Re: mouse_sync = on drives me mad [Re: Uhrwerk] #117293
03/14/07 09:36
03/14/07 09:36
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
My advice: move away from native mouse_maps's. Assign a dummy bmap to mouse_map (1x1 pixel black or tga with alpha = 0) and use a panel that is being synchronized with the mousepointer.
By this you are able to circumvent the size limitation and any other sideeffects, plus you are free to use other cool features you can do normally just with panels, for example scaling. When you implement a resolution-free display with scaling all panels and stuff, the panel solution for mouse cursors will be useful, because you can scale the cursor panel as well so that the cursor is itself resolution independent as well.

If you want to keep the default button behaviour for panels, the attached panel needs an offset of +1/+1 pixel, other wise it would cover the mousemap/cursor and the buttons/entities can't receive mouse events. If you are smart enough, you can write your own mouse event functions and callbacks so that you have full functionality even with a panel solution. Just in case you dont care about offsets (maybe the cursor is under the attached panel).

I had also a lot of trouble with hardware cursor synchronization, so, I abandoned this and made it on my own which is quiet more satisfying than the GS mouse support.

Cheers
Christian

Last edited by HeelX; 03/14/07 09:37.
Re: mouse_sync = on drives me mad [Re: HeelX] #117294
03/14/07 14:10
03/14/07 14:10
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline OP
Expert
Uhrwerk  Offline OP
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Well, that's a lot of usefull tips. Thank you, Christian. I'll for sure have a look into this.

On the other hand: This can't be so hard. I'd really love to know what I am doing wrong. Creating two bitmaps with the correct dimenstions shouldn't be asked to much of me. :\


Always learn from history, to be sure you make the same mistakes again...
Re: mouse_sync = on drives me mad [Re: Uhrwerk] #117295
03/14/07 14:17
03/14/07 14:17
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Did you tried it with 2 bitmaps (.bmp!) in both sizes.. does it work? Did you tested it the same with tgas with and without alpha channels? Did you checked the behaviour with DDS files and as well PCX?

If this an error, compile a testprogram and post it in the bughuntforum. If you need more information on the method I mentioned, you can still contact me.

cheers, Christian

Re: mouse_sync = on drives me mad [Re: HeelX] #117296
03/14/07 16:07
03/14/07 16:07
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Wow, very nice tips

Re: mouse_sync = on drives me mad [Re: HeelX] #117297
03/14/07 17:25
03/14/07 17:25
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline OP
Expert
Uhrwerk  Offline OP
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Quote:

Did you tried it with 2 bitmaps (.bmp!) in both sizes.. does it work? Did you tested it the same with tgas with and without alpha channels? Did you checked the behaviour with DDS files and as well PCX?



Yes I tried both sizes, even vice versa as told in the manual. That doesn't work. Removing the alpha channels makes mouse_sync work, however, the size of the bitmaps then doesn't matter. I even tried exotic sizes like 40x40. Runs without problems, as soon as the alpha channel is removed. However, without an alphachannel the cursor looks really dumb.

Quote:

If this an error, compile a testprogram and post it in the bughuntforum. If you need more information on the method I mentioned, you can still contact me.



I guess that's the way to go. But I will run a few more testruns before posting this. Nothing is more embarassing than posting a bug which isn't a bug. Thank you for your kind offer. If required I'll make use of that.


Always learn from history, to be sure you make the same mistakes again...
Re: mouse_sync = on drives me mad [Re: Uhrwerk] #117298
03/16/07 13:22
03/16/07 13:22
Joined: Nov 2004
Posts: 888
B
beegee Offline
User
beegee  Offline
User
B

Joined: Nov 2004
Posts: 888
I can advice you don't use mouse_sync, because then the mouse cursor is faster than the A6 engine reacts. This means buttons will recognize the mouse cursor later. So, this function hasn't got any advantages.


Fratch - Newer statistics panel for GameStudio
Re: mouse_sync = on drives me mad [Re: beegee] #117299
03/16/07 14:10
03/16/07 14:10
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline OP
Expert
Uhrwerk  Offline OP
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
The cursor is updated several times a frame. That's true.However, that doesn't affect the way buttons work. It only makes your mouse movement smoother.

I've found out, that mouse_maps with mouse_enabled may contain alpha channels, but their values must always be 0 or 255, so that you gain something like a visibility bitmask.


Always learn from history, to be sure you make the same mistakes again...
Re: mouse_sync = on drives me mad [Re: Uhrwerk] #117300
03/16/07 18:56
03/16/07 18:56
Joined: Nov 2004
Posts: 888
B
beegee Offline
User
beegee  Offline
User
B

Joined: Nov 2004
Posts: 888
Quote:

The cursor is updated several times a frame. That's true.However, that doesn't affect the way buttons work. It only makes your mouse movement smoother.





Well the mouse cursor is updated several times a frame graphically. But, the running functions are executed only one time a frame. The complete engine only updates one time per frame. So if you got a frame rate of 60, the engine updates 60 times a second. The cursor on the other hand is as fast as the monitor screen refresh. And this value depends on your monitor. Normally 60 Hertz(60 times) on a LCD monitor. In this case you won't recognize any fake.

But if you got an fps value of 30 you see that the mouse cursor updates faster. 60 times the cursor, the engine 30 times. This means if you move your mouse quickly over buttons, they don't recognize any movement.

I've tested this months ago.


Fratch - Newer statistics panel for GameStudio
Re: mouse_sync = on drives me mad [Re: beegee] #117301
03/16/07 21:06
03/16/07 21:06
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline OP
Expert
Uhrwerk  Offline OP
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Well, yes, if you're up to over events, then you're right. If you want to use click events only it doesn't matter.


Always learn from history, to be sure you make the same mistakes again...

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1