Does anyone work on C# game programming?
Anyone knows whether it has a comparable performance to C++?
Printable View
Does anyone work on C# game programming?
Anyone knows whether it has a comparable performance to C++?
It seems that this forum is a very serious forum. No one excited about GAME.
What's your problem?
I was wondering the same thing myself. I know before I started to use C# I use to think that there would be no comparison between the two languages. C# has come a long way, although I'm still concerned that C# would be slower and it would be noticeable. How much of a difference it would make I'm not sure. I have run into situations where i simply cannot optimize anymore in C# and I would have been able to in C++.
Would it help if you change the assembly's permission to `full trust`? Or, if your C# code run the C++ unmanaged code?
I am very interested to hear, if you could share some of your experience, such as what kind of game you develop, what game engine you use, how the development cycle goes compare to C++ or any other language, etc.
I wonder how many people write code from scratch anymore. 300K lines of C++ code might get a game engine running fast, but about 300 lines of C# would do the same thing.
With today's multicore processors, and parallel programming optiions narrow the difference in normal code.
C# optimizes for each device it's on, as it runs on the framework, and expects only the framework, which is smart enough to use multicores when available
Unfortunately I don't have the opportunity to work on game programming. Most of the projects I work on are either Web Applications or services running on web servers.
As far as game engines go there are plenty of them available for free in C++, its been awhile since I've looked but I'm sure there are numerous C# ones out by now. I've read a bunch of books on the subject though because its of interest to me.
Good book on game programming. Covers just about every aspect of game programming, network, scripting, ai, graphics, data structures etc...
http://www.amazon.com/Game-Coding-Co.../dp/1932111913
Good book for game engine design. Really goes into details on just about every aspect of game engines. Even though i doubt I'll ever program my own engine reading the book helped me understand how they work and everything that goes into them. Also contains a pretty full featured engine as part of the software that comes with the book.
http://www.amazon.com/Ultimate-Engin...7755143&sr=1-3
Same here. I am also a web application and services developer. And... I do have interest in game programming. It's just I don't have a chance to start one. I, personally, believe that I won't be able to start game programming from scratch; writing on available game engine will be the best option to start.
I also notice some game engine developed using C# language, and since I use C#, I am thinking of trying out with this language. I do believe that writing a game requires talent and art skills; unfortunately, I don't really have much.
What do you get from most of the books you read?
If you are using C#, you can use XNA Game Studio 3.1. XNA has the ability to run on PC or XBox360(provided that you subscribe to the Creator Club membership and there is also the chance to sell your game on XBox Live Arcade). I intend to learn XNA after I finish my Character Animation With Direct3D book(C++).
I am a C++ application programmer. I am not too worried about C# performance of my game because my game is a simple game. C# and .Net is quite fast now; only the first method call is slow because the .Net runtime has to JIT compile the code, subsequent calls is using the same compiled code.
O really... That's interesting. I am actually really interested in learning game programming, which I left behind a long time ago. It's so coincident that you are located in Singapore. We may want to meet one day.
Do you know whether there is any book that recommend what genre of game you should do for amateurs? Action? Adventure? RPG? I am actually amazed with a lot of interesting games available in the market. Where their ideas come from?
Arcade.
Simple, pong, pacman, etc etc. Reinvent the wheel, but do it creatively. Thats how i learned XNA.
Also, if you haven't already, check out Reimers. Althought the tutorials leave a bit to be desired, they're some of the best out there. Also, the problem with (in my opinion) most XNA books, is that they just jump straight into 3D, where as you can gain a lot from learning about the 2D side of XNA. I, personally, love XNA. I think thats its a great way for indie game developers to get heard, and I just wish that the XBLA Marketplace was going a little more.
Thanks,
C++ will always be a better choice for large projects such as that, simply because C# (as far as I know of it) is an interpreted language. C++ can be compiled into machine code. C# has to be reinterpreted every time it's used.
C++ is ideal for that in my opinion.
C# is not an interpreted language. It gets compiled into a IL code that is compiled JIT by the framework. This is different from being interpreted, it works almost exactly like Java. The IL code actually gets optimized for each of the processor architectures to help improve performance.
Is C++ faster than C#? Without a doubt. Is C# slow? No.
C#'s MSIL assembly code can be compiled into native machine code using ngen.exe which comes with the .Net framework. Ngen'ed assemblies removes the need for JIT compilation.
I am very interested in learning Game Programming too! Actually, about 6 months back I had started learning XNA, but later stopped. And now I wish to start again. So I am willing to help you with you project as I will get to learn much on the way! :)
Im also randomly trying to create some game.
Actually im even working on it already.
It's a remake of GTA2 (my most favorite game) using original graphics only.
To be honest with you i don't care about any FPS games, they are too boring for me.
Every beginner makes a FPS.
But GTA2, it's pure fun. That's why i wan't to recreate it completely, make everything like in GTA2 is.
And later add my own stuff.
Currently i have a very basic one and developed in Blitz3D.
I always thought about seriously using XNA, C# and such stuff..
But what holds me back on these NET stuff is that NET is slower and NET exes can be fully decompiled to sources, if you don't obfuscate your code.
But i don't have enough power to do what i need in such "toy" languages like Blitz.
They limit too much.
So im thinking about ether switching to XNA or Delphi and some engine.
Maybe i will go even with open source version if im going to use XNA and C#.
I could obfuscate my game but i think it's better to go open source.