Jump to content

Einlander

Members
  • Posts

    778
  • Joined

  • Last visited

Posts posted by Einlander

  1. Does thus all have to be automatic? Do the scripts have to be able to detect another scripts presence is, does the collision script need to find the text script? Or do you want to be able use the editor to attach the scripts together? Or do you want to use the flow graph? There are at least 3 different ways to pass values to other scripts.EDIT:On my phone so didn't see the second page, ignore the above text if you want. I'll give it a try when I get home in a few hours.

  2. Lol, totally forgot that was playing Aggor, its an old time radio mystery show, Nero Wolfe.

     

    Josh that brings up another issue, my performance in leadwerks has dropped drastically since the last few updates. Also on my new graphics card its astonishingly slow. From 60 -150 on an hd7770 to 20 -58 with an r7 260x. This weekend I will check to see if my old card still outperform my new ones.

  3. I changed from dual 7770s to dual r7 260x's and my gfx performance has suffered in leadwerks. Its fine everywhere else. Also leadwerks will tend to stutter when a light goes into the view frustum, whether or not you see it. So I can make a room of lights and be a distance from it and not looking at it. When I turn around and look at the lights, I ca see in the debug screen that the lights are then being loaded for the first time. Over the next few months I think there will be some optimizations as the feature set gets finalized.

    • Upvote 1
  4. Think demoscene Yougroove. They are using the engine to at runtime, generate the textures. There would be no texture files to load because it would be generated on the fly. It would save space on a players hdd and and band with for the developer because the texture only exists as instructions. It is completely possible for people who are familiar with image processing to do this now in leadwerks now with the Textures class.

  5. You could always compile the lua code to byte code. Also you can have the password in a dll/lib and use luajit to load it. There are ways to obfuscate code in lua. It will stop the casual hacker. A determined hacker will get regardless. Plus it gives people a simple way to distribute dlc/download packs outside of steam, Ie:desura and distribute a key for the zip.

  6. The script you have, when a collision enters,exits and stays it reports an event happens. By indiscriminately I mean that it doesn't take account of which entity entered, or which entity exited. With that script, it doesn't say which entity entered, or which exited. I want the collision script to be able to affect other entities. For example, When an entity enters, set its gravity state off, then when it leaves turn it back on. That script will only know its holding something, not what or how many.

     

    Don't worry, I wrote this post after spending an all nighter. I'm writing this post while at work as fast as possible, so I dont know if I'm communicating my idea properly.

  7. Can a mod move this to the programming section?

     

     

    Is there a way to progamatically get a list of entities that are currently colliding with an object? I would like to be able to get a a list of all the unique entities in a collision trigger then compare it later. For example, a person walks into a room, then leaves. I want to be able to detect when a person leaves the area.

     

    I have been partially able to solve some of my needs.

     

    --[[
    This script will make any entity act as a collision trigger. It works best when you set the
    entity's collision type to "Trigger". This will continuously detect collisions without causing
    any physical reaction.
    --This Has been modified to behave more like the Source Engine/Unity Collision Triggers
    ]]--
    function Script:Start()
    --Create a table to keep track of all entitys that are interacting with the collision trigger
    self.CollisionEntites = {}
    end
    function Script:Collision(entity, position, normal, speed)
    --[[
    We are going to keep track of 3 things:
    [Done] When an entity ENTERS the collision trigger
    [Done] When an entity is IN the collision trigger
    [] When an entity EXITS the collision trigger
    ]]--
    --When an entity ENTERS the collision trigger
    if (self.CollisionEntites[entity] )== nil then -- Check table, is the entity already in it?
    -- No?
    --check if its in the list
    local matchfound = false
    if matchfound == false then
    for itemnum,value in ipairs(self.CollisionEntites) do
     if entity == value then
     matchfound=true
     end
    end
    table.insert(self.CollisionEntites,entity) --add entity to list of objects currenty in the collision trigger
    if matchfound == false then
     self:CollisionOnEnter(entity, position, normal, speed) -- Raise CollisionOnEnter event
    end
    end
    -- yes? Call the CollisionOnStay Event
    self:CollisionOnStay(entity, position, normal, speed)	
    end
    end
    function Script:CollisionOnEnter(entity, position, normal, speed)
    self.component:CallOutputs("CollisionOnEnter")
    end
    function Script:CollisionOnStay(entity, position, normal, speed)
    self.component:CallOutputs("CollisionOnStay")
    end
    

     

    I can tell when an entity enters, and stays inside. But not when it leaves.

  8. My question is why so many polygons? The picture of the building with the fire escape has 11k tris, and your scenes are rendering in excess of 40k polys, and if you used 3dcoat which likes to turn everything to quads, it reveals your models are pushing almost double to triple the polycount reported by leadwerks.

     

    In that one scene of yours, you can fit 4 of those ENTIRE buildings or 1 20 story building with polygons to spare.

     

    Now we can do 2 things, 1 would be to lower the poly count, or 2 aggressive occlusion culling. There is no reason to be pushing that many polygons for 2 buildings.

  9. I have a model that has multiple parts to it. In the model editor I drag a material to model to apply the material, but there are some parts that I can not apply the material to no matter how close I zoom in.

     

    my request is to also be able to drag the material onto the name of the object to apply it.

    • Upvote 1
×
×
  • Create New...