I am doing a bit of research before I am going to write my own 2D (and maybe some 3D) game engine. I have made an engine before using C# and XNA but I want to go cross platform this time by making my new engine in C++ using opengl etc.
But ... I still want the fast iteration times from C# and have access to the game engine there.
So I have a few options here.
I think I do need the speed for culling, scenegraph stuff, Matrix calculations, particle systems etc.
Wat are the Pros and Cons? What do you suggest?
It is possible to implement all of the features of ISO Standard C++ by translation to C, and except for exception handling, it typically results in object code with efficiency comparable to that of the code generated by a conventional C++ compiler.
the extern keyword is used to extend the visibility of variables/functions. Since functions are visible throughout the program by default, the use of extern is not needed in function declarations or definitions. Its use is implicit. When extern is used with a variable, it's only declared, not defined.
In every C program, three basic functions take place – accepting of data as input, the processing of data, and the generation of output. The acceptance of data refers to input and the presentation of data refers to the output. The C program accepts input from the keyboard and displays output on the screen.
If you want cross platform, you can't use C++/CLI. This isn't supported on any platforms other than Windows.
That being said, for cross platform, I'd either use C# with Tao, or use C++ to make the engine a library, and the use Platform Invoke to "use" the library from within your C# code. This will provide you the speed and control you need in the core engine (C++), with the flexibility of game design in C#.
This provides a clean, cross platform means of developing a game engine that can be exposed to C#.
Tao framework is dead, try OpenTK instead
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With