Monkey2 blog posts: Behaviours

About Monkey 2 Forums Monkey 2 Projects Monkey2 blog posts: Behaviours

Tagged: , , , , , , , , , , , , ,

This topic contains 10 replies, has 5 voices, and was last updated by  DruggedBunny 1 month ago.

Viewing 11 posts - 1 through 11 (of 11 total)

  • Author


  • #15678



    Hi all, I decided to turn my latest demo into a blog post — my first since 2012!

    Monkeying Around with mojo3d: arcade plane physics

    It’s the first part in explaining how this simple demo works:

    No idea who it’s aimed at — definitely not beginners! — but attempts to sum up some basics of working with physics in mojo3d.

    I’ll (hopefully) follow it up with an explanation of the remaining aspects in the near future!




    Cool. Nicely formatted with very good explanations and information.






    Just done a follow-up to try and explain how mojo3d Behaviours work, as well as how to apply forces/torques and impulses:

    Monkeying Around with mojo3d: physics behaviours




    That’s a great hands on intro to Mojo3D. Can we get it pinned, or linked to somewhere in the main website?




    I really like your style of writing. I was wanting to mess around with mojo3d for a while but this introduction definitely helped me to get set on the right path.




    Nice to hear! I’ll try do a few more over the next few days/week anyway…

    Thanks for the comments!




    Just added a new post:

    Monkeying Around with mojo3d: wrapping physics behaviours

    This one’s a little technical, and possibly not a lot of fun, relating more to improving the layout of the code.

    The next one should be more enjoyable… hopefully later in the week!




    Really nice, @druggedbunny! ?




    Hi all,

    I’ve finally published my latest article!

    Monkeying Around with mojo3d: more Behaviours… with bullets!

    This one simply adds bullets and ground markers, along with a bunch of tweaks to improve the plane’s control, and you can try it in-browser here:

    Island WebGL Demo

    It’s quite in-depth, so I think you would definitely need to be reading along with the source code in order to make sense of it!

    The last post in the series will be to address how the markers work, as these are interesting simply for how they allow management of non-physics entities in the scene.

    After that, I’ll probably go back to basics and do a simple intro to mojo3d, as there has been a fair bit of interest lately. (Relatively speaking!)




    Following on from the above, I’ve posted the final piece of the puzzle. (For now!)

    Monkeying Around with mojo3d: Behaviours for simple entity management

    This covers the creation of the little white ground markers, showing how Behaviours can be used to manage lots of objects, including those without any physics components, without the need to manually manage lists of entities. You simply place the Behaviour-ised entity in the scene and leave it to update itself.

    (Scene.Update, in the main OnRender loop, will call Behaviour.OnUpdate for all entities with behaviours attached.)

    Note that there are no manual references kept to the markers whatsoever — markers are created by BulletBehaviour upon impact with the ground, then… that’s it!

    In this case, the marker behaviour records the time it’s created, and on each call to Scene.Update, checks if it’s existed for longer than a second. If it has, it deletes itself from the scene.

    I’ll try get around to doing some basic mojo3d intro posts in the near-ish future…

    Try the demo in the post above if you haven’t already!




    Added ‘finished’ code, with minor tweaks, to GitHub.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.