• Advertisement
Sign in to follow this  
  • entries
    21
  • comments
    30
  • views
    12109

tool overload

Sign in to follow this  

481 views

Okay, I'm coming to terms with the fact that I am suffering from tool overdose.

Batik? Cool, but it doesn't really help me.

JRuby? The language looks fun, but the Java->JRuby interaction really has been a pain. I can't get it to work the way I want, plus there's something about the implementation that makes it really inefficient. Every time you pass JRuby code a Java object, it seems like it needs to fully ruby-ize the java object, and if you pass it a big object (like say Graphics), it literally sits there working for 10 seconds. I'm not going to have a loading bar for my scripting engine! (though they say this inefficiency will be fixed in the December release)

So JRuby is outta here. Hopefully sometime in the future I'll have an excuse to learn this fun language.

Rhino is looking better and better, I think I'm using that now. It seems to be the only library I can find that has a sane way for Java code to call a scripted method. javascript might not be as charming a language as Ruby, but as long as I have some way in my game to interactively change the game code, I'll be happy.
Sign in to follow this  


4 Comments


Recommended Comments

You should also look at BeanShell which actually runs off of the exact same sytax as java. This means that most of your code can also be ran interpreted through BeanShell. This is what I finally started using. All I can say is WOW. It provides Realtime Dynamic Object Creation and Alteration which means that you can create objects through the interpreter.

For instance if I type:
 > import javax.swing.JFrame;

> JFrame f = new JFrame("test");
> f.setSize(400,300);
> f.setVisible(true);
> f.dispose();

it will do all of those things in real time. Quite neat.

Share this comment


Link to comment
I find that Jython is a lot better at having Java objects passed to it, but it is still slow -- avoid this whenever possible and consider only sending wrapper functions to the scripting core.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement