Jump to content
  • Advertisement

Archived

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

alexiev_nikolay

Performance

This topic is 5477 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

I use C# and DirectDraw. I try my game on fast PC but with bad VideoCard (Riva TNT 8MB). My game is simple but have big sprites. I''m not shure but think that when I create surfaces they go to video memory. And when I use 3 or 4 big surfaces the speed is vary bad. From 72fps with 1 or 2 sprites go to 13 with 3 or 4 sprites. Can I optimeze my code. Is it better if I create surfaces before draw them? I also save an instance to Bitmap because I need to do hit detection. Is this a good idia to create surface from this bitmap evry time I want to draw to primery surface?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
that flame was totally unneccessary

Share this post


Link to post
Share on other sites
Was it?

Okay I suppose it was.


What do you mean by "Big Sprites?" Even on a tnt 2, you should still be getting more than 72 fps with 4 sprites.

I guess it''s hard to optimize code without knowing more. We are not mind readers here.

If you want to check per-pixel detection, then the best way to do it is saving it in sys memory.

Also, don''t use BMPs, use TGAs. BMPs just plain suck! You will gain a lot of performance if you use TGA''s. AND only save 1 instance of each tga, and reference it as needed.

This is all I can help with until I get more info.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
1. I seriously doubt that the overhead of C# vs. C++ is the bottleneck here. We need more details about what you''re doing.

2. Your skills in English admirable. It''s a difficult language and I respect anyone who takes the time to learn it and express himself or herself in it. Please disregard ignorant Americans who are an embarrassment to the rest of us.

As for you, RhoneRanger: How''s your Russian? And how old are you, anyway?

--
Donavon Keithley

Share this post


Link to post
Share on other sites
If you will look back, you will see that I apologized.

I was not mad at the Russian, but that all the newbs here expect us to be mind readers, or help them with their MMORPG's.

I am sorry that I flamed alexiev_nikolay, but I thought he was also one of these 13 YR newbs who typed without caps or any skill at spelling.


Anyway, I still encourage you to dump C#, because using it with DX is incredibly slow(slower than VB).

EDIT: I also ask once again for some code snippets.


Cheers!

-Rhone

[edited by - RhoneRanger on September 25, 2003 2:54:37 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
1st - I''m bulgarian not russian

Ah, then I should ask how his Bulgarian is.
quote:
2nd - I have 4 bitmaps, each 800x1200. What I load them to surface then speed is very slow. If I use only 2 bitmaps speed is very good.

If these surfaces are 32 bits per pixel then each takes up 3.7 MB. With an 8MB card, only two can fit in video memory at a time. The slowdown you are experiencing would be explained (most likely) by the fact that they''re being transferred across the bus every frame.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Anyway, I still encourage you to dump C#, because using it with DX is incredibly slow(slower than VB).

It''s certainly possible to use the MDX wrapper in such a way that you get inefficient performance. Given the lack of documentation, it''s not hard to do so. GraphicsStream for instance will kill you if you read/write small pieces of data through it.

But if you understand the issues and know what you''re doing, MDX can be very efficient -- much more so than the COM type library interop that you''d be using in VB 6 and earlier. (The perf of VB.Net should be nearly indistinguishable from C#.)

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!