(May 2018) Monthly WIP & Screenshot thread

Yeah, just a visual reaction to a specific logic state, right?

Yep, it just watches for the same impact component that any damage system would.

This weekend I’m breaking out my Bullet-based ES integration into its own SiO2 sub-project. So far I have a simple demo app:

More to come.

9 Likes

Is the selection of Bullet integral to your ES integration or could other physics libraries substitute it ?

The bullet integration is the whole point of this code. Other physics libraries would follow a similar pattern but it’s all bullet-specific glue code.

Really only the handful of components are possible reusable (like Mass, Impulse, etc.)… but since bullet is float-based, I made these float based. I have similar components in my own mphys boiler plate glue code but they are all double-based.

Got a basic debug app state working… and ghost objects… but I don’t publish contacts yet so it’s not like that matters much:

Also actually checked some source code in. Still very much a work in progress.

Bullet/SiO2 integration:

Demo:

It takes some finagling to get it to compile and you have to work against snapshot versions of some other simsilica stuff… that will all be resolved when it’s done.

3 Likes

“other”… yeah. Dyn4j is 2d, so it doesn’t count.

PhyX maybe?.. :smile:

I used the same basic pattern for dyn4j in my local stuff also.

The stuff you have done so far, looks 95% like the code I have for Dyn4j, with similar entitycomponents etc :slight_smile: I guess that’s a positive thing.

I don’t know if its a great idea to mix 2D and 3D stuff like that though. I know its just a dimension off, but it sounds really lazy. One dimension is a third of the work. I’d probably go for a separate 2d implementation tbh.

Yes, but the patterns are the same… not the code.

great work @pspeed. I have a similar approach on using Zay-ES in combination with Bullet. I keep a concurrent map of EntityId and PhysicsRigidBodys, and update the position of the model (set Position component) after the physicstick.

Really looking forward to how you will handle PhysicsCharacters. :slight_smile:

Got some little dudes randomly wandering around to show my approach to controlling mobs. I’ve never really used PhysicsCharacters so I don’t know what advantage they provide. My other physics engines never had them so I got used to doing things a different way.

Here are a few little mobs randomly wandering around:

With debug view and some debris:

Next step is to hook up contact detection so that the wanderers can also do some simple object avoidance.

7 Likes

Maybe the answer will be in your next step, but how will you handle a combination of steering behaviours? Now you have a wanderdriver controlling an entity. But what if you want an entity to , for example seek a target but also flee from another target?

You’d implement a different control driver that combined steering behaviors based on some goal or whatever. That’s beyond the scope of my demo.

In case you haven’t seen it already, here’s a nice tutorial on that: Understanding Steering Behaviors Code Tutorials | Envato Tuts+

Basically, you calculate the different forces/steering mechanism and sum them up. That’s at least a basic combined steering (short-sighted).

1 Like

Yeah, I know about these series :slight_smile:

I am just wondering how you would fit this steering behaviour in an ECS. You could have a SteeringComponent with a type, like Seek or Arrival. But then you couldn’t combine these, since you can only have 1 component of a specific type. You could ofcourse have a SeekComponent and ArrivalComponent but then your system will get very complicated and messy since you would have to combine the forces of both goals.

As I understand and how I will probably implement it, is using the suggestion of @pspeed of having a control driver with the desired behaviour contained. You have for example a LocationDriver that would go to a location (seek and arrival behaviour combined) and in the meantime would also avoid objects or entities (evade behaviour). The list of entities to avoid can be set on the location driver component, but then again I don’t know if this is bad practice (I don’t like the idea of having list of entities somewhere)… still figuring stuff out :slight_smile:

This is a whole other topic probably not relevant to a WIP thread.

…I personally use a “Goal” object. The steering driver uses that goal to figure out which steering primitives to configure.

Edit: though to be honest there is a steering type as well that is what controlled adding the steering driver in the first place. And this steering type generally implies a specific stack of steering primitives… whether arriving or seeking or whatever.

This is not properly a project, but yesterday I made a talk about Shader Nodes at the Google I/O Extended 18 event organized by GDG Catania :slight_smile: Here’s a photo with all staffers, speakers and some partecipants (I’m in the background).

https://scontent-mxp1-1.xx.fbcdn.net/v/t1.0-9/32089404_1802162269826646_4594154923997790208_o.jpg?_nc_cat=0&oh=ccc5119d322973aa6a510b5c6f15e60c&oe=5B937C20

Here’s the presentation material: Speech shader nodes – Google Drive
And here’s the project I used as example: GitHub - aegroto/JMEShaderNodesExample: jME shader nodes example, made for Google I/O Extended Catania 2018

16 Likes

I think that adding more colors makes an image less boring to an eye.

17 Likes