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.
What is the best language for programming a game project and why?
Why is the game programing world dominated by c++?
This is kind of a difficult question to answer. For the most part, C++ is a "better" language for programming games in that it gives you so much direct control over memory management that you have more options to fine tune your performance. That, along with the fact that C++ has been around ages longer than C#, have lead to its current dominance in the game industry.
However, these days, with the .NET platform and C# becoming so much more mature, its not easy to rule it out as a very strong contender in the game programming arena. I think this is especially true for the near future, as .NET 4.0 and C# 4.0 will bring in a whole new era of multi-threaded and concurrent programming that could bring some massive performance gains to their platform. With multicore CPU's taking the desktop computing world by storm, and massively-cored CPU's only a short step behind .NET/C# 4.0, I think the ease of developing multi-threaded applications with .NET and C# 4.0 will give C++ a run for its money.
In the end, it will entirely depend upon how much control you think you need over memory management, and whether that control is worth the effort in the arena of massively parallel games. If you need that control, and think you can deal with the effort of writing a highly parallel game in C++, then you'll probably gain something from it. Otherwise, I would say C# 4.0 would be the better option.
2011 Update:
It should probably be noted that, now two years on from when I originally wrote this, Silverlight games, particularly Silverlight on Windows Phone 7, have become a large and rapidly growing platform upon which games, often quite advanced games, are being developed. Gaming on WP7 has exploded since the platform first launched in Nov. 2010, and already WP7 has more games developed for it than competing platforms. Given the ubiquity of mobile devices and the popularity of playing games on them, I think that is a strong indication of C#'s power and capability as a game development language. Quite a few WP7 games are fully 3D, graphics intensive games.
For commercial / bigger game projects, C++ is probably the best option. However, if you're thinking of doing smaller, indie type games, there's nothing stopping you going with C# or even Java.
I've done several small games with C++, and one with C# using the XNA Framework, mostly for curiosity. Currently I'm working on a platformer game using Java and LWJGL (Lightweight Java Game Library). And guess what? It's working absolutely fine, plus I get cross-platform compatibility practically for free! The reason I started this project with Java was to see if I could create a nice OpenGL-accelerated game using Java instead of C++ I've normally used. So far it's working very nicely for me, I was really suprised actually. =) To be honest I've become a bit tired with C++, coding in Java feels much more productive for me currently (big thanks goes to Eclipse IDE!).
So, for smaller games you can definitely have success with Java or C#, no need to bother with C++, unless you're doing something that needs 100% of the possible performance. XNA might be the easiest option to get started with, although as for myself I most probably won't be using it again since it's basically Windows only (plus Xbox 360)..
Games are some of the most hardware intensive applications you can run. People program games in C++ for the performance, although there are a few games coming out nowadays written in C#.
This question has been asked before, check the following posts for more details:
Viability of C#/.NET as the new standard game dev platform?
https://stackoverflow.com/questions/19642/suggested-gaming-platform-to-learn-direct-x-c-open-gl-or-xna
It took years to get game developers off assembly onto C, then it took more years to get the industry onto C++. The reason is always the same ... "C will be too slow", "Objects will be to slow". There is enormous investment in code (engines, previous games, etc.) and talent in the industry in C++. It will take a long time for that to shift -- just as it has in the past. Someday, games will be developed in managed code, but it will take some time.
Meanwhile there are engines written for .NET in C#.
I think you'll find that, when you create your own game, that being CPU bottlenecked (the only aspect on which language choice has any effect) is the last thing you need to be worried about. It's much, much easier to be bottlenecked by the GPU. Hell, with today's minimum of 2 cores, I would find it impressive if you even managed to ever reach 100% CPU usage because that would require a perfect workload division to utilize the 2 or 4 cores of the CPU.
Generally, it's much too common for me to run a game (presumably written in C++) to see it use at most 50%-60% of my CPU. And can you then really speak of a bottleneck with the language that you use, or a bottleneck of the algorithms used that don't allow you to scale across more than 1 CPU core? So even in a situation where you run into the limits of a single core, it's still possible to (theoretically) double your performance by optimizing your algorithms before you can truly say you're being limited by the language.
And this is only going to increase in the future with the advent of 8, 16 and 32 cores. You really don't want to have a game that's only capable of using only 1 core out of 32.
The real reason why C# isn't being used in the industry: there's no reason compelling enough for game studios that have invested a lot of money into their C++ code to switch to C#. Not just their code, but their developers are already very good in C++ so it would be odd to switch to C# for "ease of use" when that actually means a lot of new challenges to overcome and a lot of money to rewrite existing code. And after all that, you've got new code that's only supported on the PC (with Mono for Linux support) and Xbox 360. No PS3, no Wii. So you've just limited yourself for little gain.
If you use C++, you have a much larger codebase, although this shouldn't matter for most games (except 3D games or games that'll need libraries like physics engines). C# could be easier to write, depending on how much experience you have with it (or how much less/more experience you have with C++).
Also consider using some sort of game creation tool like XNA Game Studio or similar, they often can give you all sort of help with usual stuff.
'Performance' is a red herring. Yes, games are just about the most demanding application that most consumers will run. However, most of the heavy lifting can be done with dedicated hardware, which will beat a software solution in any language any day of the week. The proliferation of Flash games should be proof enough that in most cases we have performance to burn (and now that we have some decent implementations I think we'll soon see games apearing in Javascript too).
I think it's just that many other languages are billed as business focused, or academic, or statistical, and developers on the whole haven't really felt the need to challenge those assumptions.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
What is best C# or C++ for making a game engine. I currently am a .NET C# developer and really want to use C#. Although I know C++ does support memory management and that is why a lot of big companies go for it. That being said C# is quicker in the development process and extremely familiar to me. Before anyone suggests it, yes I've used unity. I like it but want to go the long and hard extra stretch to own 100% of my own built game.
What do I lose by not going to C++? and what kind of libraries do I use, for graphics and stuff? Is that what DirectX is for? I'm trying to wrap my head around this and any help would be much appreciated.
I need some opinions
Perhaps I shouldn't presume to tell you what you need, but I think you'd be much better off receiving information you need to form your own opinion. Asking for opinionated answers (notice irony here) in my opinion isn't generally desirable here.
C# and C++ are both very powerful general purpose programming languages. Either language is 100% capable of creating full fledged high performing games. With that said, there are some (mostly) objective differences one can point out that may effect your decision.
Garbage Collection
Whether this is a pro or con for you is for you to decide. Some people want to save themselves work and have to spend little time taking care of memory. Obviously C# shines in this regard. C++ can have elegant and easy memory management if you know how to properly use smart pointers of course, but that's still more effort than garbage collection. If you're very concerned with having tight control over resources, then C++ might be more your thing.
Libraries
When you want to write software without reinventing wheels (and you should) a language's libraries can be just as important as the language itself. This isn't an obvious pro for either language, as both have lots of libraries supporting games. If you have to pick a winner though, I'd say it's probably C++. The language has essentially been the vernacular of game programmers for years now, and has a lot of maturity in this domain. C++ can directly leverage APIs as low level as OpenGL and as high as Ogre3D. There's no guarentee that your game will actually benefit from a C++ library over a C# library though. It depends on your use case.
Standard Libraries
Continuing on the theme of libraries, this could be a pro for C#. C and C++ are two languages that have an enormous amount of libraries available. If you only count their standard libs though, then things change. Some people don't mind, or even like this. One may also want a more expansive standard set of functionality however. C++ doesn't have a small or incapable standard lib by any means, but C#'s is definitely more feature rich.
Platform
Unless you're going to use Mono, C# is not portable. Mono is a great option, but it does have cons (that you'll have to research yourself). C++ can't tow a line like "Build once, run anywhere", but it does all the same offer damn good portability if that's what you're going for. With an OpenGL renderer (or some higher level wrapper API like SDL/SFML) you can build for pretty much any desktop environment. If you're only worried about making games for Microsoft platforms though, then this point is probably mute.
Virtual Machine or Native
This just like garbage collection is just a factor to consider. It'll be up to you to decide if it's right for your use or not. VM's sometimes have a stigma among game programmers it seems because of supposed performance issues. It's true, if C++ is used intelligently, it will probably be a better performing game. C#'s performance isn't anything to laugh at however. A lot of games that are written today can perform fine with a C# implementation. Is using C++ really an advantage if it means 450 FPS vs 400 FPS? Sure, there's a measurable difference, but it doesn't mean much to anyone playing your game, even if they have a 144hz monitor. Memory overhead is in a similar boat. Usually C++ isn't actually a necessity until you start getting into seriously heavyweight games.
Learning
Last but not least, consider the fact that you have tools you know, and tools you don't know. You already know C#, the time you have to invest learning is probably going to be much less if you choose to pass up on C++. C++ simply has additional concepts and responsibilities compared to languages like C# and Java. Some of these things you can choose to ignore. C++ won't hold you at gunpoint and force you to use multi-inheritance, and hey, that's probably easy to pass up on. Will you pass up on destructors though? Those are pretty important. What about the STL in general? Passing up on that is probably not a great idea, no best you learn STL if you're going to use C++. If you think this is worthwhile doing, then by all means go ahead. Again though, it's just something to weigh in.
Creating a game engine in C++ while learning C++ is a big challenge.
C# is more enjoyable than C++
Why?
In C++, pointers are powerful and you need to know how pointers work and how to use them
In C++, finding libraries is not as easy as pulling a nuget package
In C++, creating/refactoring header and source files is annoying
In C++, need to compile for every CPU architecture
In C++, syntax may be harder to grasp at the beginning
In C++, using the compiler and optimizing it is a topic on its own
But if you want your game/game engine to be fast then you should go for C++
When i see people coding for games in C++ they mainly use OpenGL but thats a common mistake since most of the non-console gamers are Windows users.
My advice is to first start creating a small game using DirectX, if you feel comfortable with it, then take the next step and create your own game engine
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'm looking for general opinion about which language would be best. Best in regards to many considerations.
I have a pretty strong background in c, c++, and objective-c. I feel quite comfortable with those 3. I have used very little c#. I've worked in firmware and middleware for over a decade and have moved into mobile apps lately. Mostly iOS, but now expanding to Windows RT.
I am about to write a version of my company's app for Windows Store (or Metro depending on what you want to call it). I did a proof of concept a couple months back using C++/CX. There were are few hurdles learning it (the syntax for ref classes, and the heavy use of namespaces), but that is in the past and I feel quite comfortable with it at this point.
Some drawbacks that I found were that most of the examples (both MSDN and private) of .net are in c# with fewer in c++. It also seemed to be a little tougher to get questions answered concerning .net frameworks with c++. Most of the time people would post a c# answer and I'd need to port it to c++ equiv. Sometimes this is easy, sometimes more difficult.
My question is: Would it be worth my time and my company's time to start over with c# instead of continuing in c++? I'd need to pick up c#, but I don't consider that a huge burden (actually looking forward to it). Some concerns are:
* Acquiring an more engineers down the road to work on this code. Our company will grow shortly. Will it be easier to find an engineer that knows c# vs MS's specialized c++/cx?
* Ease of getting help though examples, articles, and forums. If c# is much more common, that's useful.
* Compatibility between 3rd party libraries (Seems like WinRT components can be used from any of the main languages)
* Advantages of C# over C++? They both offer everything I need for this app, at least that I can see. What are some pitfalls of C#?
* Does c# use the continution/lambdas for asych programming in the same manner as C++/CX?
Are there any other pros/cons that I'm not thinking of?
What do YOU think? Also, what do YOU have experience with? Why do you back your answer?
C# would have the better online support (code examples, answers to questions), and the stronger base of engineers. I mean that in this specific situation, for this kind of strongly Microsoft APIs reliant software development. Windows Store highly important in Microsoft's overall strategy and C# is more important in their language strategy than C++. Thus, C# is the right fit, IMO.
*EDIT (Filip Skakun) I know reopening the question might be hard, so I can't answer it separately but I typed in all this text that could be useful, so I thought I'd add it below:
It is up to you to decide of course and it might be a very subjective choice depending on what you believe in, like if you think the higher potential productivity and better tooling and documentation support of C# outweighs the benefits of a faster, closer to the metal and (slightly subjectively) more portable C++ that you already know. C++ is still almost twice as popular as a language based on the tiobe index, so getting C++ developers might be easier than C# ones. C++/CX is something you only need to use for cross-assembly communication and talking to the WinRT library, but anything else you code should be done in the standard C++ based on all expert recommendations. Also note that C++/CX is not a managed language and you don't use it with .NET. It is highly similar in syntax though to C++/CLI which is a managed language. The good thing about WinRT is that you can use both languages if you want or need to. I use C# for all the XAML UI, networking, business logic etc. There are tons of samples for using C# with XAML while limited range of ones for C++ since it only became available and recommended for XAML platforms with WinRT. On the other hand for anything lower level like working with DirectX or CPU intensive tasks I use C++, since there is more documentation for straight DirectX than the open-source .NET wrappers for it and it performs better when you want to squeeze out all the potential power of the CPU or use the least energy from the battery.
C# is a bit cleaner language than C++ with less punctuation, the new async/await keywords that make async calls (which you must use in Windows 8 apps) a lot cleaner. It is also a managed language so in most cases you might not need to care about when memory gets released, about buffer overruns etc. Debugging C# code yields more deterministic results than C++ (I just spent 2 days debugging some C++ code and I still don't know how far along I am in finding the bug). It is also easier to maintain legacy code since debugging is so much easier.
C++ is faster, so it also uses less battery, your application will start faster and possibly use less energy. If you already know it well then you might have an advantage over the managed development crowd building apps out there. Because it doesn't use garbage collection - memory management is more deterministic and lightweight, so your animations will be more fluid.
Then there is also the motivation factor. If you really want to learn C# - you might be more happy, motivated and productive learning C# than the language you already know and will happily spend more hours learning it than you would be willing to spend writing another C++ app.
The underlying WinRT libraries are the same regardless of which language you use, but the .NET libraries are only available in .NET code and the standard C++ libraries are only available in native code.
Finally - regardless of what decision you make - you can always mix both languages. That could add to maintenance costs since whoever maintains the code in the future might need to know both languages and also the mixed language platform is very young, slightly less supported by the tools (you can't do mixed managed+native remote debugging for example) and potentially more buggy. It is a very good choice in many cases for the reasons I stated earlier though.
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 12 years ago.
I know C++ windows programming is harder than C#. Because we should Create WNDCLASS and Initalize it and using API Funcs and...
But My Question is here , for windows programming ,Is C# better than C++ ?
If yes , why large programs are created with C++ .
Its not "large programs" when C++ is favored over C# managed code.
There are limits to what can be done with managed code, for instance you cannot write hardware drivers or other programs that interface with hardware. You cannot even access all of the Win32 API from purely managed code. Some programs have high performance requirements and are therefore more suited to C++. Sometimes C++ is used simply because the company developing the software has skilled C++ developers. Sometimes C++ is used because the developers don't want the software to be dependent on the .NET framework (which isn't installed out of the box on XP and earlier Windows versions). Sometimes C++ is chosen so that a cross platform application can be developed.
In broad terms, C# is easier to learn and is a more powerful and productive language & framework than C++/MFC/COM etc. But C++ is a very broad tool, and can produce solutions to many very diverse problems, from writing operating systems, real time systems, embedded applications, databases, business software, desktop software, server software, libraries/frameworks, etc, etc.
C# is better suited to a particular class of problem. It is pretty much limited to running on Windows (with the exception of Silverlight & Mono). C# suits rapid application development, which means it is better suited to one-off custom software, such as many internal applications developed within large organizations. And as I've indicated, its more suited to developing desktop and server application software over drivers and other low level software.
If you're looking at which language to start learning, a smart choice would be: C then C++ then C#. This will give you the foundation you need to become a really good object oriented programmer, with an understanding of how lucky we are to have C#! If you don't have 10 years to spare, then go ahead and start with C#. Whatever you do, don't start with C++ or you are likely to give up your programming career in despair and join the circus where things make more sense.
If I could start from scratch all the c++ projects I have done in the past, 99% of the code would be in .NET. Especially when it comes to UI. WPF, Winforms are much more powerful than MFC.
What type of program will you develop? Please elaborate and then we can make a recomendation.
** EDIT
A good example is Visual Studio itself. VS 2010 is based on WPF now.
Better? Better how? Easier? Faster?
C++ is a monster to learn, huge and complex as it is. C# is considerably "friendlier" and easier to work with. C# often lets you complete tasks faster and easier than C++, because the language and it's framework does a lot of work for you. This is part of what makes C# better than C++, and what makes C++ better than C#.
If you let C# do the work for you, that means that you as a programmer sacrifice some control. This is what sets a high-level language apart from a low-level one. For demanding applications, programmers tend to pick a language that provides the necessary amount of abstraction while still providing the desired control. This is why many demanding applications (such as video games) are written in C++. It has a fairly large array of high-level features, while still packing the horsepower to pull really low-level code for situations where you need absolute control of the hardware. It is also why many business applications and other less demanding applications are written in a high level language such as C#, since these applications have no use for low-level features, and can safely enjoy the gains of high-level ones without worrying about performance penalties.
In C#'s case, all applications created with it run in the .NET runtime environment. This is a disadvantage for programs that need to run fast, since you want to be as close to the hardware as possible. So again, C++ wins for demanding applications where either execution speed or memory usage is crucial. Also C++ can be used on a very large amount of platforms, anything from PCs to coffee machines (okay, cell phones, then), while C# is officially limited to platforms running Microsoft Windows.
As for ease of development on Windows, C# is a clear winner. There are available frameworks for C++ too, but they are not even close to C# when it comes to getting things done fast and easy. That said, it is perfectly possible to write complex GUI applications for Windows in C++ without swearing too much.
Anyway, I hope you see how little sense it makes to compare languages like this. It's much like comparing a hammer to a screwdriver. Choosing a language is about choosing the right tool for the job. Many tools overlap - you can accomplish pretty much the same in C++ and C#, which complicates the choice. If you really want to read into this (going for an "educated choice"), I suggest you read up on the individual languages. If you just wonder which language to learn, I suggest you start with C#, and learn C++ if you ever need to (or want to).
C++ and C# both are really good languages, having said that both have their own specialities.
C++ is ideal for applications which needs to highly optimized memory and cpu usage like verly low level device driver development
C# is far superior for creating business applications like accounting and database driven applications which would take ages if you try building them in C++
In short
C++ is for applications which require highly optimized memory and CPU usage.
C# is far productivity and enterprise applications
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I'm a hobbyist programmer with a fair grasp of Python and I'm currently learning C. Recently I was talking to a colleague who also wants to learn to program. In his case, he wants to learn C++ as a path to Windows game programming using DirectX. Personally, I feel diving straight into C++ as your first language is a bit much - it's hard enough keeping motivated in an easier language, and I think it's better to learn another language to get your head round most of the basic concepts, then go into something like C++.
I found Python worked well as my first language as I'm more interested in network and web programming on Linux/Unix platforms, but for someone mainly interested in Windows game programming I was thinking C# might be a better choice as he could learn using Visual C# Express Edition and XNA, then switch over to Visual C++ when he's ready to start learning C++ and therefore already be in a familiar environment. I think memory management is a lot to take in, and C# at least handles that so he can put that off till he starts learning C++.
What do others think of C++ as a first programming language for this kind of application? Should I recommend he go for C# instead?
C++ should be fine. I think he is best off learning about memory management, pointers, etc. BEFORE jumping up to C# as he will understand how the program is working better. Otherwise, he will just see memory as being magic and the garbage collector will have no real meaning. It's always good to have a solid understanding of underlying languages (C, C++, Assembly, etc.) to produce the best code.
C++ is the main language used for most "serious" gaming titles. If programming for a major gaming studio then he needs to know the dirty little bits of C++.
Starting out with C++ might be a bit much for a complete novice. I would recommend C as a great starting point. You get familiar with the concepts of memory management and the other low level stuff before adding the complexity of C++.
Since C# is managed code, he would not be gaining the insights of the low level memory management. That will not serve him well when having to deal with C++. In this case, starting closer to the metal will help him in the long run.
C++ game programming is great. But unless you like total pain while you are learning to program, you might look at starting with XNA. This will allow you to work on the game content and logic instead of fighting with your engine code.
Now if you like pain go the DirectX and C++ route to start with.
I think it is better to thoroughly learn a language such as Java or C# before taking on C++. The reason I say this is because you can easily get bogged down in the details and intricacies of C++.
I struggled with C++ on and off (as a hobby) for a few years, then at Uni I was taught Java, stopped doing any C++, got a job doing Java for a couple of years, then moved into C++ dev. I picked everything up very quickly because I already knew what patterns and concepts I wanted to apply and it was just a matter of learning the syntax and weirdnesses and getting used to pointers again. I just had to learn HOW and not WHY. Taking on C++ as a first major language is learning HOW and WHY at the same time and it can be very confusing!
XNA is a good suggestion.
Python is good at game programming. See i-want-to-learn-game-development-which-language-should-i-use. Consider learning Pygame.
Pygame is a set of Python modules designed for writing games. Pygame adds functionality on top of the excellent SDL library. This allows you to create fully featured games and multimedia programs in the python language. Pygame is highly portable and runs on nearly every platform and operating system. Pygame itself has been downloaded millions of times, and has had millions of visits to its website.
If he wants to get into the industry, then knowing C++ is vital, as the majority of game engines use C++. (I also developer should at some point lean C or C++)
However, if he wants to write games (as in, finish writing a game) then C++ may not be the way to go. It is very complex and has a lot of pitfalls that make it a slow language to develop in. It is not just the memory management, but things like the horrible stl related compile errors etc that make it very hard to get anything done when first trying to program.
Looking at something like C# or Python would be a better option, as they are far less complex languages and each have some good game library's.
If he decides that C++ is the right way to go, then I would recommend at least a rendering library. Something like Ogre3D at the very least. The reason for this is covered in this article Write games not engines. While writing (or trying to write) an engine from a base API is going to be a good experience, it is unlikely that the game will get finished.
Something you have to consider is existing SDK's, you probably don't want to program everything yourself. For example, there are pretty good 3D engines with different types of licencing that may suit you well.
So you should check outthe existing libraries and SDK's and the few languages you want to stick with together at the same time. Adapting to C++ or C# is not that difficult, the former is more strict and more demanding whereas it gives you more extensive control on memory, the latter allows you to focus on the main development area but takes the memory management in charge (mostly), which means you could have real-time issues.
At the end of the day, what help you can get to build your application will invariably outweight the small differences between those OO languages (to some extent).
There are lots of game engines, most are listed on this page. Of particular interest are, in the free world:
Panda3D (http://www.panda3d.org/), C++ and Python;
NeoAxis (http://www.neoaxisgroup.com/), essentially C# (.NET);
Ogre3D (http://www.ogre3d.org/), C++;
CrystalSpace (http://www.crystalspace3d.org/main/Main_Page), C++ and Python;
Esenthel (http://www.esenthel.com/), ...
Non-free packages include Unity, and others.
If you do not want any of those engines, there are still very good libraries like Qt for C++, that allows scripting - though not directly Python, you would have to embed it yourself - and others for C#, but the listing could get quite lengthy.
Typically, people run out of steam before completing their first game. Therefore, unless your friend has a track record of being doggedly determined, I'd recommend the most high-level option available. If you are choosing between C++ and C#, that'd be C#.
I would prefer XNA and C# for a quick and painless introduction.I would use C++, and a library like DirectX, for game programming after having some experience on the topic.Most of the most successful games have written in C++.
If your goal is to have fun, and actually finish games yourself (or in small teams) that are relatively small in scope, then I say C# and XNA.
If your goal is to work in the industry, on super big budget games with giant teams... Then C++...
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am trying to figure out what game engine I should use? Right now I am trying to pick from toque, shiva, and unity. I will be learning c# and objective c so I can develop iphone games, some windows games, and possibly xna games for xbox.
Also any tips for learning objective c, c#, and designing and coding games?
Best thing for the future is to do what RaYell said in his comment. Start with ONE thing, learn it, and learn it thoroughly before moving on to something else. If you try to take on a half dozen things at once, you'll have broad surface knowledge across all of them, but not enough depth to do anything useful with any of those technologies.
Depth-first > Breadth-first when it comes to learning programming. ;)
If you want to go for both iPhone and XNA then I would consider going with Torque as your engine. They have versions of their 2D and 3D engines for both of those platforms, as well as for the PC, so you can have a fairly similar experience and toolset when developing for all 3. Not exactly the same, but pretty close.
You don't have a choice when developing for iPhone. You'll have to use the Apple iPhone SDK. I think this requires you programming in C (I think).
Likewise, if you're developing for XBOX (and you don't have the corporate XBOX SDK that real game studios purchase), then you'll need to use XNA. You can use the XNA framework (free environment and framework), but you'll also need to learn C# (or VB.NET although officially just C#). Using XNA also lets you build games for Windows environment.
I think you should probably start with something simple before jumping into either XNA or iPhone SDK. Even using something like VB.NET (VS Express is free) windows form app for a simple game like tic-tac-toe would be a good starting point.
It seems like you need to learn a different language and a different framework/sdk to reach all of these environments, so I'd recommend picking one and trying to learn that before you try to learn multiple things. Since C# and VB.NET (and XNA) are all free, have free tutorials, and free development environments (and you're probably using Windows, so you have the requirements) then I'd recommend trying one of these things first. That way, you can see if its something you really want to do. Building games (and software) isn't an easy job, so make sure you do a lot of research and learn the fundamentals before trying to jump into game programming.
I'll add my two cents regarding Unity. I haven't worked with Torque and haven't even heard of Shiva until now (it looks interesting).
My (somewhat limited) experience with game development is that above all, there is a huge amount of learning involved with the game development world and you really need to choose carefully where you spend your time.
You're on the right track looking at comprehensive game engines that include middleware tools. If you really want to make games (and not game engines), you'll want to focus exclusively on generating assets and game logic.
I have worked with XNA and can say that, by itself, it doesn't provide any of the middleware tools you'd need to build a complete game.
As for Unity Vs Torque, I choose unity because of their strong focus on C# (which will only grow more central in their upcoming release). Furthermore, the two communities are vastly different. Torque developers take a lot of pride in the fact the Torque includes the source. It is regarded as more difficult to work with, but will allow you to learn about the core code. Unity is closed source, has an active community and focuses on game development. Their community's attitude is that they are not there to rewrite game engines and that if there is a bug, the Unity team can and will solve it faster and better (they do a great and speedy job of resolving bugs).
My coding philosophy is more to the second. I want to make a game, not a game engine and I prefer a comprehensive tool rather than multiple tools that you have to tie together. Unity is very professional and you can get up to speed very quickly. I'm having a blast developing in it and have gotten concept work together very quickly.
Also, you'll need to learn at least basic 3d modeling and animating. At the very least, you should be able to block out some characters and find an artist to make the real versions later. I strongly recommend Digital-Tutors great series on creating Next-Gen game characters in Maya and ZBrush. Its a series (you don't need the XNA part).
Best of luck. Above all else, make a specific plan and stick with it.
I heartily recommand XNA, not only is it free, well documented and easy to use, but it now runs across all mobile platforms with its open source incarnation MonoGame. You can also avoid having to learn different languages for each platform, C# to rule them all. And C# is a great language in itself.
I suggest starting out with the riemers.net tutorials and working from there. There are many others: that's one of the biggest advantages of choosing this technology, the sheer amount of tutorials and support online.
More importantly than learning an engine or a language (dialect) is to focus on something you can actually pull off in a reasonable time frame. Biting off more than you can chew (common in indie game development) will just deter you from ever trying again. Game development is difficult, an engine is no shortcut.
Aim on a simple, single-player, 2D graphics game. If it's really your first game, you should use generated, ugly-looking content rather than trying to load resources from disk, which probably just complicates things. Build it from the buttom up. You will learn the basics on memory organisation, sprite/bitmap workings, sounds, operating system interaction, to mention a few things.
When you know how to do that that and know it well, you can move on to an engine like Torque; and then you might actually put it to some use. And hey - good luck and have fun!
Edit: You might also be interested in using a rapid game prototyping tool such as Trabant. With such a tool you can try out game concepts in minutes rather than days. When you know what you want, you build it using UE4 or some other game engine. Disclaimer: I'm the author of Trabant.