Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 27 May 2009
Offline Last Active Sep 22 2012 07:23 AM

Posts I've Made

In Topic: C# and C++

17 September 2012 - 09:29 AM

I can't tell if this is a troll or someone who just woke up and decided to make a game. C# is a less complex language, however I wouldn't consider it harder. And there are more than 3 threads about this same thing on the first page of the beginners section.

nooooooooo, C# is a more complex language - it has much more in it than C++ and is growing all the time (even if half of what they add these days is confusing people about the best way to use it) :) But programs written in C++ are more complex out of the necessity of dealing with a lot of machine level concepts that are dealt with for you by the C# runtime. C# has features that are far beyond anything C++ by itself can comprehend such as support for dynamic typing, memory management and a completely different system of linking & compiling that's much faster, cleaner and more advanced. There's nothing stopping you from making all these things in C++, and there are low level things you can make C++ do that are unavailable in C# (without unsafe code or interop) but those are available by virtue of the language being simple, not complex :)

In Topic: C# and C++

17 September 2012 - 09:21 AM

I say just go ahead and learn C#. It's an essential skill for modern Windows programming to know C# (or at least some .NET language) and how to use the .NET Framework. C# will be much less painful to learn and you will be a deadly programmer when you learn it. Moving on to learning C and C++ will be FAR easier, as you will already understand programming and the languages are very similar in style, syntax and structure. But, in the end, you will need to know both to be a really effective game programmer and be eligible for a wide variety of jobs in the games industry... I just think learning C# first will be much easier.

Don't fall into the trap of thinking language A is "better" than language B. Most such claims are complete nonsense, unless we're saying BASIC and VB.NET sucks (just kidding! lol). Programming languages also do not (I repeat, do NOT) have any attribute, element or property called "power". All Turing-complete languages are "powerful". Theoretically, any Turing-complete language can calculate the entire span of existence of the known universe. C# is not "less powerful" than C or C++, nor is the reverse true. Likewise, assembly language is not more "powerful" than C... Languages also do not have any sort of fixed performance. The performance/speed of code varies from machine to machine, API to API, programmer to programmer, etc... Some languages can be theoretically faster than others due to physical limitations or advantages (e.g., JIT compiling or interpretation), but no programming language has a "top speed". Well-written C# code can easily outrun badly-written native code, and vice-versa. Managed languages, despite being theoretically slower due to JIT compiling, can sometimes be superior in performance to native code considering the gains in memory efficiency, reduced bugs, cleaner and better-written code, etc. While I can usually squeeze a couple more milliseconds out of C than I can with C#, sometimes complex algorithms can be faster in C#. It really all depends... just, like I said, never subscribe to any belief that any language is necessarily "better", "faster" or "more powerful" that any other (provided we're talking about practical, Turing-complete languages...not brainfuck or anything impractical).

If you start with C#, then you'll have the opportunity to learn the essence of Windows application programming (via Winforms) and the essence of DirectX (via XNA Framework). Both of these are easy-to-use APIs that are quick and easy to get started with but provide very deep, far-reaching and low-level capabilities. There's no reason you can't write a big, bad multi-million dollar Windows application with C#, just like you can with C or C++! There are plenty of them out there! When you feel you have "outgrown" the XNA Framework, which is like to happen when you want to write next-gen games for Windows, XBox or other platforms, then move on to learning SlimDX (the C# wrapper for DirectX and all its related APIs) and OpenGL.

This should be required reading for everyone before posting on a [name of managed language x] vs C++ thread :)

In Topic: C++ Alternative to Unity?

17 September 2012 - 09:13 AM

+1 irrlicht.

I've used orgre3d and irrlicht. I like irrlicht the best, easier to use, the api is more consistent and easy to use. Speed is great, and it comes with a free level designer. It also compatible with LOTS of formats, ogre3d only supports its .mesh format. It also has an optional audio library too.

Irrlicht also gets my vote. Actually, it comes second to Havok's Vision engine (used to be Trinigy) but that costs money! However, I think possibly only UDK has the same sort of IDE approach as Unity does, and even then it's not quite the same. Where I work we've all (C#, Web and C++ developers alike) been blown away by Unity, both in how sensibly it works and the level of performance you can get out of it without even trying. If what you're after is a good way to learn C++ - don't start with a large 3rd party engine! Get yourself some good C++ books and try writing your own engine from scratch following the NeHe or directxtutorial.com (my favourite) lessons.

In Topic: C++ Alternative to Unity?

17 September 2012 - 09:05 AM

C#, used by Unity, is a fully fledged OO language that has far more features than C++ and is therefore more complicated

Number of features of a language != how complicated said language is...

Yes it does ;)

C++ is simple and powerful, and difficult to use properly when dealing with high levels of abstraction. C#/Java and the runtimes they are coupled to lend themselves better to software engineering because they are more advanced OOP languages that have concepts built in that the C++ programmer has to take time developing themselves. More complicated programs, less complicated language.

In Topic: C++ Alternative to Unity?

15 September 2012 - 05:05 PM

In case it wasn't clear from my last post.

There is an engine similar to Unity 3D that supports C++

It's called Unity 3D

You can write C++, compile it to C++/CLI DLLs, and reference those in your game object scripts.

So if you have, for instance, all your AI routines written in C++. You can keep them in C++, and only need write enough C# to make calls to the appropriate functions. Manipulating objects in the scene graph will still be done with C# but that's ok because in any C++ engine you'd write 90% of such code in a scripting language anyway, You have the added advantage that (like Java) C# is a proper language that's very close in syntax to C++ and not restricted, or weird, in the ways that scripting languages often are.