Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Lost in a tropical dream landscape


Recommended Posts

Speed? Do you mean performances ? Is this the same? Well I give it a try:

 

Well the first thing I do is to start an empty map because whatever why I always got performances problems by trying to fill the map from the editor;

most of the time, while a "save" procedure, occured a crashing bug that ruined the entire work. 

Or it saved but all the paint work wouldn't be saved and - one more time - lost work.

So now i try to do everything from script.

 

The second thing was the illusion that this setting

https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_SetViewRange 

MediumViewRange  would save ressources.

Well it is true, it saves performances, but precisely a test show me that while the setting to FarViewRange was as expected  ignoring the rendering of the model, it left the shape of the model be considered and calculated. (I'm sure about this.) I found this by chance while desperating why ignored models had a performance cost...!

So 100 shaped models far away from the camera that were NOT rendered had a significant perfomance cost.

So I removed the shape and could easily put 1000 models far away from the player - the map was running well - as you expect it to run.

Then, I restore the shapes to the model with a script catching the entities near the player ... and remove the shape if they are out of range.

 

With a script calculating and placing the models in the area I want them to appear (it must be not 100% randomly), you can cover all the map (with no shapes!!)

The beautiful thing with this is that you can put a script on whatever model you want and let the player cut trees or harverst stones, all this should be no problem.

 

So to answer your question, I think removing the shape is the key for speed and smooth gameplay.

The other thing making driving quickly is the possibility of using Update(4) that Josh created in the main script, so everything goes quicker and smoother. (but no idea what exactly change this setting, it feels like the engine would ignore some details maybe in the physics, but really not sure about this)

  • Like 2
Link to post
Share on other sites

I have to add something to this. I just tested one more time, just to be sure:

> About this: "setting to FarViewRange is ignoring the rendering of the model, it left the shape of the model be considered and calculated."

It's not quite correct to say this because if you test it, you will see that a model marked as FarViewRange will be hidden on long distance and its shape too.

> But it is anyway a necessity to remove the shapes of the models to summon a scene like this, even through script.

if I let one tree shape of the 6 different shaped models used in the scene, the game runs with FPS=10 or 15 !

If I let  2 shapes and removed the 4 others of the 6 different shaped models used in this scene:

Here is what comes out: It is impossible to move anything / FPS=0 !! 

20200530215545_1.thumb.jpg.acf468337c74b155370f115c14b112c7.jpg


> You have to remove the shapes; setting the models collisiontype to Collision.None seems to be no alternativ option.

 

Link to post
Share on other sites
  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Facebook Twitter Youtube Github Steam
×
×
  • Create New...