Jump to content

Haydenmango

Members
  • Posts

    434
  • Joined

  • Last visited

Posts posted by Haydenmango

  1. Here are the settings for fog. I found them on the workshop under the post process shaders pack.

    50_fog

    camera:SetKeyValue("fog_fogrange","0,1000")

    camera:SetKeyValue("fog_fogcolor","0.72,0.73,0.67,1.0")

    camera:SetKeyValue("fog_fogangle","5,21")

  2. So I was getting Failed To Set Clipmap Color Texture again this morning (after updating my project) and decided to make a bug report video to show what is going on.

    When I was making the video I started getting Failed To Set Shadowmap Texture instead of Failed To Set Clipmap Color Texture. It seems the issues are related. Also while it isn't always the same message I do get an error every time I attempt to open my HuntForFood.map specifically.

     

    I am using Leadwerks Indie Edition (beta) and can provide my project/map if needed.

     

    Video link- https://www.youtube.com/watch?v=nRSJ1unc-K4&feature=youtu.be

     

    edit-- So after trying to open my map a couple more times it finally opened. Now it opens every time I try to open it without any issues.... weird.

     

    another edit-- The other error message I am getting is actually Failed To Set Clipmap Color Texture not Failed To Set Clipmap Texture. I edited my post to fit that change.

  3. When using leadwerks editor and playing my game fullscreen I get GL memory - total:1024mb, usage:660 .

    With just the editor open I get GL memory - total:1024mb, usage:313 .

    GPU usage % never goes above 80%

     

    What happens when you restart your computer? Does the map work for a while, then start having errors after you've been reloading it for a while?

    When I restart my computer everything seems fine. The terrain textures (other than the first layer) still aren't rendering but other than that everything seems to work. If I was to use the editor for a while I believe I would start getting these errors again.

  4. I am getting the same errors that I posted about before, with some new errors as well this time.

     

    I have been using the editor all day and these bugs have gotten progressively worse as I have added more entities to my map.

    First I got Exception Access Error when I tried to save.

    Then when I tried to save it wouldn't work and would instead create a new temp0.map that gives me an Exception Access Error when I attempt to open it.

    Then whenever I tried to enter the single viewport view mode I started getting Framebuffer incomplete: GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT and then the editor would close.

    Then while making this bug report video only my base texture rendered when I opened my project even though it still showed all my other terrain textures in the terrain tab and the light started rendering incorrectly.

    Video Link-

    https://www.youtube.com/watch?v=eM1RHrNZYSg&feature=youtu.be

     

    Previous Posts -

    http://www.leadwerks.com/werkspace/topic/10690-map-doesnt-save/

    and

    http://www.leadwerks.com/werkspace/topic/10631-directional-light-and-model-editor-bug/.

  5. Ok. To reproduce the error you have to place lots of items into the map without saving for a while. I can't pin down what starts the error the only thing I am doing is copy and pasting trees and rocks as well as adjusting the terrain. Then when I try to save this bug will occur sometimes.

     

    I sent the map to you in a PM.

  6. No problem man!

    For the water you need to change the camera setup if you are using the FPSplayer.lua script. The water prefab comes with a camera that you should use.

    So assuming this is what is happening you need to go into your FPSplayer.script and delete self.camera=Camera:Create() and then place Script.camera=nil --entity "camera" above function Script:Start(). Then go into to your scene tab and drag the camera/water prefab into your characters drop box labeled "camera" under the Script tab. Then it should work. Let me know if that does anything.

     

    Well I am not sure about where to find premade scripts but you can look around the forum or leadwerks.wikidot.com and I am sure you find some useful snippets.

    For models you can try blendswap.com but pay attention to the license requirements on certain models.

    I normally use Blender to create models, if you haven't heard of it here is a link - http://www.blender.org/ It is free modeling software. It can be hard to understand at first but there are many tutorials on youtube.

    I haven't actually spent money on any models yet so I am not sure where to go to buy models.

  7. Hi there, keep it up!

    Learning how to code can be a struggle but you'll get to where you want eventually. smile.png

    There is a rather old water prefab that Shadmar made for Lua. It can be found here -

    http://www.leadwerks.com/werkspace/files/file/468-water-prefab-for-leadwerks-31-steam-ed/

    Unfortunately I am not sure if it will work correctly anymore as it was released a while ago.

     

    Here is a link to some vegetation, rocks, textures, and other cool assets from Nobiax. --

    http://nobiax.deviantart.com/gallery/24853853/Packs

     

    Hope this helps!

    • Upvote 1
  8. Yep. I use SetShape(nil) in Lua and it works fine. It also reduces the shapes ref count to 0. I tested it with DebugPhysicsMode on to make sure. What I do for weapons is have them store their shape at the start like this -

     

    function Script:Start()

    self.shape=self.entity:GetShape()

    self.shape:AddRef()

    end

     

    Then when my player picks up the weapon its shape is reduced to 0 by using self.entity:SetShape(nil). If I drop the weapon it gets its shape back from the self.shape I stored at the start. Like this -- self.entity:SetShape(self.shape). Then if I set the weapons shape to nil again I still have self.shape referenced so it can be used over and over again.

    • Upvote 1
  9. This is a bug that happens a lot to me. After placing objects and working on terrain my map won't save and then all my work will be deleted. I believe this is caused by the same bug that was pointed out in my last post - http://www.leadwerks.com/werkspace/topic/10631-directional-light-and-model-editor-bug/

     

    I really can't do any more work like this. I have lost to many hours of my time to this specific issue. Looks like the Hunt for Food is on hold. sad.png

     

    Video - https://www.youtube.com/watch?v=mjyjNBnFnTM&feature=youtu.be

     

    I can provide my project if needed, just let me know.

     

    Edit-- I looked into my backup maps and all the backups are named temp.map and when I try to open them I get Exception Access Violation.

  10. These are all the video settings functions I have found that work with Lua.

     

    self.world:SetTessellationQuality() can be 0 1 or 2

    self.world:SetLightQuality() can be 0 1 or 2

    Texture:SetAnisotropy() can be 1,2,4,8, or 16

    self.camera:SetMultisampleMode() can be 1,2,4,8,16, or 32

    • Upvote 3
  11. I want to say that I think adding things like vegetation systems, water, and decals will bring more people to the engine than having dlc packs of animated characters. There are already many websites where people can get animated models even for free but there aren't any websites where I can get a leadwerks water feature implemented into my leadwerks game engine.

     

    You didn't release the C++ version of the engine very long ago so of course we don't have a fully playable online shooter game already created. It isn't at all about more trees. It is about things that aren't implemented like water, decals, vegetation painting(for faster workflow with vegetation not just for more vegetation). It is about making a full, unique game rather than an empty, bland one.

     

    --edit I want to add that on the other hand I do welcome adding animation features (like boner 3d) but I feel character dlc packs might be a bit excessive if they take precedence over new features.

    • Upvote 6
  12. I just checked and I already have the latest drivers.

     

    Other weird behavior -

    When I start up Leadwerks I frequently get Framebuffer incomplete: GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT and then leadwerks closes on me.

    Everytime I import something a .meta for the imported file is also created.

    Sometimes after using Leadwerks for a while it will become unresponsive and then I have to close it.

     

    I know this is a lot of different issues but they all started happening all at once which makes me think that these issues may have come from one bug.

  13. Both my directional lights (in the editor) and model editor (when selecting new materials for a model) are behaving strangely. The video shows more.

    I am using Leadwerks Indie Edition and am in the beta. This started happening after the recent character physics update.

     

    video link -- https://www.youtube.com/watch?v=eECOdrdEAvA&feature=youtu.be

     

     

    edit-- I just noticed that when leadwerks starts up the log says this -

     

    "Initializing OpenGL4 graphics driver...

    OpenGL version 440

    GLSL version 440

    Device: GeForce GT 630M/PCIe/SSE2

    OpenGL version 410

    GLSL version 410"

     

    Why does it change the OpenGl and GLSL version? Is that intended?

  14. This seems to be related -

    When using EmitSound() if my listener gets out of range the emitted sound pauses. Then when I come back into range the emitted sound starts playing again from where it paused until it finishes.

    It would be better if the emitted sound just kept playing when the listener goes out of range.

    • Upvote 2
  15. The problem with that is that scripts can't be uploaded to workshop.

    Yeah that is unfortunate a lot of those code snippets really helped me learn the basics of coding.

     

    The leadwerks wiki (leadwerks.wikidot.com) might be a good place to start placing some scripts.

  16. Yep buttons! haha

     

    Thanks for all the help Rick.

    This looks great and will save me hours of trial and error. I am so used to the convenience of the Pick() function for these sorts of things.

  17. Yeah I tried both of them to no avail.

    I did create my own solution just now though that works pretty good. After a mouse hit I check the distance from all the selection boxes to the mouses position and the selection box with the smallest distance is then selected.

     

    The code looks like this-

    function App:Loop()
    
    self.context:SetColor(1,1,1)
    self.context:SetBlendMode(Blend.Alpha)
    self.context:SetScale(2.5,2.5)
    
    local font=self.context:GetFont()
    local pos={}
    
    local text="Return True"
    local tx = (self.context:GetWidth() - font:GetTextWidth(text))/1.5
    local ty = self.context:GetHeight() - font:GetHeight() - 162
    pos[1]=Vec2(tx+50,ty)
    self.context:DrawText(text,tx,ty)
    
    text="Return False"
    tx =(self.context:GetWidth() - font:GetTextWidth(text))/3
    ty = self.context:GetHeight() - font:GetHeight() - 162
    pos[2]=Vec2(tx+50,ty)
    self.context:DrawText(text,tx,ty)
    
    if self.window:MouseHit(1) then
    local mousepos=self.window:GetMousePosition():xy()
    local lastdistance=0
    local hit=0
    for n=1,#pos do
    if pos[n]~=nil then
    local d=mousepos:DistanceToPoint(pos[n])
    if d<300 then
     if lastdistance>d or lastdistance==0 then
     lastdistance=d
     hit=n
     end
    end
    end
    end
    if hit>0 then
    System:Print("hit" ..tostring(hit))
    if hit==1 then
    return true
    elseif hit==2 then
    return false
    end
    end
    end
    
    end
    

  18. I am trying to create a settings menu for my game and to do that I want to be able to click on selection boxes on the menu screen to trigger changes.

     

    What is a good way to check if your mouse is above a context image?

     

    Picks don't seem to work and distance checks haven't yet worked for me either. Any advice would be appreciated!

×
×
  • Create New...