As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I realize that this is the sort of question that tends to result in arguments, but because I never learn, I'll ask it anyways:
I'm a Computer Science student with a couple years of experience who is currently looking into doing more serious work with game development. Thus far I have about half a year's knowledge of C++ and Java and a year and a half of C#. I've worked a lot with the XNA framework, but in looking around for advice, I've found a lot of people suggesting that C++ or Java is a better place to start for building games.
So my question is this: Given that I already am comfortable with XNA, what are the major disadvantages inherent in the format that would be avoided by instead using C++/Java?
When answering with regards to optimization and such, please consider my current lack of experience. Telling me that an optimized C++ program is faster than an optimized C# program is meaningless to me if that optimization requires an expert programmer to implement.
Edit: Allow me to rephrase: My question is not "Why should I use C++?", it's "Why should I not use XNA?" I'm aware that C++ will give me more options, but my question was whether or not those options are useful enough in amateur game design to be worth seeking out C++ immediately.
The advantage of using C++ is that you can do literally whatever you want.
Another advantage is that the C++ might be faster, in tight loops where you are doing a lot of math where the C# equivalent is using a lot of little structs.
The disadvantage of using C++ is that you will be programming in C++. This means memory management woes, pointer dereferencing bugs, and all kinds of unmanaged problems that you don't get in .NET.
Another disadvantage is that you don't get support for XBox or Windows Phone that you would get with XNA.
Okay, so let's completely ignore the argument which one is better. Let's go with the assumption you wish to pursue a career in game development.
I am going to be straight forward and say that 90% of games, if not more, are developed using some portion of C++ (either the complete thing, a framework, libraries, etc) so learning C++ would be essential to any game developer.
If you are doing it purely for a hobby XNA is a fast way to get in the door without learning the other programming elements (such as 3D graphics, file management, etc). However that being said, learning that stuff is also key.
So, to sum up, my suggestion is to learn C++. There is no reason not to. If you know C++ you can learn C# in half a second (well not really, but fairly quickly). Once you have an understanding of the basics (3D programming, physics, etc) you can do pretty much anything.
Good luck.
yes use Xna if you want fast results. i just started with c++ but i have to said that xna is quite easy. you just have to know OOP(object orientated programming) with C# and youll make good games with xna too.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am looking to make a Mud as a way of learning programming and enjoying it. Part of this is obviously working out a server client connection via the various clients muds use to connect. This uses Telnet for those who aren't aware. I was going to try to learn to do this myself but my father who is a professional programmer said its not that big of a deal to learn and using a library would allow me to move faster through it.
So my question is, first is using a library a better option here, and is there a good free one I can make use of that either uses C++/CLI .Net(preffered) or C# .Net(Was told this one is faster, but is less precise, so I would prefer to learn C++ for the precision, and I was told learning C++ is basically learning C# anyway)?
If using a library is not the best option, is there any good sites or books for finding a simple description on how to make one from scratch?
Most networking libraries will work with C and any variants thereupon.
C# will allow you to implement something (relatively) quickly and easily, but insulate you from programming issues that arrise from using less "safe" languages.
.Net is in fact a library, and it provides both C++ and C# interfaces.
Using a library is deffinately the best option, as it would be required unless you want to get down to the hardware level in every respect. For example the function printf() comes from the C/POSIX library, it actually fills up a buffer on a character device, which then get pushed to a real terminal over a serial interface, or far more likely a virtual terminal and then to your drawing library. Wether you know it or not everytime you use an #import or #include you are linking against an interface to a library. In the case of these simple libraries the compiler already knows where they are so you don't have to tell it about them.
In short C# will let you do things in an abstract and fluffy manner that may soften your learning in the begining, but will ultimatey prevent you from understanding what happened under the hood(and for many people that's ok). C++ will make your life more difficult, and it's compiler may give more cryptic errors, and it won't try to protect you from yourself, but you will probably learn a whole lot more. .Net is just the library your dad advises you use, as it provides a whole lot of functionality, without having a ton of dependencies.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to develop a fairly scalable socket server for an HTML5 / Mobile based turn-based type game.
Time is a real factor in this as I need to prototype out something in 3 months. I have extensive (years) of experience in C# and zero experience in Node or Erlang which I've singled out as the perfect languages for this project. Unfortunately, both of those languages will have a lot of learning curve associated with them and things such as code quality, unit tests, maintainability I will have no experience with so I imagine the code will be of a poor quality.
How bad of a decision will it be to choose to go with C# for this project to save development time as I will have a lot more headaches with scalability and things down the line.
Is C# seriously considered viable for a modern web-app socket server?
A person can write bad code on any platform. Or good code. Yes you can write a very good low impact highly-scalable server in c#. But if this is the first such you've written (regardless of platform), chances are you'll fail to write it efficiently, and then conclude it was the platform's fault.
As an example, the web-socket server that drives instant updates here on SO/SE is written in c#, handles 60k+ connections, and barely registers as any CPU. But it was designed for that, with fully async network access, buffer-recycling, dedicated worker threads, etc.
Actually, if you are specifically looking for web-socket code, then .NET 4.5 on Windows 8 will include inbuilt web-socket support via HTTP.SYS (with managed wrappers, obviously), but it can be done manually. I could possibly even share the library we wrote to do it.
Short: Yes.
Long: c# is statically typed, and it's actually compiled to native code (on Windows) and the speed is simply awesome in my experience. Consider it like C++ with garbage collector :-) Value types + true generics make things much faster than e.g. Java, and I would consider it good enough, too.
Note that you should not get scared by benchmarks game, it uses Mono.
And if you would really get into trouble, you can do unsafe operations if you really need them. So no need to worry for the future.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have been developing using c# now since the first release of .NET. I have never really spent time on C or C++ and thought it would be a good idea to get a little more awareness. Does anyone have any recommendations for sites that would provide a good learning/tutorial for someone that has c# experience to venture into C++ a little?
Thanks
Warning: C++ is not C and the following is related only with C++.
If you are already a c# developer I think you should work in three different directions:
1) copy semantic, memory management and const keyword, these are the main differences between c# and c++.
Make yourself familiar with copy constructor, destructor and assignment operator. Learn how to use RAII idiom.
Study the differences between passing a variable by: value, reference and pointer.
I will suggest Effective C++ http://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876 also guru of the week it is a great source.
In More Effective C++ there is a nice chapter on the difference between pointer and reference.
2) you need to make yourself familiar with the standard library, in my opinion this is a really good book http://www.amazon.co.uk/Standard-Library-Tutorial-Reference/dp/0201379260/ref=sr_1_4?ie=UTF8&qid=1314957062&sr=8-4
3) the standard library is great but not enough, you will soon need boost.
I am reading this book at the moment http://www.amazon.co.uk/Beyond-Standard-Library-Introduction-Boost/dp/0321133544/ref=sr_1_1?ie=UTF8&qid=1314957541&sr=8-1
I haven't finished it yet, but it looks good so far.
Keep practise, you are going to love coding in c++.
You've already been given several good suggestions, but the wealth of information available on StackOverflow alone may be a bit overwhelming, so I'll give you a very specific bit of advice.
Rather than look for a tutorial on the web get a good book such as "C++ Primer" by Lippman, Lajoie & Moo. It is useful both as a tutorial and as a reference and is currently the most modern among the good, thorough books about C++.
This tutorial is good Teach Yourself C++ in 21 days.
21 Days is an overstatement by the way, you can breeze through that tutorial a lot faster, but it's comprehensive and easily understandable, and I recommend it.
Good luck!
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have been working on 3D XNA games for the desktop version of XNA and one of the most stinging problems was the lack of proper animation support for 3D models. I am now trying to get a game for wp7 started an am wondering what a recommended combination of tools is based on experience.
In short: I am looking for tips / best practices / experiences with the following workflow
modelling
texturing
animating
importing into project
I know that there are tutorials on creator.xna.com, but i am specifically looking for real world examples. The least code i have to write myself, the better. I particularly dont like the examples on there because there is a lot of custom code going on in there for importing and working with animations.
There is a lot of custom code because that is how XNA is. I was amazed I had to actually use math to figure how how to move an object across the screen at a certain speed. I mean who ever thought math would be useful beyond counting change!? Your best bet would be to go look at some of the same libraries for XNA. Codeplex.com has quite a few. I have no experience with any since we did purely 2d things.
XNA 3D game library http://www.synapsegaming.com/products/sunburn/engine/
Links to a ton of XNA resources and game engines
http://www.nelxon.com/681/xdsk2/
http://oxgameengine.codeplex.com/
http://balder.codeplex.com/
http://nuclexframework.codeplex.com/
Or you could use something like Unity3D.
As cool as I think XNA is, I was surprised on how much you have to do by hand. I suppose I shouldn't be. Much of the code from the examples on creator can be ripped out and resued. The problem is finding what you need and understanding what it is doing. Ok that was my problem.
Good Luck
It depends entirely on your own experience. For example I'm a dab hand with MaxScript so I would always favour 3dsmax because I know I wont have too much trouble with the content pipeline. Another person might be much more familiar with Maya scripting so chosing Max would be madness for them. There's really no "right" answer for this.
I particularly dont like the examples on there because there is a lot of custom code going on in there for importing and working with animations.
This is the world of games development - it's not all fun.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
i am a php programmer who has no previous programming experience neither in java nor in c#(sharp). My goal is to learn both languages java and c#, so i am looking for an experienced programmer who has in depth knowledge of both languages to suggest me which one to start first in order to make my learning process easier and to help me grasp fast on the second language once i have finished learning the first. (e.g some people find it easier when they learn the difficult language first or the one that has more features and programming aspects so once they are through and they start the second one they find the learning process like walking in the park)
The languages are more alike than different so I doubt it matters much. Flip a coin.
Java and C# aren't too different from each other, so it doesn't matter much. C# does have a few programming concepts that java does not have (anonymous functions, operator overloading and LINQ), which makes it a bit more interesting and (at least for me) fun to write. So I guess I would recommend to start with C#.
If you can find someone who will help you with random questions and knows one of them well, go with it.
Otherwise, maybe play with Eclipse for a day, play with Visual Studio for a day, and stick with the one with the easier IDE for you to use.
They're pretty darn similar.
I agree with Kevin unless you are looking for a specific job or course and the choice might be a bit more important.
Java was my first OO language, then i studied it at uni, then I got my first job as a c# dev.
Go figure.
I agree with Kevin that both languages are similar, however C# should have less resistance to learn because its IDE and tools are better integrated.
I know this is debatable but you could spend hours installing Apache, Eclipse, MySQL whatever just to make your first hello world servlet or jsp to work. Make sure the jars are there in the appropriate lib folder, download the appropriate jdbc driver, you know the drill.. this is frustrating..
With C#, just install the latest visual studio express and it just work. No need to worry about database driver and all the non productive stuff, debugging also work out of the box. Debugging in Eclipse may not work straight away.., you may need to install certain plugin or configure it, this 'trivial' thingy can eat hours of your time that you could better spend learning the language.
c# is easier to do form stuff which i think is good for learning on, but they much the same