Hi there
 
At first my problem:
 
I'm developing a game engine and at the moment I'm working on a particle 
system.
 
The implementation uses a particle object , with an update method which is 
called in
every logic loop per particle. It's possible to load values like the 
emitter color etc. from
a dataset or file or whatever. But when it comes to the update I'm doing 
things like
 
newParticleColor = noise3d(particlePosition)
 
or
 
newParticleColor = startColor * (1-particleAge)
 
So the system is flexible as long as I write a new class with an own update 
method,
for every particleSystem I want. But I don't want to do so, especially I 
don't want to
loose the flexibility of providing new particle systems after compile time.
 
Thus I'm searching for a way to provide logic components as assets.
 
First I searched for a way to compile code at runtime from a file which 
could be provided
as a resource or asset. This seems nearly impossible. 
 
In the second place I thought about embedded scripting, which seems to be a 
proven way to 
do program logic (also game logic) without recompiling code and shipping 
again.
 
Now my questions:
 
1) Could a scripting language give the performance to do the logic of the 
particle-update method
    which is called about 50 times per sec for about 3000-6000 shown 
particles (300000 times per second).
 
2) Are there languages which compile the scripts to bytecode for Dalvik 
(DEX, not for Desktop JVM)
 
3) It seems Android Scripting Engine is build for another scenario (writing 
code into the interpreter and
    call Android SDK methods via RPC with JSON), but could components be 
utilized for my scenario.
 
4) From my first search LUA seems to be the best solution for things like 
this one (even it could be to slow
    for my particle updates, ingame-scripting could be used for many things 
like AI). Has anybody used it 
 
 
5) 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to