C# - Getting started?

Started by
10 comments, last by Boder 18 years ago
Hi, I'm very interested in C# now and I just wanna ask if it's any good to make games and if someone knows tutorials about getting started with it and about 2d programming and directx using with C#.
Advertisement
C# can be great making a game, as many languages are. C# may not be the fastest, but the speed difference is negligible in most cases (execution speed), whereas the development speed can be great. It's mostly a matter of what type of game you want, what / how it is used (platforms, etc).

Here is a pretty good and basic tutorial for C# / DX9 -> Tutorial (codeproject)
(Second part of that tutorial is located Here)

Good luck!
Also directx is not the only alternative, you can also use SDL.net for rendering / other stuff I really recommend the demos that come with that library's SDK
------ XYE - A new edition of the classic Kye
I heard the rumor that C# is slover in floating point operations but be sure hardware rendering under C# as fast as under C++ or any other language.

And do not use C# for casual game (shareware) cause publishers don't like Framework depended games. And I agree with them.
I've recently been digging around in Microsoft's C# Tutorials and found them to be very useful.

[Edited by - The_Incubator on June 14, 2006 2:51:59 PM]
Ad hoc tests I ran indicated that C# actually handled floating point faster than C++, but it's integer handling was in the tubes. *shrug* I'm a C# fanatic, however, and I admit that these tests are as indicative of any other - of the skill and opinion of the developer handling the tests. :) For instance, Richard Grimes has an interesting piece contrasting the fast fourier transform using C, C++, and C# at http://www.grimes.demon.co.uk/dotnet/man_unman.htm. His piece shows C# with a slight edge.

To that end, I say this: do not worry about which language you're developing in. When you're at a point in your career when you need to worry about which language you're developing something in, you'll know it. What's most important when learning is the concepts - a texture is a texture, a fulcrum a fulcrum, a vector a vector, etc. How to take all this and create an interactive experience is what you want to learn - and C#/DirectX are simply the tools you'll use.

GotDotNet has a tutorial library available for C# and Managed DirectX. http://www.gotdotnet.com/team/directx/learn/

DrunkenHyena has tutorials available in C# and Visual Basic for Managed DirectX. http://www.drunkenhyena.com/

TheZBuffer has an entire site dedicated to Managed DirectX, and he manages to stay pertinent as well. (Unlike other sites which 1) never update and 2) don't kill dead links.) http://www.thezbuffer.com/categories/tutorials.aspx

The Managed DirectX download includes quite a bit of useful information and code samples as well.

If you need an IDE, understand that the C# compiler comes with the .NET Framework. (csc.exe) That allows multiple IDEs to exist, including Visual Studio 2005, SharpDevelop, or Microsoft Visual Studio Express Editions. (The last two are free.) Find one and learn it, stick to it.

For rendering with DirectX you can use Managed DirectX. If you want to render using OpenGL there's the Tao Framework (courtesy Mono/Novell). There's the aforementioned SDL.NET which has the benefit of being truly cross platform - create it for Windows, Linux, and Macintosh all at once.

Anyway, I hope that helps.
..what we do will echo throughout eternity..
yeah well SDL.net doesn't use floats for texture coordinates/colors so at least when rendering they won't cause too much problem

Quote:And do not use C# for casual game (shareware) cause publishers don't like Framework depended games. And I agree with them.


I do not deal with them lucky me I am still an amateur programmer. I wouldn't know they are anti Framework.

But I have the tilt that vista will cause a lot of changes and eventually make them change their opinion.

We can't predict how directx 10 will change the ground either.




------ XYE - A new edition of the classic Kye
IMHO you can use C# for casual games if you are prepared to sell them off the Internet (i.e. without a publisher). Modern versions of Win XP come with the .Net Framework installed (v1.1) so more and more users will already have it.
I work with a large team using C# at work, but let me honestly tell you my overall opinion: C# isn't any faster than Java, and based on what Java accomplished 10+ years in the "store market", it's competetor won't get any farther. If you're serious about games, I'd suggest leaving C# to toolmaking and C++ for the real iron. Otherwise, I wouldn't want to hire you.
C# is a great language to use, and for the most part is barely any slower than C++.
hippopotomonstrosesquippedaliophobia- the fear of big words

This topic is closed to new replies.

Advertisement