Sign in to follow this  

C# as a FPS programming laguage

This topic is 4304 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is this a viable language for a FPS game, or would it be best to stick with C++ Cheers

Share this post


Link to post
Share on other sites
Look in the forums, this is an EXTREMELY frequent topic with many, many long threads discussing the topic.

Share this post


Link to post
Share on other sites
C# is fully capable. That's not the problem though, the problem is: do you want to learn it?
It's the best not to compare the languages but instead, you should look at what you know and what you want to reach. If you think that "learning c# because it's more productive" weighs heavier than "sticking with c++ because I know it already" then go ahead and learn it.

Once again, C# is fully capable.

Share this post


Link to post
Share on other sites
Take the language where you feel most comfortable. There are FPS in Delphi, Perl, etc. why shouldn't it be possible to make it in c#?

Share this post


Link to post
Share on other sites
I am already a developer in C# and was wondering if it would be capable, say i wanted to develop something along the lines of Battlefield 2, would that be possible.

Also can anyone point to the best place to start and recommend a good 3D engine to work with.

Thanks for all your help and replies

Share this post


Link to post
Share on other sites
Actually, I have the same question.

Is C# fully capable AND appropriate for 3D games? Will they work well? And is it "easy"? I mean, will I have to reinvent the wheel and the bicycle 3 times to just draw a vertex, or it's all good?

Thanks!

Share this post


Link to post
Share on other sites
Quote:
Original post by Huffer
Actually, I have the same question.

Is C# fully capable AND appropriate for 3D games? Will they work well? And is it "easy"? I mean, will I have to reinvent the wheel and the bicycle 3 times to just draw a vertex, or it's all good?
It's pretty much the same as C++, because you're using the same APIs (except in the case of MDX, but the functionality is the same).

As is the case with C++, if you don't want to reinvent the wheel, then that's what an engine is for.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You only need to know one thing: if you plan to work as a gameprogrammer in the future use C++ and only C++ theres not need to be any discussion on that, but if it is for your own purpose use whatever language you like like C#, Java, Delphi(Pascal) anything will do fine.

Share this post


Link to post
Share on other sites
C# is faster for the programmer, C++ is faster for the computer. This is not entirely true, since the underlying complexity of the machine is not very hidden from you in C++, and programmers can have trouble actually increasing performance with optimizations. C++ is the standard game industry language, and most engines use C++. I happen to be writing a physics engine in Lisp, so I would certainly be in the "prototype it first in C#, port to C++ the parts that are bottlenecks later" camp.

Share this post


Link to post
Share on other sites
So if i was to develop my game (not sure if anyone is interested in knowing what it is) with the possibility of maybe moving into game programming as a profession instead of software development should i think about learning C++ instead of using C# which i already know.

Share this post


Link to post
Share on other sites
Wait, so you're certainly saying that C# has its place in the industry? That it's a language which can 100% be used for programming high-end 3D games?! Wow, this is like my favourite language of all, but I dumped it for this very reason: INABILITY to be used as a language for 3D games (and limited books, materials etc.).

Hey, then guys, what do you recommend, while I'm at it: continue learning Python, which I quite like, or switch to C#? Or even to C++ altogether?

Share this post


Link to post
Share on other sites
With Microsoft XNA and such, C# can be used to make games that can run on XBox 360. We'll see how that turns out. I doubt the big game developers are going to pull a switch though, because it's unlikely you will see the PS3 running C#, and many developers want to keep with a code base that doesn't restrict them to certain platforms.

Have you considered just sticking with C#, and when you're ready to get into the industry apply for tools programmer positions as well as places that may use C# for the game ?

Share this post


Link to post
Share on other sites
Well, even Python is viable for game development, but it definitely does have speed issues. Of course they can even be dealt with by hooking in C/C++ code.

My recommendation is to use the language with which you think you can write the game most easily. If you think it would be easier to write it with C#, then use C#. If you think it would be easier to write it with C++, then use it! The speed arguments in the C++ vs. C# battle have been proven moot. They say that DirectX programs in C# suffer only a 2%-5% speed hit compared to the same written in C++ (if someone has a reference to somebody important saying this, it'd be helpful; I think Microsoft themselves may have made such a claim).

In the end, my guess is that if you were to want to break into the industry, you'd be WAY better off having a very well written game done in C# than a not-so-well written game in C++. And if you're just a hobbyist, use whatever language you want. If your program ends up slow, it's more likely because of poor algorithm design than your choice in implementation language. If you find out later on that your game is truly choking on its use of C# features (use a profiler before even trying to make any such assertions), then you can port it to C++ or recode the slow bits in C++ and use them that way.

-Auron

Share this post


Link to post
Share on other sites
(sorry for hijacking the thread)

So what do you recommend? Should I currently stick to Python or start with C# right away and not waste time? Or just start learning C++? I want to save some time yet not be lost. I have experience with C# and C++, but I still can't decide.

Share this post


Link to post
Share on other sites
Is Managed Code Slower Than Unmanaged?

If you need more speed there is "unsafe code" option which allows you to switch off bounds checking and do pointer tricks. You could write critical bits in unsafe code while using "safe" code for the rest.

C# has access to DirectX.
C# has access to OpenGL.

The code is much cleaner due to properties, delegates and managed environment. It has operator overloading and templates.

Therefore one can develop FPS or any kind of game in C#.

C# was conceived 20 years after C++. For me using C++ is like flying to the moon today using Apollo 11 from 1967.

But understand there is almost 20 years of legacy code in C++. Is it really feasible for a studio which has been developing games in C++ for more than a decade to suddenly switch to a new language? That is a major factor in slow adoption of C# in professional studios.

If you have opportunity to start fresh use C#.

Share this post


Link to post
Share on other sites
Hijack away, i dont mind, I am personally going to go with C# it seems as though no one really has anything bad to say about it and its a nice language to use, if you can do everything with C# that you can with C++ i cant see any reason not to use it,if you like it

Share this post


Link to post
Share on other sites
Sign in to follow this