Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 31-07-2009
Member
 
Join Date: Oct 2008
Posts: 38
Games in C#

Hey guys,
I just in the middle of course of C#, just thought to make some simple games, any idea how do i start with basics, if you have made then please give me some tips, i really need, i'm learning some online tutorials for this but not getting much. I need the basic tips. Please do your best favor. Thanks
Reply With Quote
  #2  
Old 31-07-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: Games in C#

No i don't know about the making games in C#, but i have heard that its really difficult task to do, there is no direct-X calls in .net , and i think you 'll need to use a vb wrapper or even c++ wrapper to make calls to directX.
Reply With Quote
  #3  
Old 31-07-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
Re: Games in C#

If C# is so great, why is not everybody in the game industry already using it? The first problem is: it's not really cross platform. Its primary target was the PC, it has only been available on xbox360 since the end of 2006 (with the release of XNA 1.0) and there are still a lot of limitations in this case (for example, it's impossible to write a tool running on PC that talks to the console while the game is running), and it's not supported at all on other consoles.

The second problem is middlewares: they are all written in native code, with a C++ API. It is totally possible to call such an API from C#, for example to write a managed program that uses OpenGL for rendering. There are several drawbacks to take into consideration though:
  • Writing the wrapper translating the C# calls to C++ (because the types are not the same in both languages, for example a C++ function can take a char* parameter) is tedious and error prone. And it has to be done each time you get a new version of the middleware. This can be automated to some extent, but from what I've heard there are always some tricky cases that have to be handled manually.
  • Each call to the middleware means switching from a managed context to a native context and back, which is expensive performance wise. This will also make debugging more difficult in general (assuming you have the source code of the middleware).
  • Using native libraries kind of defeats the purpose of writing a managed application in the first place, since these libraries won't benefit from garbage collection for example, if they allocate memory.

A third problem is executing the game: in addition to DirectX or OpenGL, a C# game needs the .NET framework in order to run. This issue is not too bad, PC games already contain a redistributable version of the DirectX runtime, they could also install the .NET framework if it's missing on the target computer. On xbox360, I suppose Microsoft could push the framework through Xbox Live if they wanted to, but it would also have to be included on the DVD anyway (for people not connected to Xbox Live).

Source: fairyengine.com
Reply With Quote
  #4  
Old 31-07-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
Re: Games in C#

Actually creating wrapper for DirectX is done automatically. You only need to dll "Add Reference" in VS.Net. Once you successully created the wrapper, IMO becomes easier to program in C# than the C++ because you'll not need to deal with COM.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Games in C#"
Thread Thread Starter Forum Replies Last Post
Cartridge games or digitally downloaded Games for Playstation Vita ? Ichabod Video Games 4 16-02-2012 02:18 PM
Which one is a better retail game or steam games or games for windows live? Farzana Video Games 7 07-07-2011 10:32 PM
Best Portable Games Out Of Three Grand Theft Auto Games ^JOSEPH^ Video Games 3 22-12-2010 08:56 AM
Mobile Games: Gameloft will sell its games via SMS Premium Pyrotechnic Off Topic Chat 1 17-12-2008 07:50 PM
Free Games: The Best Remake of Classic Video Games Reegan Video Games 5 19-11-2008 08:24 AM


All times are GMT +5.5. The time now is 10:35 AM.