Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very impressive #11

Open
Doidel opened this issue May 23, 2014 · 10 comments
Open

Very impressive #11

Doidel opened this issue May 23, 2014 · 10 comments

Comments

@Doidel
Copy link

Doidel commented May 23, 2014

I just showed your project there to some folks on #three.js IRC. We're all very impressed :) Keep up the good work!

It lags for everyone so in the multiplayer version you'd probably have to use a second node process, or maybe even communicate with a running C++ instance directly. But if you could have that pathfinding on a second core and the game on another this might become very well the future for node.js games! (I'd definitely use it myself, that's for sure ^^)

So, again, great work, I hope this project will be continued!

@Doidel
Copy link
Author

Doidel commented May 23, 2014

Another further idea would be to use triangulation to boost the speed by lowering the amount of meshes for the navmesh. See https://code.google.com/p/polypartition/ there you can find a ton of triangulation approaches.

@vincent
Copy link
Owner

vincent commented May 23, 2014

Hi @Doidel

Thank you for the kind words :-)
I'm still working on it, a bit more rarely these days, but I still love it and I hope it'll become mature some day.
Almost all my efforts are for improving the performances, mainly in the crowd navigation mesh and in characters animations, and it's kind of depressing sometimes :-)

I also tried to use the recent works around bones animation (see mrdoob/three.js#4029). It's kind of working but not very smooth.

I'll have a look at the triangulation stuff, I'm sure there is plenty of improvement to do about this, even if Recast already handles an impressive number of use cases, and is very satisfying for a someone not very good at maths like me :-)

About the nodejs stuff. Well, there's nothing really server- nor nodejs-related for now, it's only in the browser, and the pathfinding stuff runs in a Web Worker, so I'm not sure I understood what you mean. Anyway I do want to implement a server side, maybe with some folks' (https://github.com/momow/karmaracer) help.

Feel free to add any improvement ideas !

Cheers !

@Doidel
Copy link
Author

Doidel commented May 27, 2014

Good to hear!

I was just mentioning for a maybe-to-be-in-the-future server version for pathfinding ^^

Hmm karmaracer doesn't seem to be using recast / detour, do they?
I want to code some bot for my game too but I'm still thinking about whether using recast/detour is a good approach. But it probably is because its output quality is way above anything I'd achieve on my own. It will just take quite a while to make it work with my game ^^

@vincent
Copy link
Owner

vincent commented May 27, 2014

No, karmaracer doesn't, but it has a good server - client synchronized flow structure.

I'll say Recast is a very good library, and it's very active.The main issue is, indeed, to configure it properly and to know when to override the library's agents movements with your custom logic.
For example, you can see in my simple cases that agents tend to "slide" around their destination and that still need to be fixed.

I think of splitting the Recast javascript port to a standalone package. Do you think it could worth it ?

@Doidel
Copy link
Author

Doidel commented May 27, 2014

I see. I guess I'll have to mess with that too then.

Definitely, although then I'd really make sure that it's also usable on node. With that you'd reach a much larger target audience. All the guys who want to make their game multiplayer and use node (which is probably the majority ^^)

@vincent
Copy link
Owner

vincent commented May 27, 2014

Yes, very likely :)
Be sure to check which parameters you'll need to change here
http://digestingduck.blogspot.fr/2009/08/recast-settings-uncovered.html

Yep, I'm a nodejs user myself so I'll do my best to make it work in node environment.
But note that the final stack (c++ => emscripten => browser/node) is quite messy anyway (even if emscripten is supposed to work correctly in node)

@Doidel
Copy link
Author

Doidel commented May 27, 2014

Hmm yeah I just figured that pushing my three.js objects on node over to C++ is just as messy as translating the library (like, say, serializing the objects and the scene so that recast/detour can work with it. And doing that all the time and every time something changes). But it might be more performant, depending on that serializing.
Hmm nah you'd have to exchange positions all the time with e.g. the physics engine. And if serializing would be part of this exchange process then that would probably outweigh the performance gain from using C++... shrug

@Doidel
Copy link
Author

Doidel commented May 28, 2014

Here's a quite mature library with which you can parallelize pathfinding for both the server and client at once: https://github.com/adambom/parallel.js. That way you just have to code it once, and you can still pass messages between the threads/processes. Might be worth considering shrug

@vincent
Copy link
Owner

vincent commented Jun 11, 2014

Hi @Doidel
I managed to extract the navigation (emscripten) stuff in its own project https://github.com/vincent/recast.js

As it is, it works in the browser (with and without web worker),
but works only without worker in node with this library I tried https://github.com/audreyt/node-webworker-threads

I'll have a look at the one you pointed me so maybe I can make it work in a parallel thread in node.

@Doidel
Copy link
Author

Doidel commented Jun 16, 2014

Hah great news!
I'd love to tinker with it too ^^ But this and the next week it's rather unlikely...
Keep it up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants