On 26/06/2013 13:06, Sebastien Diot wrote:
> I would like to make a "web game" with GWT, and have some of the code "scripted" rather
> then compiled, to allow dynamic updates/tweaking without rebuilding and re-deploying.
>
> Now the hard part is, what scripting language could I use to execute the scripts that
> would both run within the JVM and in JavaScript on the browser?
>
> While "JavaScript" would seem like an obvious answer, I fear it would not do, due to the
> fact that is doesn't support "longs" natively (which I use a lot as IDs ...). Maybe there
> is an easy work-around, I haven't actually dived into GWT, yet so I would not know about
> it. I do know that GWT can compile Java code to work correctly as JavaScript even with
> long, but I don't know if the same solution can be used within hand-made scripts.
You can use Lua, commonly used to script games.
There are some implementations in JavaScript, for example:
http://kripken.github.io/lua.vm.js/lua.vm.js.html
which is optimized and fast.
It might have the same issue with longs, thought, like most languages compiling to
JavaScript... unless a specific workaround / implementation is made.
I haven't tried it in GWT...
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment