Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

arwez

Professional DDRAW programming?????

This topic is 6922 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do the programmers of Starcraft, Jagged Alliance2, or Tiberian Sun make it look so good? I have just finished a cheap frogger clone. I used windows paint and of course it looks like crap, but to aid me in making that I was using tutorials from the web. Most of the tutorials I see are always the same.(how to blit, color key, palette rotation, etc) Aren''t there a lot more directdraw techniques out there to make a game look like today''s professional games??(I heard starcraft uses alpha blending or something like that) Anyone can help me get started in this direction?

Share this post


Link to post
Share on other sites
Advertisement
oh yeah, also does Starcraft, Jag2, or Tiberian Sun actually use what most ddraw tutorials talk about today?(bltfast, colorkeys, and stuff??)

Share this post


Link to post
Share on other sites
As far as I know, directX does not offer all the functions you need to do those kinds of effects. I don''t know if there is an alpha blending function, never heard of one. Thats why I guess there are people using OpenGl or direct3d to do that. As for starcraft, they used a 8bpp mode, so their alpha blending is actually done by using lookup tables.

If you really want your game to look good, you will most likely end up writing some custom functions to do the effects you desire. I''m right now working on a game that uses 16bpp. I''m writing my own alpha blending routines and such. I used direct draw souly for the purpose of addressing the video memory and changing resolutions.

Hope that helped... or at least got you thinking differently.

OneEyeLessThanNone

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
DDraw does not provide things like alpha-blending. You need to write your own or use a library that has that functionality. Take a look at CDX. It is a DDraw, Dsound, Dinput (no D3D yet) wrapper. The website is http://www.cdx.sk and the CVS archive is at www.sourceforge.com

Good luck,
John

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Didn''t Tiberian Sun use 3d stuff (voxels)

Share this post


Link to post
Share on other sites
Although DDraw doesn''t provide fuctions for alpha blending, and you will need to code them yourself, you shouldn''t use it just to access video memory, and change resolution as OneEyeLessThanNone commented on. Blit opperations are supported by every video card nowdays, and performance is much better if you let the card to its own blitting. To do this, all you have to do is use the DD functions to blit, and ONLY use your own blit funtions, when you need an effect that isn''t supported like alpha blending. Also, I wanted to point out that if you are going to be doing a lot of alpha blitting, then you should consider using D3D to do it, again because most cards support this in hardware and performance will be better. Hell, while I''m on the topic, I wanted to know if anyone wanted to work on a megaman style side scroller using D3D for all the rendering. I really need an artist. Pseudo_me@email.com if you are interested.

Pseudo

Share this post


Link to post
Share on other sites
Problem is Pseudo...
that Starcraft uses NO 3D CARD AT ALL
any 2D 1MegaBytes (yes its right) RAM video card will do fine ... even on P133/16Mega RAM.....

Now how the Hell do you explain that?

IMHO u have to do your own code if u want ANY ALPHA BLENDING

and BltFast dosent worth its name is no way faster than blt...and even slow if u are doing blt from video to video

IMHO thodays games are fine if they can do 3D in video ram .... but the first moment they get out of 3D (like in 2D) they are going to need HUGE video RAM ... more than 64Megs i think....so this is not available....and we have do do our own blt routines because system to system ddrwa blt function is very very slow at least 100-1000 times the one the video board does ... but u can do it in asm only 10-50 times slower than the hardware ... so its ok sometimes .... (and you always have to do it if u do alpha for units... u canget away only for menus....)

this is my tested current HO

Good Luck in ASM programming.....because DDraw will help u only half way...

Share this post


Link to post
Share on other sites
You don''t need a 3D card to do Direct 3D. It''s faster, but you don''t need one.

The way StarCraft was made to look cool was with several tricks:

1. good art
2. layering of tiles
3. good art
4. Smacker animations
5. "Fake" alpha blitting

I believe the "Alpha Blitting" in StarCraft was really just a matter of playing with the pallatte.

For instance:
int AlphaList[256][256];
This array, given 2 pallette values, will return the "Alpha Mixed" pallette value.

New Pixel Color = AlphaList[32][199];


Share this post


Link to post
Share on other sites
quote:
Original post by bogdanontanu

BltFast dosent worth its name is no way faster than blt...and even slow if u are doing blt from video to video


I shall quote this from the DirectX 7 SDK docs for BltFast:

quote:

This method works only on display memory surfaces
{...}
The software implementation of IDirectDrawSurface7::BltFast is 10 percent faster than the IDirectDrawSurface7::Blt method. However, there is no speed difference between the two if display hardware is used.



So, BltFast and Blt are exactly the same if the DDraw driver supports hardware blits and both surfaces are in video memory. Otherwise, BltFast is quicker, because it doesn''t clip.

TheTwistedOne
http://www.angrycake.com

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!