Jump to content
Core

Resource heavy door

Recommended Posts

I'm currently testing doors with default script, but it raised some questions. When I open or close door, my computers stutters very badly, like it is a heavy operation. Also, sometimes my door opens, but won't close again. When using double doors, very often other or both of of them jam after open and close cycle.

 

I have played with door masses, speeds etc. and seems that with slow speeds jamming is more common... I have tried just door, with nothing touching it and it still stutters. I tried door tutorial and there doors worked like they should, no stuttering. But I cannot imagine that my testmap is allready too heavy for my computer, even if I'm using primitives pretty uneconomically (faces there where player will never see)

Share this post


Link to post

I tested performance with lots of AI enemies and some shaders and everything runs smooth. Something is wrong with doors...

 

VJNwfMa.jpg

Share this post


Link to post

Post the map? It could be possible that the door is causing a lot of shadows to be re-rendered when it moves, but monsters running around would do the same thing.

Share this post


Link to post

Yes! You were right, it was those shadows. If I disable cast shadows from the door, it works smooth. I need to be more careful with light sources. But weird that all those creatures were not so heavy!

Share this post


Link to post

Ok, back to door problem... So how do I share my map?

Edit. I mean, if I attach just mapfile here, will that do?

 

I don't know what is going on... Glitch feels so random, usually door opens and closes, but may not work after that. Sometimes, if my character is colliding with the jammed door while it should be opening, it unlocks jam. Sometimes all doors work, no matter how I abuse them...

Share this post


Link to post

Ok, still fighting with this problem. I once had all my five doors on my map working with manual controlling, looks like moving and rotating them fixed them(?!). Then I decided to try attach button to one of them. Button worked, but then, door was jamming again. Then I reloaded new door. put it in the scene without walls surrounding it and tried it with stock settings. It was working. Then I moved it in to it's place. Still working. Scaled it, rotated it, still working. Attached it to a button, working.

 

Then I reversed it's movement and it started jamming.

 

Now I have a door that seems to be working. If I set negative "Distance" value to reverse movement (in my case -2.0 on first Distance box in Script properties), it jams on the second open/close try usually. Using positive Distance value seems to be working. But this is strange, I have currently other working manual controlled doors on my map with negative distance value (the ones that I earlier just moved around and they started working).

 

This puzzles me beyond belief and being noob with Leadwerks and lua does not help a bit.

Share this post


Link to post

I guess no one else is experiencing this doorproblem, so it must be something I have created by my self. Can I screw up original assets from the leadwerks dir by accident? So when ever I start new project, it copies possibly faulty assets to the new project aswell?

Share this post


Link to post

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.

×
×
  • Create New...