forums

TNT Basic Forums > Programming Q&A
about transparency
< Last Thread     Next Thread >
Author
Thread        Post A Reply

12-05-2003 11:09

Posted by:
JW

Location:
Netherlands

Click Here to Email JW   Find more posts by JW

Hello everybody, i've just started working with realbasic and i can say that it's really good. A lot of good possibility and not hard to learn at all.

I have one question, it's about making sprites transparent.
It's a very powerfull tool, but i have noticed that my result is not
exactly what i expected.
For example: if i use a white square and sets it transperancy at
90, there are a lot of pixels you can see. The result is not that beautifull on large sprites with a lot of the same colour.
In my opinion the square should be the same colour...

Can i do something to make it look a little bit better...?


Jan-Willem

12-05-2003 18:17

Posted by:
JW

Location:
Netherlands

Click Here to Email JW   Find more posts by JW

I have just discovered that the problem above is solved in the "HARDWARE MODE". It's very beautifull instead..
You just don't see anymore pixels... this is what i was looking for.
But it seems that the scrolling isn't that smooth in hardware mode ?

Maybe someone can tell me the difference on hardware en normal mode.
I do understand that hardware mode uses the graphic card..

Is it normal that graphic mode isn't that smooth with scrolling pictures?
For now it's more likely that i will choose the normal graphic mode, but i do like scaling sprites and rotating.... and transparency

Jan-Willem

12-05-2003 21:23

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Hadware mode envables rotation and scaling, so it's harder for your computer to execute and it will probably go slower. Transparency is better cause graphics mode supports 8-bits transparency as hardware mode supports 16-bits transparency ( i think ) hope this helps...

12-05-2003 22:19

Posted by:
JW

Location:
Netherlands

Click Here to Email JW   Find more posts by JW

Testing in hardware mode will give a average fps of 70 in my game. 60 in normal mode. But it's so much smoother in normal mode.
Except of the scaling and rotating and the 16 bit transparent, normal mode is better..
Isn't that stange, 30 fps is enough for my game, but the scrolling has to
be as smooth as possible. Should hardware mode not be better in this ?

Is there anything to make software graphic mode transparency nicer.



Jan-Willem

12-06-2003 20:39

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

There is maybe some way to optimise the masks with dither?And I don't know why hardware mode could be faster than software mode... maybe it's a super video card or maybe a bug in fps detection?

12-07-2003 03:02

Posted by:
buddy

Location:
Champaign, IL

Click Here to Email buddy   Find more posts by buddy

I remember reading in the forums here that in hardware mode, your screen (viewport?) redraws completely every frame. In normal mode, in only redraws areas that have changed.

12-07-2003 07:02

Posted by:
JW

Location:
Netherlands

Click Here to Email JW   Find more posts by JW

I'm not familiar with dither. What is it and how can i do that.

Jan-Willem

12-07-2003 15:11

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

It means your transparency will be "grainy" instead of being blocky. Look at these examples: ( the numbers of colors has been reduced to show the difference )

original mask:
http://silvernetwork.net/~asond/dither-examples/original.jpg


dither:
http://silvernetwork.net/~asond/dither-examples/diffusion-dither.gif


blocky:
http://silvernetwork.net/~asond/dither-examples/no-dither.gif

12-07-2003 15:12

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Oh and you can do that in many painting/image processing software but I don't know many of them coz I own the best, Adobe Photoshop.

12-07-2003 19:19

Posted by:
JW

Location:
Netherlands

Click Here to Email JW   Find more posts by JW

Thank, i will try that.


Jan-Willem

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.