Home / Crowd simulation EMSCRIPTEN JS /

For the short story , I'm really interested about 'IA' for games, so I'm familiar with IA concepts and in this case about 'collision avoidance'. So here is a demo of a cool algorithm (first write in c++ by University of North Carolina, RVO [/size]) managing IA agents (multiple characters moving with a kind of IA), converted to JS with Emscripten to reach typescript/JS.

One year ago, I made a try to convert this algorithm from c++ to pure typescript/js, but with bad performances (I made a post in this forum).

I talked with @lo.th #oimo.js 's guy ; and he said me : do you know Emscripten. This can compiled c++ to Js with high end perfs. So I made a try, and that 's right perfs are really good compared to my first typescript/js port ! I have already worked with this kind of library with alchemy/Flascc from Adobe, converting c++ to as3(rip).
Few words about Emscripten ( http://kripken.github.io/emscripten-site/ ). It 's a really cool open source project.. You can read that on their homepage : « Emscripten is an LLVM-based project that compiles C and C++ into highly-optimizable JavaScript in asm.js format. This lets you run C and C++ on the web at near-native speed, without plugins. ». You can read that on their homepage.

So here is a really alpha preview, the demo counts 11 differents scenes. For each I try to explain what's the purpose (black div on the left).

If you want to play with agents, selecting, moving, changing goals, it's in the last case, scene 11.


Tags : EMSCRIPTEN BABYLONJS TYPESCRIPT CROWD SIMULATION