Jump to content

reepblue

Developers
  • Posts

    2,500
  • Joined

  • Last visited

Posts posted by reepblue

  1. I'm currently working with my scripts, and I don't think auto completion is not enabled on my end. It would be nice to have a checkbox settings in options to check if it's working or not, and an option for people who can't stand auto completing so they can turn it off if they want.

     

    In the meantime, what's the cfg entry for auto completing?

  2. If user's could still make their own tutorials like they use too, I'd be happy to write up a few. I do understand the want of having one official page of tutorials dedicated to the engine/editor, but other tutorials like tutorials Blender from YouGroove and "How to hack this effect" articles were useful, and fun to read. Only way users can post their own tutorials is forum and blog posts, which get buried over time.

     

    But in my eyes, it's best to leave your game stuff all in lua scripts, and only have the functionality of the application in C++. This is how LEX works.

    • Upvote 1
  3. Hi all,

     

    I'm pretty much almost done with the basic setup for my trip wires. The only problem I seem to have is that scaling the laser so it does not go beyond it's starting point and it's ending point which is always updating.

     

    My Code:

     

    function Script:Start()
    -- Ignore pickers from picking us!
    self.entity:SetPickMode(0)
    
    self.startpoint = self.entity:GetPosition(true)
    self.distance = Transform:Point(0,0,20,self.entity,nil)
    
    -- Sprites
    self.sprite={}
    
    -- The end sprite
    self.sprite[0] = Sprite:Create()
    local material = Material:Load("Materials/Effects/VecBall/vecball.mat")
    self.sprite[0]:SetMaterial(material)
    self.sprite[0]:SetSize(0.25,0.25)
    self.sprite[0]:Show()
    
    -- The beam
    self.sprite[1] = Sprite:Create()
    local material = Material:Load("Materials/Effects/laser1.mat")
    self.sprite[1]:SetMaterial(material)
    self.sprite[1]:SetViewMode(6)--Rotate around z axis
    --self.sprite[1]:SetSize(0.25,10)
    self.sprite[1]:Show()
    self.positionbetween=Pivot:Create()
    end
    function Script:UpdateWorld()
    self:UpdateLaser()
    end
    function Script: UpdatePhysics()
    end
    function Script:UpdateLaser()
    local pickInfo=PickInfo()
    local p0 = self.startpoint
    local p1 = self.distance
    self.endpoint = pickInfo.position
    if self.entity.world:Pick(p0,p1, pickInfo, 0, true, Collision.Prop) then
    self.sprite[0]:SetPosition(self.endpoint)
    --if(pickInfo.entity:GetClass() == Object.ModelClass) then
    if pickInfo.entity.script ~= nil then
    if type(pickInfo.entity.script.TakeDamage)=="function" then
     pickInfo.entity.script:TakeDamage(1)
    end
    end
    --end
    end
    
    self.positionbetween:SetPosition((p0+self.endpoint)/2)
    self.sprite[1]:SetPosition(self.positionbetween:GetPosition())
    self.allignvector=p0-self.endpoint
    self.sprite[1]:AlignToVector(self.allignvector:Normalize(),2)
    self.sprite[1]:SetSize(0.25,self.endpoint.z/2)
    end
    function Script:PostRender(context)
    if DEBUG then
    local player = GameRules:GetPlayer()
    local p1 = player.script.camera:Project(self.startpoint);
    local p2 = player.script.camera:Project(self.endpoint);
    context:DrawLine(p1.x, p1.y, p2.x, p2.y);
    end
    end
    function Script:Release()
    if self.emitter~=nil then
    self.emitter[0]:Release()
    self.emitter=nil
    end
    end
    

     

    What I have now is OK for now, but I'd like to have this fixed eventually. When the model is pretty far from the starting point, it looks fine EDIT: Tried it with a longer trail, still messed up., but as the box gets closer to the source of the laser, the laser is drawn through the box.

     

    It's also axis based/dependent too, so that's not good ether! I need to get the distance from the midpoint and some how implement it to the laser's scale. I also having a hard time of it registering player collision. But I assume my main problem with that right now is that the player is a pivot. Also would like to mention that I'm using code from this topic.

     

    Any help would be appreciated.

    post-12469-0-43201400-1442125659.png

    • Upvote 1
  4. Easiest way to do this is lua.

     

    self.sound = Sound:Load("Sound/Player/Footsteps/concrete1.wav")
    function Script:PlaySound()--in
      self.sound:Play()
    end
    

     

    You can use the Flowgraph or have a trigger that emits the sound on Collision.

  5. Here are a few things I noticed while trying to publish a demo using Lex.

     

    1) The standalone version has a problem with the "Materials" folder inside the data.zip, trying to launch the game without having the "Materials" folder from leadwerks in the game's directory makes it crash on start up.

     

    2) Something is off with the loading of the maps, in the editor I could load a map just fine but if the game is published as soon as the "Changemap" script is called the game crashed without any warnings.

     

    3) A published game doesn't run without the "ClientScheme" file, this is to be expect but the problem is, Leadwerks doesn't export that file when you publish a game.

     

    4) In a published game, the loading screen doesn't change from the default, even if you changed it in the "Main.lua" script.

     

    Hopefully I've been of some help tongue.png

     

    Strange. I tested it as a package with the stock template. I assume you've merged the template with your game which is something I don't 100% recommend. Try testing it with a clean LEX template, or launching it under sandbox mode (-sandbox) Also are you using this script for map transitions?

     

    Something you need to understand is that when the game is not launched in sandbox mode, the game uses the App class that's integrated in the executable. When you launch from the editor or that game launcher, the Main.lua script will act like the stock executable, and the scripts shipped with the template are meant to handle both sandbox and non sandbox cases.

     

    The loading screen is handled on the exe side of things if it's not ran in the sandbox. You can change it by replacing the loadingscreen_default texture file, or name a texture the same name as the map file, and the loading screen will show when loading that map. (Just make sure you put it under Materials/UI/LoadingScreen) Although you might not have the standard edition, the code is there for reading/debugging. (Map loading/saving is handled in rworld.cpp.

     

    Oh, and you can fix the clientscheme file not copying to the build folder by adding xml to the file include list. Since it's in the root directory, it should copy over even with "Only include used files" is checked. Also, keep in mind that none of the functionality of LEX will be in your Game Launcher Releases.

     

    ccs-45-0-85742500-1431279640.png

  6. I disabled textures that use it and my batch count is still high. the framerate only increases if you look at a certain direction in the room. This map alone has been giving me issues since the beginning, and really gave me ideas on how to do things better when I reboot this project.

  7. Nothing is moving in that screen. This is in that hallway right before you hit the trigger for the floor to raise up with the dispenser. The pillars/platforms that do move on the button press are set to a dynamic ShadowMode. I had an idea about the batch count, but it did not seem to be the case, so I have to look more into it later.

     

    Also, quick question: Will using Caulk textures improve the overall framerate as there are less polys, or it does not matter? I noticed the AI and Events map is all textured while my maps have Caulk textures on the outside of the maps, and any other place that can't be seen,

  8. I'm currently playing with optimization with the Vectronic demo. After removing Buffered spotlights, and adding Shadmar's culling script, my framerate has increased, but this room is still hell when you look forward, and the Script Memory Usage count rapidly keeps climbing. Are these results "too high"? I'd be nice if they changed colors if any of these numbers get to be dangerously high as a clear indicator that something's wrong.

    post-12469-0-57111000-1441320214_thumb.png

  9. To Break:

    1. Open a map/Create a new map.
       
    2. Create a box, light or any other object.
       
    3. Open Single Viewport for the Perspective.
       
    4. Double click on a entity in the scene tree (Or right click-> Go To)
       
    5. Exit out of Single Viewport mode to see that your grids are messed up.

     

    To Fix:

    1. Right click on a broken view port, Go to Render view and select a different view angle.
       
    2. Then, change it back to the previous view angle.
       
    3. Continue working.

    post-12469-0-54612600-1441317864_thumb.png

    • Upvote 1
  10. Those screens man, I feel like if that was LE3, it would run at 35-40fps, and the frustum culling problem (that I at least seem to have) would ruin immersion. I debate with myself if the issue is us not knowing how to optimize the engine on our side, or the internal workings of the engine. Over the last page, Josh gave us hints on how to improve our games, but I feel that wouldn't be enough. I'll have to see when I start the project again. (Been busy).

     

    @YouGroove: Yes, Leadwerks right now seems to be more aimed at the game designer/programmer, than artists. I still think a simple shader editor would help a lot though.

  11. It should be noted that some performance issues such as this one are driver side, and the Leadwerks Dev Team can't really fix alone.

     

    I've played around with the AI and Events showcase map, and it ran fine as expected after I turned all lights that were buffered into Static+Dynamic. There is a framerate drop going around the first corner (dips down to 27fps) and while a crawler is moving, (I made them chase me all over the map, and I got my frames back when they died) but the shadow mode is correctly set to Dynamic. So that must be ether navigation side, or something in the script/animations; haven't not really looked.

     

    So right now, just follow this guideline on shadow modes, don't use buffered lights, and while shelling out your map, just set the ambient light to a bright color (almost fullbright) with no lights so you can see what actually impacts performance as you develop your map and scripts. Having deferred lights are great, but you still need to be careful. I've still yet to figure out why the Vectronic Demo runs so poorly still, but that might be because of my garbage ways of doing things, I dunno. Again this was with one map, so I gonna do a bit more testing with lights models and such.

     

    When I go back to Vectronic, I'll make sure to note what things make the game stutter.

     

    Sorry that this topic derailed to the max.

  12. My biggest problem is the massive fps drop that Leadwerks has. One more day runs at a good 4 - 15 fps on my computer, my game was RUTHLESSLY optimized so that the lights wouldn't kill the fps. Any time I want to add a light, I have to think do I really want that there. There can never be more than 4 lights on, and the Directional light will cripple my game play, YET I can run Dying Light at 60fps, all Source games except Cs:Go in excess of 100 FPS. There are some optimizations to be had. If we could work on the engines rendering above all else, I would be happy.

     

    -A Frustrated AMD R9 270x 4gb Crossfire user.

     

    Check to see if your pointlights have any shadows enabled. Disabling them should give you some frames back.

     

    Yeah, even I am not satisfied with how the Vectronic Demo came out in performance. Of course, looking back, there was somethings I've should have done better, but overall I kind of struggled keeping my framerate at 60fps. I've went back in my demo map, and made sure all my lights followed this guideline, and still my 3 room demo hits the high 40's, and I noticed the framerate was higher in a packaged build with 3.5. (I still got that build if you want it Josh!)

     

    I'm not saying they should roll back, and have you bake the lighting again like in 3.0; but I feel like if developers could bake the lighting, and use deferred lighting if needed, games would overall run better, and the shadows wouldn't fade out at a distance, or do stuff like this. But I assume that you can't/would be a chore to have the best of both worlds.

     

    From how Josh put's it, Leadwerks and games developed on Leadwerks are targeted at people who are interested in indie experiment games, but to me, it feels like you need a PC that a "Yo Bro Shooter" would have to have the best experience with the engine. I think a higher priority than PBR or substance support is better optimization. I'm gonna run a few tests to see what causes the slowdown mostly. (Whether be shadows, amount of objects, amount of lights, polys, etc).

     

    There is no doubt that Leadwerks needs more games for it. If there was a at least few top notch quality games that looked and ran awesome, Leadwerks would gain popularity and more people would be using it (or know more about it to spell it correctly!) If developers are having issues actually creating their game with performance/workflow issues, ether no games will be developed for it, or the engine will be known for low quality "games". If you know how to code shaders, your games today can look really nice, but that's overall the hardest, and most complicated part of the entire engine.

     

    I really hate to open this can of worms, but I think it's important for the product as a whole for people to speak up and openly talk about the difficulties of using Leadwerks beyond "Oh, I can't do X, Does not have Y, bad engine". If you can't get your shelled out map (a map in nothing but dev textures and little models) to play well at a good framerate, and you went through your code through a fine comb, you can forget about how cool you wanna make it look; it'll still run like trash! Leadwerks has so much future potential, I feel like a full update on improvements and optimization would be richer than an update with a new feature or two.

    • Upvote 1
  13. Gonna go through some of YouGroove's points.

     

    1 - Josh said that they are putting research into how to make this better.

     

    2 - Maybe this will come with the Vegetation system in 3.7, but I doubt it. I'd put it in the suggestion box if you really want it.

     

    3 - In the LE library, there are headers for UI elements such as buttons, sliders, and such. Josh said that these will be added slowly.

     

    3 bis- Performance improvments (UE4 FPS demo runs faster then LE3 fps demo on my laptop or PC)

     

    3b- OH MY GOD THIS! I understand that OpenGL is a different animal than DirectX, but it's just silly that a mid-range PC like mine can run UE4 at 60fps while it looks like a Hollywood blockbuster film, while the LE showcase map or the Vectronic Demo dips to 45fps at times, and it looks like the Source Engine! (Not that's a bad thing) This really needs to be fixed/optimized better, no one should have a GTX 980 just to play any LE game at 60fps.

     

    4- I think this is because Josh want's a streamlined editor so it's easier to nail down issues. +1 for dreaming though.

     

    5 - There is no doubt that the flowgraph editor needs to be more of a feature than a "Oh, here's a thing, feel free to use it if you want" element. I sometimes forget it's there and mostly use the entity field in my scripts.

     

    6- Yeah, when I show someone else the engine, it's mostly the physics that throws them off. Of course, other people and myself are use to Havok Physics, but that has a $25,000 royalty fee.

     

    7- Yeah, the prefab system can get a bit screwy if you're doing something more than a simple model with a script. Issues I have most with it is when you instance CSG.

     

    7b- I don't really understand this.

     

    And about your whole PBR argument, there should be an easier/better way to make shaders, Your visuals are all about the shaders and how you use them! Shader design should be made for artists in-mind. Of course, this is easier said than done, but it's something to think about. We can't have Shadmar make all of our cool shaders for us forever.

     

    If you feel like your project would do a lot better on a different engine, then why aren't you doing just that? I'm developing my game on LE from Source because with Unity, and UE4, I got so overwhelmed as a solo developer. They were powerful, but too powerful for how simple I wanted Vectronic to be. Plus, them publishing royalties, while Leadwerks has none. You simply buy the software, and you're good to publish - you own your game.

    • Upvote 3
  14. When the Linux build of the Game Launcher is available, I recommend only having your game on there. This way, it will easier to manage updates.

     

    I'm gonna be honest and say I'm not your target audience so I feel like I can't really give you valid input. But I still wish you the best of luck! :)

×
×
  • Create New...