Jump to content

Einlander

Members
  • Posts

    778
  • Joined

  • Last visited

Posts posted by Einlander

  1. If we were to use the Hinge and ball joints on an actual model, wouldn't we need to programatically rig the the mesh to work with it? How would one even begin to do that in lua?

  2. I want to be able to change the resolution of the game while I debug it. I have a very inelegant solution where I set the old window to nil and create a new window and get it's context.

     

    What I came up with:

     

    function App:Start()
       self.Fullscreen = false
    end
    
    function App:Loop()
       if (self.window:KeyDown(Key.F8)) and (self.Fullscreen == false) then
           self.window:Hide()
           self.window=Window:Create(self.title, 0, 0, 1920, 1080, Window.FullScreen)
           self.context=Context:Create(self.window,0)
           self.context:SetColor(0,0,0)
           self.context:Clear()
           self.context:Sync()
           self.context:SetColor(1,1,1)
           self.Fullscreen = true
       end
    end
    

    *add the code in the right functions

     

    This will switch the window fullscreen, but the old window is still lurking about. Is there a way to close the window or would I need to make a topic in the suggestions sub forum?

     

    Bonus: My setup for debug and relase

     

    function App:Start()
       --Create a window
       if DEBUG then
           self.window=Window:Create(self.title)
       else
           self.window=Window:Create(self.title, 0, 0, 1920, 1080, Window.FullScreen)
       end
    end
    
    function App:Loop()
       self.context:SetBlendMode(Blend.Alpha)
       if DEBUG then
           self.context:SetColor(1,0,0,1)
           self.context:DrawText("Debug Mode",2,2)
           self.context:SetColor(1,1,1,1)
           self.context:DrawStats(2,22)
           self.context:SetBlendMode(Blend.Solid)
       else
           self.context:SetColor(1,1,1,1)
           self.context:DrawText("FPS: "..Math:Round(Time:UPS()),2,2)
           self.context:SetBlendMode(Blend.Solid)
       end
       --Refresh the screen
       if DEBUG then
           self.context:Sync(false)
       else
           self.context:Sync(true)
       end
    end
    

     

    *add the code in the right functions

     

    This one runs debug in a window and release fullscreen

  3. Finally had some time to take a look at my map. Added

    self.world:SetLightQuality(2)
    

    to app.lua and things look a lot better. I guess I can remedy some of the small areas by breaking up long corridors, or scripting the light to turn off when they reach a certain area.

  4. wu= World Unit. The actual world size of a editor measurement. Grid unit is the grid based measurement of an object . But I assume Leadwerks uses 1grid unit = 1 meter? I tend to use alot of hammer / source engine terms since I've mad server mods for some games.EDIT:Got some turns swapped around, Fixed.

  5. It was an April fools joke? Why not make it for real, or make an impromptu Leadwerks game dev jam where people make their own version of Darkness awaits? You just need to set a timeline and foals and objectives that must be in the game. It would allow new Leadwerks users to see how everyone can have the same idea and follow through differently to get a different outcome.

  6. I understand the wall thickness, but when you use a csg to create a building walls that approach 1wu starts to get huge unless we are scalling everything in the world up. This scene I can get away with vastly thicker walls, but I have a building that is made up of brick that needs to be the depth of a read brick. Are the World:SetLightQuality, and DirectionalLight->shadowstagerange[3] exposed to lua?

  7. I would assume that leadwerks 2 was based on the same blitzmax tools, and it had plugins. So I would assume 3.x can support plugins eventually. Also you can't simply drop a plugin API, you need a stable code base that isn't prone to drastic changes, a predictable way for a UI to interface with the editor and a way to load into the game engine. Then it will need to be documented, and bug tested. I would start requesting a plugin API after all Kickstarter goals have been met and are stable.

     

    If you absolutely want some plugins now, get leadwerks standard edition and use that to interface with your map, or create models or materials that can be imported in real time to your map.

  8. For those still curious here is a smaller version of my map. If you do what I did in the video you should be able to replicate what I did. This time I was able to get it to happen at 200+fps.

     

    !!!!NOTE!!!! (wheres a blink tag when you need it?)

     

    Unzip the file in the root directory of a new project.

    • The fpsplayer is the keyhost version from the download section
    • The blue box is a ladder. W to go up, S to go down. Its very glitchy. If someone can make it work like the l4d2/counter-strike ones I would appreciate it.

    Slow Occlusion.zip

×
×
  • Create New...