Jump to content

Alienhead

Developers
  • Posts

    602
  • Joined

Everything posted by Alienhead

  1. Yes. Posted Monday at 12:48 PM .....
  2. Script: General. Deletion code starts at line 20 ( garbage collection ). Thanks for having a look though !
  3. 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().
  4. I got it working finally. I've got about 40 of them lil' skele's on screen now, with shadow. Now! back to game dev
  5. 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 ;(
  6. I found a fix, not sure how efficient it is but I added the Asset.Unmanaged flag to the load command and it stopped the corruption.
  7. Sent, press f12 to reload the map during gameplay.
  8. I've been using this model since I first got LE for all types of tests, I've never seen it do this before. This is shortly after world:Clear() with no gcsuspend applied.
  9. 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
  10. I've been combing the api docs, but haven't found a way to determine if an entity is in view or not, either by off-screen or blocked by another object. I suppose a raycast from the camera to the entity would help with the blocked views but as far as the OnScreen or InView determinations?
  11. Sounds like you have given this some tremendous thought. I for one, love the idea. Any plans for long term support on LE or is that pretty much done with? How portable will LE projects be to the Ultra Engine ?
  12. Well the code base is rather large and as I stated earlier I had no idea where the problem was even occurring from. But good news! The only new media I added to the project this week was a skybox skin, I quickly pulled it out of the project and haven't see the error since. I do appreciate your willingness to help however.
  13. Moving my entire main logic loop over to c++, I've stumbled upon this little error I've not seen before - mind you it's not crippling the game flow at all but I just hate seeing red in the console widow. Error states : Error: Texture can't be reloaded because it is currently bound to a buffer. As I mentioned, it's not causing any problems as far as I can tell with the game flow, no crashes or anything.. Just puzzles me because I want to fix it but I have little to nothing to go on.
  14. I do however have one question that has arose since restructuring has been done - I have several prefabs that work on timers. They eventually Release() themselves once their lifespan has expired. Question being, how would one go about pre-loading these type of prefabs for later Instancing:: in code ? The only thing I have come up with so far would be to set the prefab script to inactive on cache-load, then when making instances of the prefab in real-time turn the instance copy to active. Not sure this would work however and it'll be a major overall to even test it out. Here's a example; this is a prefab consisting of a model and a script : function Script:Start() self.size = 80 self.active = false end function Script:UpdatePhysics() if self.active == true then self.size = self.size - 10 self.entity:SetScale(self.size, self.size, self.size) if self.size < 0 then self.entity:Release() ; end end end I turn the script off by setting self.active to false. Now I can load this prefab and hide it for later Instancing. Question being is once I instance this prefab and pop it into game play, how would I set the self.active to true from the calling function that originally creates the instance copy ... To further explain . flash= Prefab:Load("Prefabs/Effects/sprite_muzzleflash.pfb") -- this is called in my pre-mapload , it is the main copy I will instance off of. now later down the line in real time .... I may call this in some function - trail = tolua.cast(flash:Instance(),"Entity") Now since I have the active set to false in the main prefab, I need to set the active variable to true in the instanced version so it can do it's thing. How would I set a variable in that script from outside of that script ?
  15. After following up on your advice, I restructured most my infrastructure to reuse the same prefabs/emitters etc.. Not only have I noticed a nice 20% increase in framerates and overall game smoothness - but I am no longer randomly crashing everywhere either. As far as the other error/warnings I was getting :: Possible reference count error for asset ::, this was directly caused by creating a CacheWorld() I was using. I created a seperate world on game startup : cache=World:Create() World:SetCurrent(cache) Then I loaded up tons of models I was using throughout all my maps. ( to keep them in memory for faster duplicating in the main code ). But somewhere over the development-span of this project the ref numbers got thrown off, once I restructured my main code to handle it's own caching and instancing I no longer needed 'cacheworld' so I ripped it out... Lo and behold - my assert warnings and errors vanished. So all is good in toon-land again, the show must go on !
  16. --------------------------------------------------------------------------------------------------------------- function Monitor_Muzzleflashes() -- iterate: for i, m in pairs(mf) do if m.size <0 then m.enti:Release() m=nil table.remove( mf, i ) return end m.size = m.size - 10 m.enti:SetScale(m.size, m.size, m.size) end I've spent the last 3 hours moving my muzzle effects out of code an into a prefab'ed-scripted pivot created in the editor. It serves the exact same purpose but only no freeze up or shutdowns when I run it.
  17. Something new - Possible reference count error for asset "c:/__ukr/materials/effects/default.mat" I havent done any manual reference asserting, not sure why this even came up. Haven't even used this mat, unless the engine loads it for some other purposes.
  18. Never had a problem removing while looping, it's continuing to the next entry anyways.. Just to test it I removed the : if m.size <0 then m.ent:Release() m=nil table.remove( mf, i ) end from the function and it still randomly crashes. It seems to happen mostly after a physic collision detection.
  19. I've got a strange thing happening, here's the code : -- iterate: for i, m in pairs(mf) do m.size = m.size - 5 m.ent:SetScale(m.size, m.size, m.size) if m.size <0 then m.ent:Release() m=nil table.remove( mf, i ) end end At random times, no reason whatsoever, this line m.ent:SetScale(m.size, m.size, m.size) will crash me to desktop ( no errors or anything in the debugger as far as errors or warnings), I've rem'd it out and no crashes, I then replaced the line with m.ent:Point(camera) and at random times for no reason it crashes the same way. The entity is not being touched anywhere else whatsoever. It's really been bothering me for a few days now. Not so SILIENT afterall.. Change the order of the function up a little bit and was able to get this in debug mode - "Asset map value is different" OK.. now.. WtF is that ? lol.
  20. Alienhead

    Grimlight

    Way cool looking decaying monster thingy there.
×
×
  • Create New...