Very basic mojo3d application/template

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

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

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

    DruggedBunny
    Participant

    [Updated]

    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.

    #9454

    DruggedBunny
    Participant

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

    #9460

    degac
    Participant

    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)

    #9643

    DruggedBunny
    Participant

    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!

    http://www.hi-toro.com/temp/mx2/Incube.html

    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.