I have a medium-sized project (turn-based game) that is currently written in C / C ++. Only one person works on it. This will match / clr, although I have not tried / clr: pure.
I am looking for advice on the general process of converting it to C #.
This is mainly C with a thin veneer C ++ on it (C with static / single classes to define the scope). Yes, this is not a "real" OO, I planned to convert C # first to avoid creating any problems during the conversion.
It uses the STL (queue class) in the path tracking module to a very limited extent, and because it is a game, it also does not perform any memory allocation outside the third-party sound library in the DLL and what is needed to load graphic bitmaps.
I want to convert it to idiomatic C #. I would prefer not to discuss whether this is a good idea, I understand that this is not so, please let the part go. Suppose I have the main reasons.
I also did my research, and there is a stream that is somewhat important for converting methods using a reflector. I plan to delve deeper into it when I get a chance.
Translate C ++ / CLI to C #
There is also one paid application that will convert from C ++ to C #, which I can look at if this does not work as I would like.
The hardest part is to rewrite the interface in WPF / Silverlight or XNA (or both). Each of them has its pros and cons, but now I'm leaning towards WPF because of font support, and because in this way I do not have to write all the widgets. In the end, I can do both fast and fast XNA port, and WPF later.
There are several possible approaches to this, and I wanted to know if anyone has experience with such a conversion, as well as any suggestions or pitfalls.
1) First create a user interface. This includes either exiting the graphics module as is, or converting from GDI to raw GDI, like calling in XNA, and then converting it to WPF one dialog at a time.
2) First, convert the guts and leave the main interface in C ++ / CLI, now, after converting the guts, switch the interface one dialog box to WPF.
A related question is whether it is worth doing this module modulo or, basically, right away, and is it better to do a rough conversion in C # and clear each of them or clear everything in C ++ and then convert to C # .
The idea now is to rewrite the event loops to use a home common loop such as MFC, and then try to convert everything all at once to C #. Leave the graphics in C ++ and see what the breaks are. After that, go to XNA and give the WPF layer later. The last two steps are arbitrary, I think the XNA port will be easier, but using the main WPF panel can be quite simple.
I am open to any suggestions that may help.
Thanks, Ralph