Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Scripting Languages?  (Read 2136 times)
0 Members and 1 Guest are viewing this topic.
Offline Eliwood

Junior Duke




Stencyl


« Posted 2004-05-20 22:06:47 »

What good scripting languages are available that integrate well with Java?

I tried out BeanShell, but because scripts are interpreted, it's not feasible for my game where every object is bound to a script. BeanShell has everything else I'd like though...

Offline Jacko

Junior Duke





« Reply #1 - Posted 2004-05-21 12:27:57 »

Java?
Offline abies

Senior Duke





« Reply #2 - Posted 2004-05-21 13:10:42 »

http://groovy.codehaus.org/

Groovy has a benefit of being _more_ powerful than java in expresiveness (mainly thanks to closures support). Unfortunately it is only compiled statically or dynamically, with no option for interpreting - so if you plan _very_ frequent reloads of same scripts, you will need to work around that.

BTW, AFAIK Beanshell 2.0 has support for compilation of scripts.

Artur Biesiadowski
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline nonnus29

Senior Duke




Giving Java a second chance after ludumdare fiasco


« Reply #3 - Posted 2004-05-21 14:54:28 »

Quote
Java?


Everytime scripting comes up someone says this but I've yet to see an example of how to do it.  Guess I don't have enough imagination or something....

There are lots of 'jvm languages' (google) JLua, Jython, Javascript (rhino).  I've used rhino and i liked it.   I haven't done a project with extensive scripting yet so I don't know how it would perform.  Most people here say good things about beanshell.
Offline Chman

Junior Duke




Nothing more that... Java games are cool !


« Reply #4 - Posted 2004-05-21 15:26:53 »

I use DynamicJava which is great because it simply interpret pure Java code Smiley !
So you make scripts in Java language...

http://koala.ilog.fr/djava/

Chman
Offline Jacko

Junior Duke





« Reply #5 - Posted 2004-05-21 18:47:38 »

Quote
Everytime scripting comes up someone says this but I've yet to see an example of how to do it


http://java.sun.com/developer/JDCTechTips/2003/tt0722.html#2
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #6 - Posted 2004-05-21 20:04:43 »

Quote
I use DynamicJava which is great because it simply interpret pure Java code Smiley !
So you make scripts in Java language...

http://koala.ilog.fr/djava/

Chman


OK, speaking as an ignorant person here, I'm struggling to find ways that Dynamic Java is anything but an inferior version of beanshell. What am I missing? (I've been through the docs and the website etc - noticed a few minor differences e.g. use of multiple package statements in one source...although, TBH, those sound like mucking about rather than a useful feature???)

malloc will be first against the wall when the revolution comes...
Offline nonnus29

Senior Duke




Giving Java a second chance after ludumdare fiasco


« Reply #7 - Posted 2004-05-21 20:12:37 »

!!!
Grin

Thats pretty cool.  But that example sucks because it writes the source to a file then compiles it.

Hehehe, cool  Smiley

I've been wondering about this forever...
Offline abies

Senior Duke





« Reply #8 - Posted 2004-05-21 20:45:08 »

Quote


OK, speaking as an ignorant person here, I'm struggling to find ways that Dynamic Java is anything but an inferior version of beanshell. What am I missing?


There is a big difference between DJ and beanshell 1.x - in DJ you are able to define new classes, while in beanshell you are just able to implement interfaces using Proxy. AFAIK, in beanshell 2 you have full support for compilation, including defining new classes - so it is a superset of DJ (but DJ is not longer actively developed, is it ?).

Anyway, DJ allowed you to define classes few years before beanshell - and this was a reason for it to exist Smiley Currently, it can probably die silently, forgotten in depths of internet.

For me, there are two scripting choices: Beanshell if you want something small and easy, and Groovy, if you want something with all kinds of expresiveness possible to scripting.

Artur Biesiadowski
Offline Eliwood

Junior Duke




Stencyl


« Reply #9 - Posted 2004-05-21 22:22:58 »

Quote
http://groovy.codehaus.org/

Groovy has a benefit of being _more_ powerful than java in expresiveness (mainly thanks to closures support). Unfortunately it is only compiled statically or dynamically, with no option for interpreting - so if you plan _very_ frequent reloads of same scripts, you will need to work around that.

BTW, AFAIK Beanshell 2.0 has support for compilation of scripts.


It said that on the site but he provided absolutely no documentation for that. I also asked on this site a few weeks ago and nobody answered. Could you point in the right direction for this?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline MickeyB

Senior Duke




my game will work, my game will work!


« Reply #10 - Posted 2004-05-22 00:09:22 »

I too asked this a while back a s friend wanted me to build him a mud that he could then as joe immortal, go in and type out scripting and add functionality to the mud, not just content.  I will have to review the link above in detail.

MickeyB

Current Project: http://www22.brinkster.com/mbowles/
Offline aldacron

Senior Duke


Medals: 9
Exp: 16 years


Java games rock!


« Reply #11 - Posted 2004-05-22 04:52:35 »

pnuts
Offline abies

Senior Duke





« Reply #12 - Posted 2004-05-22 06:37:30 »

Quote

It said that on the site but he provided absolutely no documentation for that. I also asked on this site a few weeks ago and nobody answered. Could you point in the right direction for this?


http://www.beanshell.org/bsh20announce.txt

Documentation on the site is still 1.3, so you need to diff it in your head with info inside announce file.

Artur Biesiadowski
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #13 - Posted 2004-05-22 08:20:18 »

Quote


There is a big difference between DJ and beanshell 1.x - in DJ you


...although BSH has been at v2 since 2003. Pat (the author) seems to be of the old school of diligence - something that works almost perfectly is marked "beta" until it's had a year to settle down Wink.

e.g. we've been using bsh-2 beta in production environments almost since it came out - no errors. There are some significant bugs, but the kind of thing you'd often see in a gold release of normal software (and thankfully not affecting anything we'd been doing with bsh to date...)

Quote

Anyway, DJ allowed you to define classes few years before beanshell - and this was a reason for it to exist Smiley Currently, it can probably die silently, forgotten in depths of internet.

For me, there are two scripting choices: Beanshell if you want something small and easy, and Groovy, if you want something with all kinds of expresiveness possible to scripting.


Thanks for the explanation; makes sense now Smiley.

malloc will be first against the wall when the revolution comes...
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (45 views)
2014-10-17 03:59:02

Norakomi (36 views)
2014-10-16 15:22:06

Norakomi (27 views)
2014-10-16 15:20:20

lcass (31 views)
2014-10-15 16:18:58

TehJavaDev (61 views)
2014-10-14 00:39:48

TehJavaDev (61 views)
2014-10-14 00:35:47

TehJavaDev (51 views)
2014-10-14 00:32:37

BurntPizza (67 views)
2014-10-11 23:24:42

BurntPizza (39 views)
2014-10-11 23:10:45

BurntPizza (81 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!