Hi,

I'm new to embedding v8 in C++, but haven't tried to do more low-level 
javascript processing.

So, to explain what I want to do, I'm developing a game where the user 
interface uses javascript extensively to communicate to a server, but I 
want to intentionally throttle how much gets executed per cycle, where the 
player can upgrade this feature to get more commands executed per cycle. 
 The players will be able to create custom javascript functions, as well, 
so I can't just limit this in javascript itself, since they would be able 
to circumvent this, so I know I have to do this in C++ instead.

Is this possible?  Any examples I've seen of libv8 seem to be very 
high-level, and don't expose some of the low-level control of how often the 
javascript is executed per cycle.

Also, if possible I want to be able to guarantee that timeout/time specific 
functions still work as expected, so I know it's not just an issue of 
limiting the number of steps per delta time of execution, since this will 
cause the timing functions in JS to be at least inaccurate, if not 
completely wrong.

So, I guess there are a few things I could try (not sure how to do all of 
them, though):

1. Limit the number of executions per cycle, which may compromise any 
javascript timing functions.
2. Attempt to queue javascript lines of code as they are executed.
3. Limit the javascript vm's resouces so it forcibly chokes itself out, and 
adjust this as the player upgrades himself in the game.

I'm not sure which of these are possible, if any at all.

Any insight or suggestions would be great!

Thanks,
-Alex

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to