2D harder to do than 3D today?

Started by
38 comments, last by bogdanontanu 23 years, 11 months ago
Even 3d games provide a software renderer to work without a 3d gfx card. Though it is starting to become more of a requirement vs. a recommendation.

Maybe if the game (2d rts) is still playable without a 3d card, but doesn''t have any/all the alpha fx, it could be okay.

- n8


nathany.com
Advertisement
Thanks all

But dropping alpha on a non 3D card is not an option...

And a have to tell u again that Starcraft does a lot more alpha than Dune2000 (all units can be "cloaked" eq translucent and almost all units fire has little alpha explosins on traget, all fire on buildings is alpha, etc)

Menus are not a problem ...as i allready use darken only functions....

And i cant keep nothing on witch i want to do real alpha in videoram .....

So i am thinking to make my own blt routines and to drop all direct draw ones for system to system blt... and only use directdraw for setup fullscreen and flip at last...

This makes DDraw at least 1/2 obsolete for me now....i guess he fails to 50% of the job...IMHO....

Anyway i still need the other 50% as i dont want to go to hardware init of every videocard on the market....

But wonder if i will release a Linux version what will i do?
(still is long way until that Linux release )

Thank all once again....
I think i rest my case.....
obysoft
PS
Thanks for that Dune2000 screenshot...but IMHO it just dosent have that much alpha (only that explosion on left)
and there are no flyers on screen with shadows or cloack...
so a Starcraft screenshot will do better



obysoft
Dune 2000 uses alpha blending for the shroud ("fog of war"). Unfortunately I didn''t see any screen shots on their web site that included it.

Anyway, what I was trying to point out is the system requirements (and recommendations) for these games that use alpha blending. They are clearly not using the 3d hardware approach.

These are the requirements for Starcraft:
quote:
Windows 95/98/NT 4.0
Pentium 90 or higher
16MB RAM
SVGA Video Card
DirectX 2.0 or higher


It doesn''t even specify a 2MB card (much less a 3d one), meaning it probably works with your basic 1MB video card.

I would have to say that their method is using custom ASM routines. If they took the 3d approach, they would at least be recommending a 3d card even if it wasn''t required.

Besides writing more of your own ASM routines, I think it would be a good idea to support 640x480 and 800x600... that is a difference between your games and these (they are 640x480 as far as I can tell). But maybe after you have things optimized enough the lower resolution won''t be required. After all, you can make your requirements higher than a P90.

Good luck,

- n8



nathany.com
No one seems to have mentioned that Starcraft runs in 256 color. Alpha is a lot faster and easier to do in 256, all you need is a lookup table...

Starcraft managed to look pretty good using only 256 colors, but it would probably mean a huge amount of rewriting on your part...

Only thing I can think to reccommend is an asm alpha blit routine done with MMX and as much optimization as possible.

"But then the stupider students would be in here complaining, furrowing their brows in a vain attempt to understand the situation..."
"The Gates of Pearl have turned to gold, it seems you've lost your way."

Thanks Nathany for pointing it out for me (and more for others with 3D... in head )how less hardware does Starcraft req...

yes i use 16bit versus 8bits and 800x600 versus 640x480 and i had assumed that todays computers:
-Pentium 2 at 400Mhz with 64Megabytes ram and a 4 to 16 Megabytes Video Ram
WILL DO BETTER THAN P90 with 16M/1M video

Well it looks that Starcraft still Rocks....

but i am close behind

And yes all you guys i wrote all game in pure ASM and my alpha blending is pretty fast....maybe i can do it alittle more faster with MMX ..but this will be a LATE optimization

My problem is still at directx''s so called fast blt...
and it has become obviouse that i have to drop it (if i cant keep surfaces in videoram...and i cant.. )

So I conclude that i have to REWRITE DirectX''s BLT routine with my own asm code.....

Oh my God i am happy to escape that crappy parameters and structures... at least it all looked like a begginer programmer did that in DirectX...no offence..

(think this also answers other question on a different thread...nathany?)

And now a question.....dont flame please

Will u all guys test my alpha/betta release latter this year... ? because it looks u will find any bugs very fast....

See ya...
obysoft
quote:Original post by Rappler
No one seems to have mentioned that Starcraft runs in 256 color. Alpha is a lot faster and easier to do in 256, all you need is a lookup table...

Starcraft managed to look pretty good using only 256 colors, but it would probably mean a huge amount of rewriting on your part...


That''s why I was pointing out Dune 2000, because it also supported 16-bit... similar requirements (P90, I imagine with 256 color... and P133 recommended... likey for highcolor). Starcraft is 256 color only and P90 required.

Nathan.




nathany.com
One thing you might try to do is to use dirty rectangles.

I place everything in system memory and using dirty rectangles more than doubles the frame rate that I was getting by flipping.

If the entire screen isn''t constantly updating, dirty rectangles will give you a surprisingly high framerate (I get 140+ in a window on a 233 laptop with terrible video).

My game development library implements dirty rectangle drawing. You can download it from my website to see how I did it.

Good luck!


Josh
http://www.jh-software.com
Joshhttp://www.jh-software.com
I have a stupid question for ya: How fast is your game if you turn OFF alpha blending??
If it''s still slow, you''re probably doing way too many blits.


#pragma DWIM // Do What I Mean!
~ Mad Keith ~
**I use Software Mode**
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
I think most of the slow down is in the blit at the end. 800 x 600 at 16bpp is a lot to copy. Using dirty rectangles and only updating parts of the screen that have changed should work. To test how much the blit is slowing you down, fill your buffer with a random value and blit it to the screen. It should still go slow.

This topic is closed to new replies.

Advertisement