For an educational game, I'm looking for a scripting language which is cross-platform deterministic (e.g. no hardware floating point), sandboxed, and resource-limited.
The difficult part, it seems, is limiting resources in a cross-platform deterministic way. One can't simply limit processor cycles or processing time, since this can result in different limits on different platforms. The purpose isn't to limit physical resources (though that's certainly a benefit) but to give the user clearly-defined limits, and offer metrics for scoring and other game mechanics.
I'm considering designing a virtual machine where each bytecode operation carries an associated cost. This would give me fine-grained control of the details to match my needs perfectly, but sounds like a lot of work, so I'm seeking existing solutions first. So far I haven't found any existing language that will do the job.
Is there any existing language which I can adapt to my needs? What are some points to consider when designing my own language or VM? What is the must-read literature on these topics?