Creating a Game using C#

Hi everyone,

I just want to ask if you can create a game in C# like RPG Games, etc… because what I know games are from C++.

You can create a game in any language you want. Just depends how much work you want to put into it. C#'s limitations may stem from speed when working on a graphical game (versus lower level languages like C++); but this isn’t always the case, there are plenty of games written in C#.

Personally, if you know C# really well, go for it. If you have a very good understanding of C++ use that. Worst case scenario, if you get down in the line in C# and see it being sluggish, you either wrote something poorly or the language framework is impacting your speed/ability then try writing those pieces in C++.

If you search the web you can find numerous tutorials and examples of various types of games explicitly written in C#.
In addition, if you try Unity3D (a free download) you have the choice of C#, in addition to Javascript and Boo, to develop sophisticated games. The interesting thing about Unity3D is that you can MIX those three languages in a project. Perhaps not practical but it speaks to the flexibility and design of the framework.

Hey ParkinT and cpradio, thanks, those information helps me a lot. I planning to create a game but I still have my option to other languages but I really prefer the C# which I took so long to learn and focused.

Yes, there are quite a few games that have been written in .net. C# and .net is not as slow as people might think if you know what you are doing. Yes, C++ is probably the best option as you will not have to work around the framework bits when you need to. You might want to wait to see what Microsoft release. as XNA game studio was the framework to use. Using XNA you can run your games on an xbox. The only reason I would not suggest looking into XNA, is that Microsoft have stopped support for it and will no longer release any more features for it. So I am not sure what is next. If they might release something else to replace it or not.

Good luck with your game

You could also look into MonoGame. It is based on XNA and is open source and will also work on the linux platform. They will continue building on its API’s and supporting it.

“MonoGame is backed by Xamarin, the developers of MonoTouch and MonoAndroid. I believe MonoGame will continue to be developed and improved and will become a great option for C# developers to target several platforms using a stable and feature filled XNA-like API”

They stopped support for XNA? Shoot.

I hate to be rude, but based on your question it sounds like you don’t know enough about C# to be able to build a game.

C# is a general purpose language, but Game Development is tough. You need an entire body of knowledge on top of your ability to develop, alongside knowledge of physics engines, graphics programming, etc.

I’ve worked a bit with Unity, and it’s very good with C#. As ParkinT mentioned above, you have a choice of languages, but it is accepted that you’ll use C# to handle the meat of your game, while you’ll use JavaScript as a scripting front-end for your game. JavaScript is quite handy in Unity3D if you’re building a menu system, or allowing user interaction.