1

For instance, if I wanted to make a game which used a Python main file, but have another file with Ruby methods on it, how would I call those methods individually?

Secondly, how could I make a Ruby gem/library with python code in it? I can't find a way other than exec("python file.py") which is not a gem, requires the shell to be active, and have Python installed, so that wouldn't be as reliable as I'd want it to.

asked Jul 20, 2017 at 20:04
1

1 Answer 1

1

If you want to do a game, create it in a single language. As it stands, games are already pretty taxing programs. Even looking at a games basic structure, you have a main loop that is executing consistently, while updating absolutely everything within the games world.

Now while it would be an interesting idea to combine two languages, think of what that would do to performance. You would have to call another program from within the game to execute that code, which takes up extra time, which could frustrate players if its noticeable (and i have a feeling it would be).

I'd honestly say go with just python or just ruby. However, maybe later on down the line, if you build your own engine from scratch, you could implement a Ruby-like scripting language (though that could be a whole other thing and topic of discussion in itself).

answered Jul 20, 2017 at 23:54

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.