I am creating a game with my friends and we are using XNA C# monogame to build it. My question is if the game will lag a lot if we use different languages to process data. My friends know python and javascript well and all I know is C#. We decided to use monogame for graphics and use the languages to process the data. An example would be health, if i got hit then data would be sent to the language and then sent back to change the information. Our method is to read from the different programs reading and writing the txt file.
2 Answers
Yes, the game will obviously be slower than if it was done completely within C#. However, writing the data to and from a text file is possibly the worst way to transfer data between languages in a program. Instead, run a sub-process in C#.

- 2,859
- 14
- 25
Going of Sebastian's answer, it would be very slow because the rate at which your game could run would be greatly limited by writing all your variables to the text file and syncing it up! It's just too slow and inefficient to do it using text-files!
An alternative to using a sub-process (if the game you are making is multiplayer) a thing me and my mates love to do is split up the work between server and client. As long as you agree on your own protocol for transferring data between server and client (much like how you read and wrote everything into a text file, except your doing it for multiple clients), they could write up the server in either js
or python
and you could write up the client :).
To keep the jobs similar to what they are right now, make the game entirely server sided! Send only the game-input from client -> server and from server-client update the client's game state entirely!
If it is a single player game, perhaps it's a good time to teach your friends C#, otherwise, Sebastian offers the best alternative.

- 6,510
- 2
- 17
- 29