Sign in to follow this  

How hard is it to port to C#

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

Hello First of all I'm not here to start a flame war, I know how these C++ VS C# topics are. I'm only asking for advice. I've been working on my engine in C++ for quite long now and I'm starting to get tired of annoying things like reference counting, shared pointers, my homemade string & vector classes and the general headbanging that often comes along with C++. I might already have switched to C# if it wasn't for the need to install Windows XP SP2, but now I'm seriously thinking about this. I'm starting to be discouraged at programming because I've been programming engines for so long but I've never actually created a game using C++. I feel like I need the added simplicity of C#. I was wondering if porting an engine from C++ to C# was complex and if there are things I should know before doing so. The thing I'm afraid of is the complexity of porting windowing code, as I think the WinAPI doesn't exists in such shape in C# (maybe happily). I'd also like to know if OpenGL has a "standarised" C# binding which would allow me to use the exact same functions as I was doing.

Share this post


Link to post
Share on other sites
I've done it a few times, and I didn't find it too hard at all. Though when I did it I took advantage of the situation by fixing and optimizing certain aspects of the engine. But by the sound of it you just want to develop your game. I think it would be a better idea to use an existing game engine such as Ogre or Irrlicht whether its in C# or C++.
Having never used either of those two engines (though I will probably try Ogre after I've wrapped up the XNA project I am doing), I can't give you good advice on their pros and cons.

Share this post


Link to post
Share on other sites
Quote:

my homemade string & vector classes

That's what the SC++L is for... ;)

In general, porting to C# is not that difficult at all. The language is easy to pick up; the hardest part after a while becomes realizing how much of your C++ code you can simple discard rather than port, because the code addresses a need that does not apply or that is already covered by part of the C# standard library.

I don't use OpenGL, but I do know there are a number of libraries out there for talking to GL from managed code, so you should be fine.

Share this post


Link to post
Share on other sites
Quote:
Original post by jpetrie
Quote:

my homemade string & vector classes

That's what the SC++L is for... ;)


I know I should've used stl and that's one of the reasons why my engine starts to piss me off. For some reason I have a moral problem with not re-creating everything by myself in C++ and I think it'd be different in C#.

About using Ogre/IrrLicht, I couldn't live with myself if I never made a game using my engine I built for more than 6 months lol.

I'm going to look into C#. I Only have one problem : I cannot get microsoft Visual studio express edition 2005 .net because I'm running on winxpsp1. I have convinced myself to upgrde to sp2 but I can't find how to! Windows update wants me to install 64 security patches but none of them is the service pack 2... I really don't know what to do!

Share this post


Link to post
Share on other sites
Quote:
Original post by Trillian
I'm going to look into C#. I Only have one problem : I cannot get microsoft Visual studio express edition 2005 .net because I'm running on winxpsp1. I have convinced myself to upgrde to sp2 but I can't find how to! Windows update wants me to install 64 security patches but none of them is the service pack 2... I really don't know what to do!
You keep running windows update until there ain't any more updates to install, by that stage you should have SP2 [smile]

Share this post


Link to post
Share on other sites
Quote:
Original post by ViLiO
Quote:
Original post by Trillian
I'm going to look into C#. I Only have one problem : I cannot get microsoft Visual studio express edition 2005 .net because I'm running on winxpsp1. I have convinced myself to upgrde to sp2 but I can't find how to! Windows update wants me to install 64 security patches but none of them is the service pack 2... I really don't know what to do!
You keep running windows update until there ain't any more updates to install, by that stage you should have SP2 [smile]


That's exactly what I feared! Ah well... thank you!

Share this post


Link to post
Share on other sites

This topic is 3864 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this