Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  post your favorite scripting language  (Read 6143 times)
0 Members and 1 Guest are viewing this topic.
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #30 - Posted 2005-06-13 05:59:30 »

As I mentioned, bsh is actually quite fast (a LOT faster than that - typical for me is 5 to 10 times slower), but there's a bug which if you trigger it somewhere in your script it will result in a massive massive slowdown (somewhere around 100-500 times IIRC). So, I would guess you're hitting that bug regularly Sad ?
[...]

Well, loops are very slow...

for(int k=0;x<50;x++)if(foo[k]==16)foo[k]=0;

That's already a big drag...

for(int k=0;k<50;k++)for(int y=0;y<50;y++)if(foo[k][y]==16)foo[k][y]=0;

... and the framerate is down to... like 10fps with a 500mhz cpu. The same in java yields 500+fps and it's limited by the graphic card's fillrate.

It's horrible slow. bsh-2.0b2... maybe I should give b4 a try, but the changelog doesn't seem to mention any speed fixes. Ah well, I don't really mind it's slowness... execution speed isn't critical for prototyping Wink

弾幕 ☆ @mahonnaiseblog
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #31 - Posted 2005-06-13 09:42:45 »

Well, loops are very slow...

The funny thing is, I've had loops that were *fast* - it seems to be only certain loops that are slow (what really bit us with survivor was that a loop "became" slow after some apparently trivial changes to the source Sad ).

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

Senior Member




for great justice!


« Reply #32 - Posted 2005-06-13 22:13:35 »

I have used PHP and found it really easy to get going with - I was able to build a fairly complex site with no learning curve (but I'm a very well seasoned asp and jsp developer so the concepts involved were very familiar) but it didn't force me to think in new ways.

I have used ActionScript a lot and it is better than Macromedia's other language, Lingo. Better in the same way that having your eyes surgically removed is better than having them poked out with a white hot fork....

The scripting languages I really like are the ones that really take advantage of the benefits of being a scripting language rather than just trying to replicate the functionality of a compiled one- Python and Ruby do this to some degree but it's Lisp I want to learn. I've started working my way through Paul Graham's book and it is a completely different way of thinking about programming- I can see it changing the way I look at writing code and I think when I understand Lisp I will be able to call myself a good programmer...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline JasonB

Junior Member





« Reply #33 - Posted 2005-06-14 10:56:18 »

...jython is ugly, but only like 40 times slower....

Jython is ugly?  To embed?  Or you don't like the Python language?  Can't say I'm that impressed by the Jython source, but the more I've used Python, the more I like it.
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #34 - Posted 2005-06-14 15:27:07 »

...jython is ugly, but only like 40 times slower....

Jython is ugly? To embed? Or you don't like the Python language? Can't say I'm that impressed by the Jython source, but the more I've used Python, the more I like it.

Na... embedding is easy. It's generally quite easy to embed a scripting language in java. I just personally don't like python's syntax very much.

弾幕 ☆ @mahonnaiseblog
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #35 - Posted 2005-06-15 10:46:01 »

http://www.artima.com/lejava/articles/beanshell.html

(new interview with beanshell's author that will probably be interesting to non-bsh-users)

PS: Significant whitespace is the spawn of the devil Tongue

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

JGO Coder




Got any cats?


« Reply #36 - Posted 2005-07-19 07:52:33 »

Java.

Seriously, I can dynamically load code at run-time.  Thats the only "scripting" type feature I find useful.
Java is plenty high level for me.  And Im convinced I could teach any "scripter" how to use what they
would need of Java to write game scripts as fast or faster then I could teach them any other language.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #37 - Posted 2005-07-19 12:01:23 »

And how would you compile those .java files to bytecode when the program is being executed?

Janino is a good dynamic compiler, but oNyx says it fails under alot of code...

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #38 - Posted 2005-07-19 13:10:10 »

I guess in most cases when scripting is needed, you can assume the scripts are made during development of the game and thus the script developer has the JDK installed and will use javac or even an IDE like eclipse.

Offline Jeff

JGO Coder




Got any cats?


« Reply #39 - Posted 2005-08-02 03:01:16 »

And how would you compile those .java files to bytecode when the program is being executed?

The same way servlets do in many  servlet containers.

I'd invoke the compielr thats in the jdk classes jar. (com.sun.tools.javac)

But Erik is correct that thsi is only needed for run time self-modifying thinsg like
builder MUDs.

For almost all other game uses scripts are written and compiled at game development time.



Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Pages: 1 [2]
  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.

ctomni231 (34 views)
2014-07-18 06:55:21

Zero Volt (30 views)
2014-07-17 23:47:54

danieldean (25 views)
2014-07-17 23:41:23

MustardPeter (27 views)
2014-07-16 23:30:00

Cero (42 views)
2014-07-16 00:42:17

Riven (44 views)
2014-07-14 18:02:53

OpenGLShaders (32 views)
2014-07-14 16:23:47

Riven (33 views)
2014-07-14 11:51:35

quew8 (30 views)
2014-07-13 13:57:52

SHC (66 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!