Jump to content

Recommended Posts

Posted

The calculation to tell if an object is in view is not too hard. Transform the entity's position from world space to camera space. If the X or Y position (whichever is bigger) is greater than the Z position it's out of view. This assumes a 90 degree vertical and horizontal FOV, but it's good enough for "can the enemy see me".

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

When I use the cull commands I get a system hang when loading a new map .  If I don't initiate any culling commands it goes through with the map change.

--Map change ---------------------
    if window:KeyHit(Key.F12) then
        Time:Pause()
        System:GCSuspend()

        --Load the next map
        Clearmap()
        Loadmap(1)
        LoadPlayer()

        System:GCResume() -- !!!!!!!!!!!!!!!!!!!!!!  Hangs up right here
        Time:Resume()

    end    

Posted

Okay here's my full work around,  besides from 'having to use' the Asset.Unmanaged flag,  I've created a simple lua table to hold each and every parented entity, before calling world:Clear() I cycle through the parented list and unparent.. then call world clear..   so far no lockups or freezes or silent crashes and the mesh deformation has stopped.  Now to go back through all the code and set the parent/unparent stuff correctly so i can do away with the quick hack. :)

Scratch that,   still happening on further testing ;(

Posted

I am still trying to download the project. For some reason Amazon is running really slowly. This is very strange.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

And now it just suddenly sped up...4 minutes left...I guess they fixed whatever was wrong.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

A really good chance that when you have the following situation occur the game session randomly ( or as of late - not so randomly ) crashes without warning, error or cause. 

Create  a sphere ( or any object or pre loaded or live loaded object )

Attach anything to it via SetParent()

In my case I have a long slow traveling bullet that I attach several smoke trail emitters to as it is in flight. 

At any point if anything parented to the main parenting object is removed  :: 

                          if em.ent:GetParent() ~= nil then em.ent:SetParent(nil) end                        
                          em.ent:Release()

This is a normal call, nothing happens out of the ordinary here..  the emitter ( or whatever  is attached via code ), is removed as it should be.

The problem comes later,  it can be 5 mins or 30 mins ( or worse yet, sometimes never at all )...  but when you Release() the parent entity- be it ent:Release()  or by world:Clear()  the entire game session crashes with no errors, warning or syntax.

 

I've really found it best,   if your parenting items shorterm -, is to Hide() them instead of releasing them and just let them die with the -parent on release() or clear().  

 

Posted

I am running your project now. As soon as I kill one bad guy, the game crashes. Still investigating...

My job is to make tools you love, with the features you want, and performance you can't live without.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...