Jump to content
  • Advertisement

Archived

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

This topic is 6200 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 was watching the .NET show about C# and I thought it was really cool. I was wondering if you guys know if it''s slower, cause I don''t want it to be really slow. So what I was wondering is, is C# suitable for games?

Share this post


Link to post
Share on other sites
Advertisement
Some people argue that Visual Basic is suitable for games.

C# is pretty fast, but you mustn''t forget all of the built-in features it has that carries overhead. For example, garbage collection and array boundary checking. You can disable those features, and for extra speed you can put code in "unsafe" areas. So, by the time you get C# as fast as C or C++ by disabling the safety features, you might as well use C or C++ for real.

The biggest worry, actually, is C#''s use of the CLR. I''m not sure if the C# compiler will compile to truly native code. Maybe it does...but if it doesn''t, you''re not getting much faster than Java.

Share this post


Link to post
Share on other sites
The CLR compiles the IL code to native in memory (you can have it do it either by function, all at run-time, or at compile time). C# beta 2 is faster than VB6 SP5...and that''s with Beta code, debug info and all. If DX comes out with a .NET version (instead of just wrapping the COM version in .NET functions) it''ll increase the speed a lot since it won''t have to go through the COM Interop layer. .NET comes with some DirectX samples for you to get your feet wet.

If you know C++ (or VB)...then learning C# is a breeze. There are some good books out that are like "C# for Programmers" that''ll walk you through the major changes.


Epolevne

Share this post


Link to post
Share on other sites
I think I like C#. C++ is way too strange. Plus, The beta for VS.NET is awesome! I think I can sacrifice a little speed for a better language. Even if I do need speed, I''ll just do a few graphics routines in Assembly or something. What do you guys think of C#?

Share this post


Link to post
Share on other sites
Now now now. Let''s not call one language "better" than another; nothing is better than anything else in any absolute sense.

Share this post


Link to post
Share on other sites
hehhee...use C# or any .net product, then through some asm in it...heh...no, really, that''s not defeating the purpose of the .net concept... : )

G''luck,
-Alamar

Share this post


Link to post
Share on other sites
Microsoft said: <>

- it is true, but only because VBA porgrammers must use a lot of DLLs (written in C++) who make all for us.

Microsoft said: << (...) There are more subtle features that make C# a great Internet programming tool>>

For the web, you have PHP, java...

Microsoft said: <>

Sure, for Microsoft programmers who never release memory. (Just take a look at Crimson Skies).

Microsoft said: <>

Only bad programmers must often update (patche) their code. For example, it takes 8 versions of DirectX to have the same OpenGL level.


Share this post


Link to post
Share on other sites
quote:
Original post by bobatefrei
Microsoft said: "Compared with a language such as Microsoft® Visual Basic®, equivalent C and C++ applications often take longer to develop."

- it is true, but only because VBA porgrammers must use a lot of DLLs (written in C++) who make all for us.



So you''re saying C/C++ people should not have the same benefits of libraries to make life easier for us?

quote:

Microsoft said: "(...) There are more subtle features that make C# a great Internet programming tool"

For the web, you have PHP, java...



PHP and ASP and JSP and all those other scripting languages are really very badly designed. They were written by programmers, for programmers. The internet is supposed to be a place where anyone can make a name for him/herself. Why should they have to learn to program as well? If you''ve ever seen ASP+ in action, you''ll appreciate what I''m talking about. It''s like moving from COBOL programming to C++.

quote:

Microsoft said: "Garbage collection relieves the programmer of the burden of manual memory management."

Sure, for Microsoft programmers who never release memory. (Just take a look at Crimson Skies).



Now that''s just silly. Garbage Collection is not to allow people to write sloppy code. You''ve got to structure your code just as well to best take advantage of it. But it does make your life a hell of a lot easier.

quote:

Microsoft said: "Updating software components is an error-prone task. Revisions made to the code can unintentionally change the semantics of an existing program."

Only bad programmers must often update (patche) their code. For example, it takes 8 versions of DirectX to have the same OpenGL level.



No. You should be constantly trying to update your code and make it better. Name me one company that releases version 1.0 of their application and then stops make more versions.



War Worlds - A 3D Real-Time Strategy game in development.

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!