<CharlieDigital/> Programming, Politics, and uhh…pineapples

30Aug/06Off

Love is in the Air

An interesting side effect of releasing XNA Express is that there seems to be an uptick of interest in C# and the .Net platforn in general.  A 4 page thread sprang up last night on NewGAF and the community is absolutely bubbling to get their hands on it and create some homegrown games.

I added my $.02 in an earlier discussion:

As a CS major and having written code in multiple languages, I'd have to say that C# is my favorite general purpose programming language. Having written Java for 4+ years as well, I have to comment that the jump from Java to C# is relatively easy and fairly natural as C# basically took Java as a starting point and improved upon it in many ways. As for C/C++ developers, generally speaking, C# can do anything that C++ can do via unsafe code blocks that allow direct access to memory regions (typically protected by the managed .Net runtime) in addition to directly interfacing with Windows APIs via PInvoke. The language is far more like Java than C++.

To begin with, the development environment has been made "stupid-friendly" so that even programming newbies can jump in and start writing code and testing in a matter of minutes. Now you can debate whether this is good or bad (many, including myself argue that this is a bane as it means that there are an excess of sub-par "developers", but regardless, it's a well designed development environment that still has all of the advanced features used by more seasoned developers available).

In addition to this, C#, as a language, particularly in 2.0 and in the specifications for 3.0, will allow for programming constructs that are simply not possible in many other general purpose programming languages. As C# has evolved, it has started to bring in many features of functional languages (such as functions as first class objects in 3.0 spec) and dynamic languages (such as runtime type inference, also in the 3.0 spec). In fact, if you look at the C# 3.0 spec, you'll start to get the feeling that it's starting to become quite like JavaScript (a dynamically typed, functional language and my personal favorite). C# (and the .Net Framework in general) has been designed first and foremost, in my opinion, for ease of use and expediency for rapid prototyping and RAD-style development (and of course, Java elitists will knock this, but realize that it is also capable of more advanced development styles that most .Net developers simply don't utilize since they stick to what's available out of the box).

The Express products from Microsoft are top notch. Considering that they are free, they are pretty ****ing sweet (I myself don't use them day to day as I use the full retail versions, but I've tried all of the Express products and they are basically castrated versions of the full blown product with some usage and licensing limitations).

For learning C#, in my opinion, the absolute best book to start with is Pro C# 2005 and the .NET 2.0 Platform, Third Edition. This book covers many aspects of the .Net Framework that every .Net platform developer should be aware of. It leads by simple *running examples* with full source code and contains a wealth of information on advanced topics that are not touched upon by many lesser books. I've found, after reading this book, that every "advanced" .Net platform question that I've been asked on interviews in the last 2-3 years is covered by this book. Fear not, though, the information and examples are well written and well thought out so that it's easy to follow and not only for "Pros" as the title would suggest.

As for how to start with .Net development, as I mentioned, C# and .Net are "stupid-friendly". This means that generally, for beginners, command line compiling is a thing of the past; you simply download Visual C# Express (it will install C# compilers and tools for you), create an appropriate project type (Console application is a good place to start), fill in some code, and hit Ctrl+F5 to run your code. It's literally that simple to get started. Visual Web Developer Express versions should also include a built in web server that it uses by default when running web code so setup is trivially easy if you're interested in that.

As a reference, it's a good idea to pick up the .Net Framework SDK as it contains documentaion and additional tools that are userful for all developers: http://www.microsoft.com/downloads/d...4-C96D69C35DEC

Microsoft also has a subsite dedicated to kind of teaching beginners how to write code with more interesting examples (articles on the 'Net and in books typically cover console applications to demo language features and use business application examples otherwise as most users are are professional developers), including game code: http://msdn.microsoft.com/coding4fun/. So Coding4Fun is a good place to start with more interesting code examples in .Net.

There's a link off of the Coding4Fun main page to a series of webcasts on video game development in C# and a two part series on how to write Soduku in C#, WPF (next generation presentation API for .Net), and XAML.

In the past, I've also taken a look at .Net games development. One of the engines I was looking at was the Axiom engine (which seems to be inactive). You can find other engines via Google.

Ah yes, and the other engine that I had looked at was formerly known as RealmForge and currently known as Visual3D.Net, which used to be completely free (but now has a few different tiers). Of course, you won't need these once XNA comes out, but in the mean time, if you have interest in trying to write games on the .Net platform, these are good places to get a head start.

I figured I'd cross post this here as there are a few good resources and starting points in there for anyone thinking about starting to learn C#.

It will certainly be interesting to see how the community over at NeoGAF proceeds and whether this initial bubbly enthusiasm holds over a long period of time.  But I think it's good any time you get people interested in your products and solutions that otherwise wouldn't be (musicians, students, graphic artists and so on, to name a few).  Microsoft definitely gets bonus points for releasing XNA Express and opening up XBox Live!

Posted by Charles Chen

Filed under: Dev, Gaming Comments Off