(December 2018) Monthly WIP & Screenshot thread

Thanks for the feedback.

You can apply it any subset of bones you want, play mix and match with bind pose or AnimControl animations. I’ve tested that to some extent with Sinbad and will include it in my next video.

Plan of attack for December:

  1. dynamic feedback to maintain an upright posture
  2. directional IK to look or point at a particular location
  3. a purely programmatic bipedal walking motion

The keyboard was a gift from my sweetie. I hated it at first, but I’ve gotten used to it.

From anywhere in the house, she can tell whether I’m making good progress on coding by listening to the click rate.


Zoned physics engine is finally integrated with SimEthereal, an entity-system, etc… There are some cleanups and tweaks to do but this is a pretty huge milestone for me.

Next up with the MOSS libraries I think is to get the static object filtering working properly… then it’s on to actual mutable terrain and hooking up those events.

…which is I think the last big things before I could start working on Mythruna again if I wanted to.

Edit: note that the video is 1080p60 even if it doesn’t start that way.


Curious, what’s the elevator pitch of a zoned physics engine ?

1 Like

It can handle infinite worlds.


Ok I need to know … How did you handle the use case when an entity is transitioning from one zone to the next … effectively in between zones? I worked on zoned physics for a few weeks trying to solve that and then decided to shelf it for later. The problem I ran into is when you get fighting when the entity is hitting an object in each zone.

So, unlike SimEthereal where an object can be in multiple zones at once, in MPhys, objects can only be in one zone at a time. After all, it’s the easiest way to make sure you only integrate an object once.

In MPhys, I use the term “bin” instead of “zone” because this is separate from SimEthereal and to me a “bin” signified one bin per object better than zone did. But anyway. Bins. In a BinIndex of active bins… and each bin has a list of its active/loaded neighbors. (Bins are loaded/unloaded as needed.)

Physics generally works in phases, so in my case:

So generateContacts() is the interesting one. It goes through each active bin’s active objects and generates static and sleeping contacts against the objects in that bin and the static and inactive objects in the neighbor bins.

It does a second pass through the active bins and their active objects to generate the active -> active contacts. This also checks active objects in the neighbors (Keeping track of which bins have already been visited to avoid duplication.)

(Note: the code is available as a preview to curious Patreon donors who shoot me their github IDs.)

The whole neighbors/bin thing is the first complicated bit. Loading/unloading bins is the second complicated bit… especially for ES integration. In a normal physics engine you just tell it “Hey, here are my objects”… but with MPhys objects are loaded on demand when the bin is loaded so adding a new object is more like a notification “get the bin at this location and tell it there is this object ID”. The bin will load the object using a factory as needed.

Tricky tricky. So happy it’s all working now. This is like a 2 year project off-and-on, I guess… yeah, wow:

…and that’s not counting all of the stuff that led up to that. I mean, I had a working non-zoned physics engine for a long time. So it’s just two years of my spare time spent thinking about this and moving it along.

Edit: oh, the third tricky bit was making the collision stuff 100% pluggable. You can define any kinds of collision shapes you want… in my case one of the pluggable collision types is block objects/block world. The simple demo just has spheres and boxes.


So each Bin does not run on it’s own thread and it’s own physics loop then? Does that not defeat the whole performance improvement of multi zoned physics with a tree for each zone?

Edit: why do I feel like we are about to hijack this thread with physics talk?

Bins are not run in their own thread. The point is to handle infinite worlds where player 1 might be at 1,000,000x1,000,000 and player 2 might be at -100,000x-10,000 or whatever. Only active zones are simulated… and ultimately what I decide is active is sort of up to me. (For example, I could choose to simulate only the parts around players.)

That being said, there’s nothing from keeping a more advanced PhysicsSpace from keeping track of the islands of bins and multithreading them. I’m sure there are some challenges there but it’s not impossible.

In any case, I should think that in general all bins except the ones immediately around players are probably unloaded because they went to sleep. The engine is very aggressive about doing the minimum amount of object-work at any given time.

1 Like


  • One of the benefits you describe, is that the engine already knows which areas to simulate, given the bins ?
    • Where’ default physics engines will have to break down the physics space and figure that out themselves in every loop ?

You mentioned this being part of the MOSS libraries, are they the collection of libraries you have already opensourced, or something internal to Mythruna ?

Started experimenting with my own Adobe Illustrator -> Photoshop -> JavaFX -> Lemur pipeline to start creating a very high end GUI framework.
Layer 1


It’s not even just that. A normal physics engine has to know about all of the objects even if it’s not going to simulate them. ie: those objects are in memory. For an infinite world, that could be an infinite number of objects. Just think in a single town of all of the doors, tables, chairs, book cases, etc. that are sitting there taking up RAM when nothing is going to hit them. So it’s not just about culling collision detection or integration… it’s about completely unloading sections of the world based on a grid.

MOSS = “Mythruna Open Source Software”… so this is all prepped to be open sourced some day. So far these parts are 100% ‘open source’ in that context. I haven’t started on any Mythruna-specific stuff yet.

Is this (zoned physics) already in SimEthereal or Si02 or some other place ?

Zoned physics is in a private repo at the moment until I get it more into a “done” state.

I offered an early look to my patreon patrons but so far only two have taken me up on that.

It’s nice right now because everything is in one big gradle tree and I don’t have to gradle install all of the time. :slight_smile: I can just “gradle run” the demos and go… proper changes will be recompiled. When I publish “for real”, I will split it up a bit and no longer that that nice single build. So partly it’s make sure the API won’t change too much after I release and partly it’s convenience as I develop the other layers.

Looking forward to it. I’ll probably try to implement it in my sim-eth-es adaptation

Hellow! So I haven’t shared much here in a while cause I had kinda stop coding video game. Now a friend of mine decided we should participate at the local game Jam so we made a 2D game, and I fall back in love with libGDX (cause it felt so good to code in java something else than boring big IT company stuff)

Its real early stuff, but i fell like the basics are pretty solide

So ya, i hope its appropriate to share it here :smiley: Enjoy !

Video :

Game :


Cool but where’s the jme? :sob:

I know :sweat_smile: But 3D is so much harrrdddeerrrr :scream: I don’t really don’t mind tho, but those silly artist do x)

You know what, i have a gameJam project made with JME somewhere in my computer basement, i might as well do a video of that x)

Looking at everyones amazing work with open mouth. I’m just happy with my very little steps in CarGame. Added working headlights to red car yet only and new window opens when you are going to buy a car with information about its price - thank you for Lemur, it’s so easy :slight_smile:


So I actually published something… nothing compared to the work you all are doing here but it’s something. basically I am going to do the full list of games from in the blog post i-need-practice-programming-49-ideas-for-game-clones-to-code.


Actually to think of it you all might be interested in this because its on android and the icon and launcher and itch.io page I created for this project are all very close to home :chimpanzee_cool: