Search found 18 matches

by wanghongliang
Sat May 16, 2020 11:57 pm
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25164

Re: BufferPool problem

No, I am using the main thread to add to/remove from the simulation. My terrain is huge(512km x 512km) and composed of 1 million patches, and I want to move reusable trees (the total number of trees is more than 40,000,000) and their physical entities( each tree represented as a bunch of convexhulls...
by wanghongliang
Sat May 16, 2020 11:09 pm
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25164

Re: BufferPool problem

Hi,Norbo,thanks for your patience. My app needs to remove/add tons of physical entities(more than 20,000) frequently. When a thread dispatcher is used, the app sometimes endlessly freezes, sometimes crashes due to AccessViolationException. When the thread dispatcher is removed, everything works fine...
by wanghongliang
Mon May 04, 2020 8:56 am
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25164

Re: BufferPool problem

Have upgraded to Bepu 2.2. Still using DarkAllocator. Everything works fine. I think it would be convenient to implement
implicit casting between int and BodyHandle(or StaticHandle). Thanks for your assiduous work.
by wanghongliang
Sun May 03, 2020 3:00 am
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25164

Re: BufferPool problem

Thank you very much for the explanation. You deserve a microsoft MVP! :)
by wanghongliang
Sun May 03, 2020 2:01 am
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25164

Re: BufferPool problem

Yes, What I have done is evil and dangerous. But I think Bepu could be based mostly on unmanaged memory management while keeping a small number of managed objects. In doing so, Bepu should gain some performance improvements and be more deterministic. In fact, Unity Engine is encouraging developers t...
by wanghongliang
Sat May 02, 2020 10:42 pm
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25164

Re: BufferPool problem

Yes, my DarkAllocator do directly allocate a managed array type (and other class types that contain blittable structs only) into unmanaged memory to avoid garbage collection. I have extended SharpDX to implement a custom heap allocator (SharpDX.Native) that takes charge of most memory allocations of...
by wanghongliang
Sat May 02, 2020 1:27 pm
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25164

Re: BufferPool problem

It seems as if I have solved the problem. I allow Bepu to use my DarkAllocator (which is capable of allocating managed arrays of blittable types to unmanaged memory) to engage in memory management. I have added the following implementations to Bepu: public unsafe interface INativeAllocator { byte[] ...
by wanghongliang
Fri May 01, 2020 10:42 pm
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25164

Re: BufferPool problem

I try to test the PyramidDemo to locate the bug in my game app. I set MinimumBlockAllocationSize to defaut value. When I set pyramids count to 40(default value), my app works fine. If I increase pyramids up to 400, the weird thing happens as follows : when the demo is created and updated inside my g...
by wanghongliang
Thu Apr 30, 2020 2:10 am
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25164

Re: BufferPool problem

Thanks for quick reply. All demos work fine. My application involves more than 20,000 physical entities and my computer has sufficient memory(16G RAM) to run it. I implemented partially manual management in my c# app, maybe it conflicts with the Bepu memory management. I don't have a clue yet.
by wanghongliang
Thu Apr 30, 2020 12:32 am
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 25164

BufferPool problem

Hi,Norbo,thanks for your tremendous effort on the Bepu engine used in my game project that involves a lot of physical entities. Recently I upgraded the project(based on Bepu 2.0,.Net Core 3.0) to Bepu 2.1 and .Net Core 3.1, and afterwards System.ExcecutionEngineException had always been thrown whene...
by wanghongliang
Sat Dec 14, 2019 1:47 am
Forum: Questions and Help
Topic: Dinosaur behaviour problem
Replies: 5
Views: 6010

Re: Dinosaur behaviour problem

Thanks,I hope BEPU 2 will be a superstar in c# game programming world!
by wanghongliang
Sat Dec 14, 2019 12:44 am
Forum: Questions and Help
Topic: Dinosaur behaviour problem
Replies: 5
Views: 6010

Re: Dinosaur behaviour problem

Thank you, you are so warm-hearted! I will have a try according to your guidance.By the way, since .net core 3.0 is
out for a while, when would you port BEPU 2 to .net core 3.0 and improve BEPU math library by using System.Runtime.
Intrinsics API?
by wanghongliang
Fri Dec 13, 2019 11:47 pm
Forum: Questions and Help
Topic: Dinosaur behaviour problem
Replies: 5
Views: 6010

Dinosaur behaviour problem

Hi, Norbo, thanks for your amazing work on BEPU 2! I am developing a game in which many dinosaurs are wandering around,their movements are guided by A-star algorithm,and these dinosaurs can collide with each other. When no collision happens, the positions and orientations are determined by A-star al...
by wanghongliang
Sun May 05, 2019 11:16 pm
Forum: Questions and Help
Topic: Bepu 2 mesh shape causes crash!
Replies: 26
Views: 75795

Re: Bepu 2 mesh shape causes crash!

Great!
by wanghongliang
Sun May 05, 2019 10:57 pm
Forum: Questions and Help
Topic: Bepu 2 mesh shape causes crash!
Replies: 26
Views: 75795

Re: Bepu 2 mesh shape causes crash!

The code works fine now! Thanks again!

Mesh mesh = new Mesh(buffer.Slice(0,trianglesCount), BepuVector3.One, physics.BufferPool);

Maybe we can add TakeExact method to the BufferPool class so to eliminate some misunderstandings?