Sign in to follow this  

From C# to C++

This topic is 2138 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

Hi everybody,
I'm a Unity3D programmer. I made more than one game in c# and I have much experience with that.
But now I would like to study C++ and I have a basic knowledgement of it. Can some c++ programmer or anybody tell me, which Engine should I use, or what's the solution for my request ?

Thank you,
Nikolai.

Share this post


Link to post
Share on other sites
C++ and engines go together like acids and bases. Most engines are all about productivity, and C++ certainly doesn't fit that bill. C++ is more then language you would use to write the engine in the first place, but as an implementation layer, people generally will use something much higher level than C++.


That said, options exist.

CryEngine is C++ based and a peer to Unity.
Ogre 3D is C++ based, although not technically an engine, it's a 3D renderer/scenegraph. That said, if it was me personally working in C++ + 3D at this moment, this is what I'd choose.
IrrLicht is another option
Crystal Space has been kicking around for years too, but I don't really know if anything polished ever came out of it.


Then on the 2D side, you have:
SFML
SDL
Marmalade ( not really an engine, more a C++ middleware layer slight above OpenGL )
Allegro
Cave


Of course I am missing about half a hundred, to say nothing about obsolete engines like The Nebula Device ( which was really cool... ). If you are working on 2D, I have a [url="http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition.aspx"]SFML Tutorial/C++ language primer[/url] , that as an established C# programmer, should get you mostly up to speed on the language features. You will find a lot of them very frustrating coming from C++, be ready for a lot of "I have to do what????" and "theres no library for what???" moments in your near future.

That said, it's always kinda fun learning new languages.

Share this post


Link to post
Share on other sites
Spend a few months with just C++ first. Try to really understand the language and its standard library. You'll be much less effective if you try to learn some game library/API/engine while trying to also learn C++'s quirks. And it has [i]a lot [/i]of quirks and gotchas.

After that, which engine to use depends a lot on what kind of game you want to make. 2D? 3D? Mobile development, or PC?

[edit]

At first I panicked when I hit the post button and watched my post expand into something much larger than what I had written, I panicked, only to relax and realize I'd been ninja'd.

Share this post


Link to post
Share on other sites
I was about to say that shouldn't unity work with c++, but apparently not. That's a shame. Looking at the listing at [url="http://en.wikipedia.org/wiki/List_of_game_engines"]http://en.wikipedia.org/wiki/List_of_game_engines[/url] is a bunch of what I haven't ever heard of. The more popular engines might necessarily not be the best choice, even thought they might have better tools and community support. And all new engines are aswell a risky bet.

I havent really followed new standard open-source/free engines lately, so please someone correct me. But these two I remember might be worth looking at:
[url="http://en.wikipedia.org/wiki/OGRE"]http://en.wikipedia.org/wiki/OGRE[/url]
[url="http://en.wikipedia.org/wiki/Irrlicht_Engine"]http://en.wikipedia.org/wiki/Irrlicht_Engine[/url]

If these engines are already legacy and there isn't better alternatives, then I'm curious aswell why the hell hasn't anyone made new engine to keep up with the times?

Share this post


Link to post
Share on other sites
I don't know hot to edit. The worry about older popular engines, and newer engines, is if they are made with modern style of c++.

Please someone else chime in...

Share this post


Link to post
Share on other sites
hi. i'm a new member but this is as good as place as any to make my first post. as far as i know most people are going from c++ to c#, when i took my programming courses all we had was c++, i'm a bit confused why your going to c++ do you consider it uber-powerful? just tonight i googled "different between c++ and c#" so that i could start to work on getting back into this dev game. i got a lot of stuff out of that, but why are you going the other way?

Share this post


Link to post
Share on other sites
Switching to C++ from a syntax point of view will be tricky, but not the hardest thing out there. I suggest you first try to understand what a native language like c++ means. The biggest difference IMO is the manual memory management you have to do in c++, and that one will be quite daunting at first, because it is the root of most issues when developing native apps. Second, the standard library is nowhere near the one in .NET. It has way fewer functionality and it is not a platform itself. However, this is complemented by the tons of c++ libraries out there you can use in your projects.

I would first stay a bit away from game development and focus on learning the language well, and only then dive into graphics programming and games.

Share this post


Link to post
Share on other sites
[quote name='dragonalumni' timestamp='1331399773' post='4920927']
hi. i'm a new member but this is as good as place as any to make my first post. as far as i know most people are going from c++ to c#, when i took my programming courses all we had was c++, i'm a bit confused why your going to c++ do you consider it uber-powerful? just tonight i googled "different between c++ and c#" so that i could start to work on getting back into this dev game. i got a lot of stuff out of that, but why are you going the other way?
[/quote]


There are many reasons one might go from C# to C++. The most common would probably be performance, but you also have things like C++ being cross-platform, able to directly access memory, maybe you hate C#'s garbage collection, or maybe you just want to expand your programmer knowledge.
That being said, these reasons don't necessarily mean you actuallu [i]should[/i] go from C# to C++. It really depends on what you want to do. C++ and C# both have their pros and cons.

Share this post


Link to post
Share on other sites
[quote name='Nikolai Shevchenko' timestamp='1331316101' post='4920725']
Hi everybody,
I'm a Unity3D programmer. I made more than one game in c# and I have much experience with that.
But now I would like to study C++ and I have a basic knowledgement of it. Can some c++ programmer or anybody tell me, which Engine should I use, or what's the solution for my request ?

Thank you,
Nikolai.
[/quote]

If you want to learn C++ then you shouldn't worry about which engine to use (You shouldn't make a big game using it to start with anyway), start with the basics then you can use a framework such as SDL or SFML and possibly add OpenGL if you want to learn 3D programming (Alternativly you can use Win32 and DirectX if you're on Windows).

Once you know C++ fairly well you should ask yourself if you want to learn low level engine programming or not.
If yes then you should just build a game using the low level APIs of your choice (OpenGL or DirectX usually) (Don't worry about making or using an engine, just make the game to start with and let the "so called engine" develop naturally)
If no then you should pick an engine that gets the job done and use whichever language it provides for you (Most likely this will not be C++ as the industry is moving towards higher level languages for high level programming) (Even CryEngine which has a C++ interface favors high level scripting using lua for large parts of the game logic)

Share this post


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