Is C++ for Game Development only?
I was a Game developer for 2 years in Gameloft and as you can guess I have wrote a lot of C++.
Today I mostly write C++ for everything except websites. I write them in PHP, because Apache is the cheapest hosting.
I want to give you an example for something that is C++ and it’s not a game.
When we was starting Iris I was having this discussion in my head which language to choose.
Iris was meant to run on every platform, to play with the system on really low level, and to look beautifull.
For the low level it was of course C++ or C.
For cross-platform I was thinking about Java and Haxe, but it’s hard to run java on iPhone or on some embedded devices or to hack drivers and the PC in general. Haxe it’s a good choice, but it’s not super mature and I needed to learn it.
For the beautiful look I was thinking about C#.
So I make something like a table:
- Java: will run on Windows, Mac, Linux, Android, not so hard UI, hard to make low-level things
- Python: can make it run on everything, easy UI, there are ways for low-level
- Haxe: really good for everything.
1. C++ is the only real cross-platform language. It can run on every operating system and if you know a little bit of design patterns you can have clean code better than Haxe.
2. You can do everything with C++, from OS monitoring to writing drivers, services, AI, and it’s industry standart with history of more than 20 years. It will not just go away.
3. It’s hard to do UI, but if I can make my own UI system, I can make it better than WPF.
I choose C++ maybe for the love for the language and because I was really good at it. I was writing C++ every day for 2 years straight.
The only real problem was the UI. How to make a beautiful UI with C++. We was 5 people back then and our designer was good only in HTML. He was a web designer. He didn’t want to do anything, but HTML and he was really good at it. You know websites today have pretty slick design.
This was probably the first version I have. It took us about 2 months to make it. It’s a lot I know, but we are not so good programmers. We had all our back logic and it was working now was the time to make this thing beautiful.
Our designer was finishing with the design for our website and it was time for the Iris UI. Of course he did it in HTML, CSS, etc.
Now it was my job to make this working with our software. Long story short, because I cannot share much details about this after 1 month I was ready.
This is how Iris looks today. It was a lot of work and it’s C++.
It has a lot of features which will never be possible without C++ and I think it has pretty good looking UI.
This software will never be possible without C++ and for the momment it works on Mac, Linux and Windows.
It depends on the person. You should probably work a few years before try to make something complex with C++, but I am relatively decent programmer.
You can create everything with C++ and I mean everything. This is the only language in the world that can do so many things, but you should be ready to sweat a little bit.
- Is it easy? — NO
- Is it worth it? — YES
I write this originally as answer in Quora