java scripting engine

Published October 04, 2005
Advertisement
Okay the time has come for some RAD. I'm looking into scripting engines to use in conjunction with Java, because I feel like I can really tear things up if I get a nice scripting engine with an interactive mode that lets me edit scripts while playing the game.

So I checked out what's available and I narrowed it down to Jython and JRuby.

Jython pros:
- The Python language is pretty popular for games
- Looks pretty stable (they are up to version 2)

Jython cons:
- Library is 2.7mb, which is pretty big if I ever hope to sell any games to people on dial-up.
- The whitespace thing bugs me. Are brackets really so bad, that we need to come up with a clever way to avoid writing brackets?

JRuby pros:
- Smaller library (800k)
- I kind of like the language more. One of the things I want out of a scripting language is closures, the whole passing-functions-as-data thing. Python certainly supports closures, but the difference is Ruby encourages them, by making them so easy to do. Looking at Ruby code, you see them all over the freaking place.

JRuby cons:
- Not really finished. It seems like most of the upcoming work is for tighter integration with Java, which I don't really need except as far as it increases performance. But there's some important stuff missing, like continuations. I've never ever used a continuation, but maybe I want to!
- Performance concerns. I know that the point of a scripting language isn't high performance, but when I look at this, it makes me worried.

But anyway, I think I'm going with JRuby, as that language seems more like what I want.
Previous Entry indie indie indie
Next Entry svg in java
0 likes 3 comments

Comments

fur
OMG! &#106avascript via Rhino! There is no other logical choice!

Seriously, you can seemlessly call back and forth between the two in both directions, and you can expose only the classes/methods from Java that you want.
October 04, 2005 03:38 PM
H_o_p_s
I agree, Rhino all the way!
October 04, 2005 05:25 PM
pinacolada
Cool, it looks pretty solid, I'll check it out. I think I'm still leaning towards Ruby though, as I want a language that's really hacker-friendly and RAD-friendly.
October 05, 2005 09:56 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement

Latest Entries

check

1141 views

I have a logo!

1122 views

wooo

1073 views

scripting

1185 views

tool overload

1276 views

java svg code

1155 views

svg in java

1152 views
Advertisement