@Paks RE mojo3d

About Monkey 2 Forums Monkey 2 Projects @Paks RE mojo3d

This topic contains 4 replies, has 3 voices, and was last updated by  Pakz 9 months, 1 week ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #9273


    Hi Paks. Just been looking at your mojo3d codes:


    First. It’s a brilliant concept and I really like the direction.


    FPS is terrible at constant 19-20FPS. I have a feeling that this is directly down to how mojo3d deals with the new meshes.

    Anyone shed some light on this?

    I should add the machine being tested is high-end macOS machine and should have no issues



    I’m guessing it has to do with the quantity of models in the scene. (I suspect Mojo3D is not fully optimized for higher numbers of models yet).

    Whenever a model is created it is added to the scene. You have to “hide” it to remove it from the Scene’s Models stack and then “show” it to add it back onto the stack.

    I have coded a retro-style dungeon test where the levels are made out of a grid of cubes (I tried Pakz’ approach by generating meshes but could not get the texturing working correctly – it was using an earlier version of mojo3d).

    To get 60fps I have to maintain a visible models stack which calculates the visible models based on the camera’s grid location and how many cells are visible around it. When the camera moves into a new cell all currently visible wall/floor/ceiling models are hidden and the newly visible ones are recalculated and shown. The “pop-in” effect is hidden by a black fog at the relevant distance.

    I was directly manipulating the Scene’s Models stack but I believe Mark posted recently that we should not do that because it’s an “internal” property. You should use a model’s/entity’s Hide() and Show() methods.

    I can post a code example in another thread if you’re interested…



    Yeah, I have been looking at the performance. I remember a post from someone on the b3d forum that his rig could handle a million? Cubes. I have had problems getting a low amount at a good fps.

    In b3d you could also merge meshes that would speed everything up. In mojo3d I noticed a addmesh command but have not been able to figure out how to use it.

    The mojo terrains do seem to have a good fps with lots of triangles so I am slowly looking at this. Mark posted the name of the code in the modules. I have started looking at learning how to create meshes and the performance there.

    I do hope there is some kind of optimalization in the future in mojo3d or maybe a bag of tricks and tips in code posted here and there. My thoughts the last few days were that I am a little bit dissapointed in the computer hardware technology improvements the last 20 years or so.

    Ps – i noticed that if you run a mojo3d app it does not use the gpu as default. This might also improve things.



    Is it me or did the speed improve with the last update?



    I just did another test with the “example rooms optimized” code and with the previous version of monkey (6) it runs at 16 fps and with the new monkey version (7) it runs at 60 fps.

    It seems there has been several great improvements in the latest monkey update…

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

You must be logged in to reply to this topic.