Jump to content

Einlander

Members
  • Posts

    778
  • Joined

  • Last visited

Blog Comments posted by Einlander

  1. I'm now having second thoughts about this feature.

     

    I really need the ability to have set a model to PolyMesh collision WITH Automatic asset reload. This allows me to have a automatically up to date collision mesh when I decide to test in the middle of modeling. And sometime the Convex Decomposition doesn't do as good a job as possible. The old ability to update a model and the physics at the same time automatically was invaluable.

     

    Edit:

    You cant generate a collision shape in game above a certain polygon count.

  2. If one could ONLY dynamically load the changes this could be a lot of benefit for play testing ones designing. Imagine a sequence that needs to happen and being able to change and reset that sequence while keeping all other things equal. That could save time. It's like you're play testing and during the play test you realize something isn't right in a certain area. You tweak it, that gets reloaded, and you test it again in real-time without restarting the game and having to possibly start all over in what you need to do for that sequence. That's pretty powerful.

     

    Maybe one day... That would require complete control of the debugger. You would need to be able to reload the entity keep all the runtime variables, and throw warnings when making changes that will crash the stack. I see this in a version 5 release.

  3. I see where the confusion is.

     

    I have a class:

    class "SGUIWindow"

    That defines the window container. All gui componets have something like this.

     

    In each gui component i have a Draw method:

     

    function SGUIWindow:Draw()
    --Draw from bottom to the top
    --draw window body
    local WindowDraw = new "SGUIDraw"
    WindowDraw:PaintPolygon(self.objectshape, self.properties.x, self.properties.y, {self.properties.color.windowbody[1],self.properties.color.windowbody[2],self.properties.color.windowbody[3],self.properties.color.windowtransparancy})
    --Draw Window Contents
    --Draw Window Chrome
    end

     

    This would draw all the window itself. Instead of any of the components calling the leadwerks drawing features, It calls the class SGUIDraw.

     

    In SGUIDraw all the drawing is done. To draw a line, I would use this code

     

    function SGUIDraw:Line(x1,y1,x2,y2,ColorAsRGBATable)
    --In Leadwerks to not inturupt the set modes you need to remember it, change it, then set it back
    --This method should not cause any problems in other engines
    local TempContext = Context:GetCurrent()
    local tempblendmode = TempContext:GetBlendMode()
    local oldcolor = SGUIDraw:GetCurrentColor()
    SGUIDraw:SetColor(ColorAsRGBATable)
    TempContext:DrawLine(x1,y1,x2,y2)
    SGUIDraw:SetColor(Vec4(oldcolor.r,oldcolor.g,oldcolor.b,255)) 
    end

     

    If I were to move this to another engine that would be the only function that I would change.

     

    So to condense it all, Each gui object is a class, that has its own self draw method, which uses an abstracted drawing command, which is mapped to the engines drawing command.

  4. Can't you just call the map.load hook every entity to update an animated icon? It would be like this script http://leadwerks.wikidot.com/wiki:entityindexer but instead of indexing them you are manually drawing to the screen and syncing it. It would look jerky but you know its loading. Also if you know how many entities there are in the level ahead of time (say you wrote a loading script to count it for you and stored the info in a file) you can do a proper progress bar.

  5. Something for the you may implement in the future is a preprocessor for lua embedded in the editor. It's sole purpose would be to find all strings and see if they match with a file that exists in the project. When you export a script it will check all the strings for mdls, Tex, mats, and all other files that leadwerks natively works with. Then show a list of files that may need to be included when you export to the workshop. The user selects the files and the editor packages them.

     

    I imagine that it would be a long and hard process and would most defiantly break if a person doesn't sandbox lua, then you would need to import files and rewrite strings on the fly.

     

    I have a day off tomorrow, I'll see if I can waste a day implementing this in a programming language and wondering why it doesn't work.

  6. I'ts a zombie based game in 3 levels. You escape from a hospital and progressively get told the story by your interactions with the environment (i'm sort of cloning the answering machine mechanics from F.E.A.R.). It's supposed to be a Halloween game tournament entry but i think I was too ambitious to make that deadline.

     

    Currently i'm making all the models to make the level feel lived in.

  7. The building you see in the images is just a simple convenience store. It has the front store part, A storage/Stock room and the small room is the office. Other buildings will have different looks as long as you build the bsp tree properly. Corridors and hallways are currently just rooms where you simply don't build walls. As for windows and doors, I have yet to get that working. I have to build in a system where it recognizes outer walls and inner walls.

     

    If you look closely at the images you will notice that each room has a gap on all sides. This is to allow an outside wall to be created so you can have bricks on the outside and drywall on the inside. doorways would simply be holes in the walls and a door jamb+ door prefab would link the 2 to hide the gaps.

     

    So as to not play guessing games with entities, I will have to create yet another subsystem that will place the windows and doors on certain tiles (The buildings are made of tiles), store them in a list and apply them to the internal and external walls. The furniture and other things will follow similar rules, ie: rooms name is "Office", a desk goes in an office, on the desk will be a lamp, etc. I have a system that I created with the walls that will snap the to their cardinal direction (north, south, east, west) without rotation, that can be applied to furniture.

     

    The lights are a bit simpler. If I turn off shadows on the directional lights, I go from 20-30 fps up to a solid 60 fps, but turning off shadows isn't ideal. So I have come up with 2 Ideas, when you leave the bounding box of a building, all props inside and maybe the walls will be hidden, All buildings behind the player beyond a certain distance will also be hidden. And to take it further, as the link in this thread shows http://www.leadwerks.com/werkspace/topic/9478-ps4-infamous-game-technical-details/page__hl__infamous , In my game it is not 1 solid world, it is divided into zones. All adjacent zones will be loaded and only displayed when the player is looking in their general direction. When the player moves to a different zone, all zones (x,z) positions get shifted to the old position and the player is warped to the inverse side/side opposite.

     

    All this would keep the engine from drawing ridiculous amounts of buildings, and keeps the shadow shading low. Hopefully it will keep the fps at a bearable level. Also I manually enabled my release mode game to run with ATI crossfire (debug runs windowed, and release runs fullscreen 1080p).

     

    I had a lot of downtime at work to figure all this and write it down.

×
×
  • Create New...