Page 1 of 1

Pro and Contras of c#.net vs native c++ for a bot.

Posted: Sun May 18, 2014 10:26 pm
by BlubBlab
I came up with that topic because I wrote a small (meta)bot which control the Neverwinter APBInfinite profession bot.
This bot goal is only start/kill/restart the APBInfinite bot because it hang up some times.(PM me if you need a copy^^)

I used primarily c# and a thiny autohotkey script. I got it work with buttons, autosave-settings, timer , process control and the autohotkey for a mouse click in 90 Minutes not 100% bug free and not all extras but it worked.

For the DSO bot c# would be too much overload but for a big game like Aion or Neverwinter I think I would use at least as back-bone c# with a lua wrapper because:

1.) Huge Framework on background / allow rapid engineering
2.) No Memory leaks
3.) No pointer confusing.
4.) Nice structured language

cons:

1.)On linux mono c# is incomplete
2.)A bit slower than native c++ but faster than Java.
3.)People who love linux have may some issues getting warm with it.
4.)C# can easily reversed engineered but no issues if the software is open-source.

I would love to here some suggestions about that thoughts, I known we have MM but from the experience I know when you hit the limit its no easy to get in the code and compile it and/or maybe someone want to make it own thing from scratch.

Re: Pro and Contras of c#.net vs native c++ for a bot.

Posted: Mon May 19, 2014 11:46 am
by Administrator
Memory leaks are easily avoidable in C++ if you use the right tools. That, and CppCheck will point out most of the mistakes.

Anyways, it comes down to just using whatever feels comfortable to you. If you prefer working with C#, then do it. The speed gain for using C++ will be minimal and unnoticeable.

Additionally, the code for MM2 is much cleaner and easier to build upon. The only additional libraries you'll need (as of right now) are Lua, OpenAL (may be made optional), and Ncurses. All you need to do is just plug a new function into one of the existing modules, or create your own module (copy an existing module, change the functions of it). Here's an example.