Hi,

Thanks for your answers Ludovic and Clinton.


> An alternative approach could use a thread per script.

By the way, I have a question about threads: is there a way to kill a
running thread? For example when the current game screen changes, all
current scripts are terminated. Or does this need to be implemented
manually?


> > Yeah, I was trying to avoid introducing threads in the engine :)
> > But it sounds like the only usable solution as of now.
> 
> It's actually not silly now that we've entered the multicore era.

That's a pro, but there are cons too :/
- this kind of game engine has hardly anything runnable in parallel
- all the game globals need to be properly mutex'd
- or threads executions need to be serialized which defeats the point
Another pro though is that all of us masochists love debugging
multithread programs ;)


I'll try these solutions with my toy project and see how they fair
with performances/complexity :)

Thanks,

-- 
Sylvain


Reply via email to