Very basic mojo3d application/template

About Monkey 2 Forums Monkey 2 Code Library Very basic mojo3d application/template

This topic contains 3 replies, has 2 voices, and was last updated by  DruggedBunny 11 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #9453



    Minimal mojo3d example. Just shows minimal setup needed, with an example cube and basic camera movement — use cursors plus A & Z.

    I think you definitely need to have your own template for mojo3d, as the app setup is a LOT more complicated than Blitz3D. (Which was, er, Graphics3D 640, 480!)

    However, once set up, it should be just as easy to use for simple messing about.



    … and a stripped-down version without the demo cube or camera controls. Shows nothing, just ready for you to take over! [Updated]



    At this point I will add (if and when I have time!) some Blitz3d equivalent ‘command’ like

    EntityPosition entity,x,y,z
    EntityRotate entity,x,y,z

    where (at least for Rotate) x,y,z are internally converted using Degrees(x)

    ps: never touched at the moment, I dont’ know if ‘entity’ can be any thing (like Light, Camera, Mesh etc)



    Been having a bit of fun with this. Add/remove 100 cubes at a time via plus and minus keys:

    I notice that it gets slow very quickly (like, around 1,000 cubes), but I think it’s at least partly because mojo3d isn’t doing visibility culling yet — a 10,000-cube demo in Blitz3D runs very well when the camera is in the middle of the cube ‘cloud’, but slows down as you back out to view more, while similar numbers cripple mojo3d at the moment, regardless of how many are in view!

    Here it is online via Emscripten — works for me in Firefox and Opera; Vivaldi didn’t like it and I don’t have any other up-to-date browsers installed!

    Click within the canvas and hit + to get started!

    Oh, and I LOVE that this worked for removing cubes from the stack and the scene!

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

You must be logged in to reply to this topic.