Re: Graphic Library and market share

brian sharon <[email protected]>
Newsgroups gmane.games.devel.general
Message-ID <[email protected]>
Switching to DirectX won't necessarily fix your alpha-blending problems, 
as the crappy machines are also the least likely to support 
hardware-accelerated 2D blits (I'm just assuming 2D here as you're using 
SDL).  Of course you can switch to a 3D API and get blending done by the 
hardware, but then you'll be requiring hardware acceleration for a 2D 
game, which is probably not what you want to do :)

I would guess that you're setting up your back buffer in video memory 
and rendering your sprites there.  What kills you there is the need to 
read rendered pixel values back off the video card so that the CPU can 
do the alpha blend between source and destination.  Transferring data 
back from the video card is slooooooow. 

I had the same problem with an SDL app a couple of years ago.  Here's 
how I set things up to fix it:

* render the entire frame to a buffer in system memory (with 
alpha-blending enabled)
* do one large screen-sized copy blit from system memory to the back 
buffer on the video card
* flip the back buffer to the front

Switching to rendering in system memory provided a significant 
performance boost for me.  I'd try that before you rewrite your app.

--brian

Sebastian Uribe wrote:

> ###
> Note: Sorry if this appears twice, i first sent it with another email 
> address (not subscripted to the list) but it's still awaiting 
> moderator approval
> ###
>
> Hi,
>
>   We're making some small puzzle game for Win32 to be (hopefully) 
> distributed online. We're currently using SDL (as we had planned to 
> make it easily portable), but some problems with it are slowing down 
> our development (timer granularity and slow alpha blitting mostly).
>   So we're thinking in using DirectX for now, and later care about 
> other platforms. I wanted to get some idea about the installed base of 
> DirectX. I believe DX8.1 comes with Windows XP, and at least DX6 or 
> DX7 must come with W2K. We don't care a lot about W98 right now 
> (¿Should we?). Our programmers say DX8 will be easier to use tan DX7, 
> but I'm worried it will restrict our market share, as we're not 
> targeting hardcore gamers (with the latest in machine and OS).
>
>   ¿What's your experience with this? Any comment will be appreciated!
>
> PD: I believe OpenGL would probably be well suited also, but the main 
> programmer in this proyect feels more comfortable with DX.
>
>   Thanks
>




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=557
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.