Question

Me and two friends of mine are working on a programming project together but still separately, I want to add that we are all very new to programming. Now we are all going to write the same application but in different language because we are all self-taught in different languages. I will be writing the application in C#, friend 1 will be writing it in C++/CLI and friend 3 will be writing it in Java (or J#).

Now the application we are going to make is going to be a "card game engine". It will be an application that will be able to load and play different types of the standard western 52-card deck games such as Poker or Blackjack etc. This actual application we will be writing separately but what we want to load the actual "card games" as external modules, I'm guessing we'd make separate assemblies for this? Now one of our requirements here is that these "card game" modules should be able cross-language, what I mean by that is that I should be able to for example use my "BlackJack C# Module" and load it in to his "C++ version" of the game engine and vice versa.

So I have a two questions

  1. Is this even possible to do? From what I understand all .NET languages can compile under the same solution? If we write the "modules" as assemblies then they should be able to access some of methods and vice versa or am I wrong here?
  2. Since friend 2 isn't actually programming in a .NET language, is there an easy way to make a Java solution that will work with this? Could he perhaps write the "card game" modules as DLLs that we can then import into our separate projects? Or would it just be easier for him to write the application in J#?

No correct solution

OTHER TIPS

I want to add that we are all very new to programming. Now we are all going to write the same application but in different language because we are all self-taught in different languages.

The answer to this statement is easy: don't. Don't even consider doing this. Choose a single language and stick with it.

So I have a two questions 1) Is this even possible to do? From what I understand all .NET languages can compile under the same solution? If we write the "modules" as assemblies then they should be able to access some of methods and vice versa or am I wrong here?

You can use interlanguage communication tools, but this will requiring learning some pretty advanced stuff.

2) Since friend 2 isn't actually programming in a .NET language, is there an easy way to make a Java solution that will work with this? Could he perhaps write the "card game" modules as DLLs that we can then import into our seperate projects? Or would it just be easier for him to write the application in J#?

Again, don't. You're making things much harder than they should be. You can't use JNI or JNA with NET wikis and easily mesh them with Java. Since you are all new to programming, again you will be much better off choosing common standards and sticking with them. Even if you weren't new to programming, you'd be better off with this.

Note that I have done some inter-language programs, but not by choice, only because I've had to. These have been simple affairs with information is passed as text using standard input and output (sockets). I've also used JNA to create Java programs that can call programs created in C, however again this has been full of many tricks and traps, several that I've fallen into, and again do not recommend this route if can be avoided. Also, and again, you cannot have Java communicate with .NET languages in this manner.

Other options for higher level inter-process communications include using a Remote Procedure Call Library, of which there are many, but which will also add additional unneeded complexity to your program.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top