Jump to content

C/C++ Beginner Question


Recommended Posts


I've just started in the wonderful world of C/C++ for WoW emulation. I'm intermediate with Javascript and LUA and from the type of language I'm seeing, it looks like I'm going to be a bit ahead of the game. I know the best way to get a grasp on C/C++ would be to go to a bookstore, but is there any sort of guide or material regarding C exclusively for WoW emulation? I'm not entirely sure how such things work and am afraid I'll end up spending a ton of time learning things that are pertinent to programming in general, but only 20% of it will end up helping me with WoW. Is C pretty much across the board for most gaming programs and anything I learn from C in general should have some usage in WoW? Or are there guides that discuss specific function and such that only apply to WoW? I haven't been able to find any and I'm just curious for your input.

Link to comment
Share on other sites

Or you can just start hacking away. If you have good knowledge of JS and Lua you probably know enough C syntax already to have a good grasp on it. You can just do what I did: play with mangos, and when you don't understand something, look it up.

And you should never be afraid to learn more than you need.

Link to comment
Share on other sites

While it's possible to just dive in, I think success is more likely if you first learn about some of these things you're likely to have never used before.

  • pointers - you must know this stuff, since C++ uses explicit memory management
  • classes - the bread and butter for inheritance and polymorphism
    mangos uses these these object oriented concepts heavily
  • templates - you may never write template classes or functions, but you should be able to read and understand them
    mangos uses lots of templates, including some template meta programming
Link to comment
Share on other sites

Pay attention to faramir's advice. He's made significant contributions that has brought MaNGOS leaps beyond what it once was. Repeat after me: "faramir is wise...faramir is wise..". :lol:

There is a mountain of tutorials, guides, references, code examples, and even full books online that you can use for free. What I offer you next just scratches the surface. Remember... Google is your friend. You'd be amazed at the volume of links you'll find to useful stuff just by typing "learn C++" into Google's search box.

Bruce Eckel offers both volumes of Thinking In C++, probably the most definitive introduction to not only the language itself, but the concepts of object-oriented programming. His website is Mindview Inc and you can find the book in PDF format at Planet PDF as downloadable ZIPs or get the HTML version, complete with source code examples, right from his Free Electronic Books page.

Of course, you cannot pass up Bjarne Stroustrup's website, the father of C++!

Then there's the three most popular sites dedicated to learning just about everything to do with C++:

C++ Reference CPlusPlus C Programming

Roy Souther has a very well done introduction and reference guide to C++, with plenty of links, at Silicon Tao.

If you prefer a more Microsoft-oriented approach to C++, CodeGuru is one of the better places.

If making video games and related software is your thing, from newbies to the seasoned pros, you cannot go wrong with GameDev.net, one of the best websites around for learning everything about making a video game ( and I do mean everything!).

Last, but not least, I highly recommend Free Programming Resources for links to free tools and materials for all the popular programming languages.

For information specific to WoW and MaNGOS:

The MaNGOS Wiki, of course!

PseuWoW is working on creating an open-source game client, similar to WoW. They're a great place to start understanding how WoW communicates to the game server, among other things. Once you've mastered C++, feel free to give them a hand. 8)

The UDB Wiki can teach you a lot about how a world database is put together for MaNGOS.

The ScriptDev2 and ACID forums will teach you all about the MaNGOS EventAI and creating your own scripts to handle game content like dungeons, world bosses, holidays, world events, and special NPCs.

The WoWDev Wiki has loads of technical information on the inner workings of the game client.

The WoWWiki is the definitive encyclopedia for the game. It has a very good section on UI programming with Lua, although WoWAce is much better for UI add-on development.

I hope this helps you and good luck! I look forward to what you may offer to this community. ;)

Link to comment
Share on other sites


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use