Jump to content

  • Log In with Google      Sign In   
  • Create Account

greenvertex

Member Since 31 Jul 2012
Offline Last Active Nov 21 2012 07:12 PM

Posts I've Made

In Topic: Help with learning C#

09 November 2012 - 01:42 PM

If you're looking to do games in C# I say just jump in. If you have even a marginal background in C++ (which it seems like you do) you'll have no problem understanding C#. Start here, there's a lot of tutorials and code samples to look through. Get a few of those working and if you're not satisfied with your understanding of the language I've never had any complaints about the O'Reilly series of books.

In Topic: Sharing C++ object between application and plugin with C interface

01 November 2012 - 06:07 PM

Then don't. If you have some complex operation to perform on each node's buffer that is generic enough to reside in an external library, have that operation take as an argument the address and length of the buffer. No serialization required.

In Topic: Sharing C++ object between application and plugin with C interface

01 November 2012 - 05:15 PM

Not necessarily, you can write an algorithm that traverses the object tree in client code, applying some algorithm from your shared library to each node. Again, it's not a "fix all" function call, but it's still beneficial to assume as little as you can about client code from a library.

In Topic: Sharing C++ object between application and plugin with C interface

01 November 2012 - 04:47 PM

extern "C" __declspec(dllexport) void pluginEntryFunction(void* _theObject)
{
		 // Following is wrong and dangerous:
		 myClass* theObject=(myClass*)_theObject;
}

That seems incredibly generic to me. Maybe that's why you're running into issues? Instead maybe prefer something long the lines of:

extern "C" __declspec(dllexport) void pluginParseBuffer(char* theBuffer)
{
  //Do something...
}

It's not a good idea to define the same type in and out of your library for exactly the reasons you described. While breaking up a generic function into more specific operations is certainly more verbose on the client's end, they can always be wrapped in a function to perform the appropriate calls in order there.

In Topic: Need advice on how to start creating a 3d turn based strategy game

26 October 2012 - 02:30 PM

But would I be better off learning how to make my own engine, or using one like unity? and would it be easier to do it 2-d?


You would be better off using an engine, commercial or otherwise. You're going to find yourself not making any real progress for a long time if you decide to roll your own. Most times this leads to dead projects, those that don't die don't end up having what's generally considered an engine running them...

It would be easier to do something in 2D. The math is easier, there are plenty of environments to work in, and there are a lot fewer problems to deal with. If 2D is where you what you want to do, don't use Unity, it's very much ill suited for 2D games.

PARTNERS