• Advertisement
Sign in to follow this  

C++ or C# For Game engine with OpenGL and SlimDX

This topic is 1404 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 All

 

I am new to the forum and grateful to be here.  Been considering for a awhile now to get started on my gaming engine I have always wanted to do.  So decided to take action today.  Been doing some planning but what I wanted to find out is; which will be the best language to use for my situation?

 

I want to develop a game engine, A first person shooter.  Would like to again experience as how a game engine works.  I know C++, C#, and have little experience in OpenGL, and SlimDX.  I prefer programming in C#.  

 

I would like to make a game engine useful for others to use if they choose so, and I plan on using existing libraries to help speed the development of the game engine, like OpenGL, and SlimDX.

 

But I am kinda stuck on which language to use?  When I was developing with OpenGL, it was in C++, and when I was learning SlimDX it was in C#.  Is it possible to use OpenGL with C#? (I know of OpenTK, but I found limitations when I last used it).  Another possibility I am thinking of; can one develop a game engine with using more than one language? Its that possible, and if so, is it recommended.

 

Enjoy

Devlyn

Share this post


Link to post
Share on other sites
Advertisement

I prefer programming in C#.

If you prefer C#, then take it. It really doesn't matters alot which language you take at your stage of engine development (vs e.g. AAA engine development).

 


I would like to make a game engine useful for others

 

...

 

Another possibility I am thinking of; can one develop a game engine with using more than one language? Its that possible, and if so, is it recommended.

You could use multiple languages and to be honest, an engine uses often an additional scripting language. But the core engine should use only one language to make it easier to work with. Two languages would be possible (using .NET would make it even easier), but it would be really hard for others to use it.

 

Eventually you could write different bindings to make your engine API available for other languages.

Edited by Ashaman73

Share this post


Link to post
Share on other sites

I think C# is a fine choice, especially for learning how a game engine works. OpenTK is a great library to use to get started.  It has openGL/AL/CL bindings + all the utility, input, math classes you can shake a stick at.  My game engine uses an OpenGL 4.3 context just fine with OpenTK and I haven't run into any limitations, aside from my own capability.

 

I've integrated Lua into my C# game engine and if you're looking at other languages, There's the iron languages (IronPython, IronScheme, etc) which integrate really nicely into C# since they're all managed languages using the same runtime.  

 

Cheers, 

 

Bob

Share this post


Link to post
Share on other sites

Thanks all, your insights was must helpful.  I think I am gonna stick with C#.

Share this post


Link to post
Share on other sites

C# is an awesome language.  By using it (over C++) you:

* Reduce development time by perhaps a factor of 2

* Decrease performance by perhaps a factor of 2 (more like 0.02 to 10.0)

* Get easy XBox portability

 

I would choose C++ if the two are close in your mind, but otherwise I would choose whatever you are most comfortable with, because the #1 challenge you face is not performance, but your ability to complete a project.

Share this post


Link to post
Share on other sites

That is very true, the task would be to complete it first.  But I guess the main aim for me at this stage is too learn and discover how these things work.

Share this post


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

  • Advertisement