Jump to content

Phodex Games

Members
  • Posts

    275
  • Joined

  • Last visited

Posts posted by Phodex Games

  1. 2 minutes ago, Josh said:

    If you create a new relationship that would cause a crash if the pointer became NULL

    Hmm ok, this is going to be tricky as I don't exactly now what relatonship is causing the error and it just crashes. Have to learn some more about this topic I guess, but thank you for the information will read through it and hopefully get this fixed...

  2. 10 hours ago, Josh said:

    Thank you this is actually helpful :), but the problem is I want to release the entity. To give a more precice example. I have an item inside my gameworld, lets say its a bread model. And the script attached to it has the following code inside:

    function Script:Use(player)
    	self.itemClass:Use(player) --adds item to player inventory
    	self.entity:Release()
    end

    if I say self.entity:AddRef() before release it obviously is not releasing it, but I want to remove my item as the player grabs it. Or am I using Release totally wrong and should I come up with a system like:

    function Script:Use(player)
    	self.itemClass:Use(player)
    	self.entity:Hide()
    	self.disabled = false
    end

    I thought as the item is not needed anymore I just release it. The problem is it may be used/be target of some other entity/script etc.

  3. Hi Leadwerks fellows :)

    I think some of you may run into the same problem once in a while. The problem is the following. My AI wants to grab an item, but if, for whatever reason, this item gets released, while the AI is moving towards the item, the game just crashes, with no error. The same happens if I grab an item as a player and release the entity in my function, I fixed this by releasing the entity some time later in the loop. And yes I am testing my variables if they are nil, so I guess this could not be the problem... I think this has to do with the order how the loops are iterated through and I kind of understand the problem, but how to overcome this. Any safe solutions on how to release an entity, which is used somewhere else in the code? Thanks for reading so far and thanks for your help in advance!

    Markus from Phodex Games

  4. Hi,

    I was thinking about a day night cycle for my next project. I found shadmars day night cycle shader, but can't find any working download link? However, even if I get my hands on his shader, I think I still need to adjust some stuff. Do you know any good tutorial/documentation, or can explain how I generally would create a day night cylce in Leadwerks?

    Thanks!

    Markus form Phodex

  5. Hi, 

    I was lately thinking about converting all my code from Lua to C++. Without knowing the size of my project, do you estaminate this is something taking very long, like more then 2 months, or is this something you could do within a week (I maybe have about 60-80 scripts) if you are working hard on it?

    Furthermore do you see any advantages in doing this (or better said is it worth the time) and I am not talking about speed, I much more mean the libraries that C++ offers and the more precice debugging. Thanks for your ideas :) and Merry Christmas.

  6. Hi Leadwerkers,

    I am intensively using this engine for more than a year now and I have met a lot of people having trouble getting started with game development and especially with coding. As Leadwerks promotes itself in beeing a beginner friendly engine, I guess there should be a lot of beginners around.

    I really would like to come up with something, helping those of you having difficulties and getting started with game development and coding, to be able to create the games you have in your minds. Therefore I quickly created a google survey, to be able to suit the content to your needs. If you have a tiny bit of time and would like to see content related to this topic, I would be happy if you would participate :).

    Have a nice day!

    Markus from Phodex

    -> To the survey <-

    • Like 2
  7. Wow, this is looking pretty good now. Still did not fix, the shadow problem, but I guess it is related to the model itself. Maybe have to do some cleaning/fixing. Thanks a lot for the tip with the fog, this adds a lot of atmosphere to the scene.

    Another thing I found out myself, was, that its a good idea, to disable the shadow casting in the materials, for all the details on the house (Door, Bricks, Windows), but keep the shadows for the basement, walls & roof.

    5a38330763c19_PhodexFramework2017-12-1822-27-04-67.thumb.jpg.938b429097eff5f2f8827c0c1f073bec.jpg

    • Like 1
  8. @Josh

    Okey thank you so far :). I will try your advices and see what I can get out of it, but I actually don't know how to add fog? Is it a Post Effects Shader? Dont find it in my shader folder. As I have time and can't find a solution of my own, I would really like to take your offer, for looking into my project. I just need to create a new project packing the files in, as my current one is a little huge to share...

    P.S.: I think I need a lot to learn about shaders, shadow casting and the whole process of rendering, which is a knowledge gap of mine.

  9. Hi,

    I recently had a lot of fun, playing around with some low poly stuff. Unfortunately a problem occured, I am having pretty often, I haven't found a good fix yet. I dont know, shadow rendering in LW is weird, or I most likley just dont understand it.

    Look how, the shadow at the leaves of this tree just disappears, after you are 20 meters away:

    screenshot24.thumb.jpg.d2baf1c327718851fe5b8b6d1bc51d12.jpgscreenshot23.thumb.jpg.dae9442ec6298f85ca64b0895f00d4a8.jpg

    This does not really happen (or at least it does not look as ugly) for this tree:

    screenshot25.thumb.jpg.717340b889948debb0b78419d048da30.jpgscreenshot26.thumb.jpg.3ed8962bee0f7925fb1f2148b570d943.jpg

    Another example that shows my problem is this. On the right is is how it is rendered in Blender. What I want is kind of the same shadow type, but including an shadow the house is drawing on the ground. And do you see that door? Looks super ugly. I would be glad if sombody can point me towards a solution. I know, that you can take effect on this by calculating the normals, but what settings would you recommend for low poly?

    screenshot27.thumb.jpg.4e2af8f00bb3fbceee8f4e2a64b0954a.jpg5a38041341a35_GrafikTypLowPolyHausBlender.PNG.a4eff8e8cb7839ab14715fbcc8ad0409.PNG

    To bring it to the point, this is what I want it to look like. I think the funny thing is that the lightning of the scenes below, are "worse" more simplisitc as the one leadwerks includes, but the shadows are consistent on farer distances and fit the low poly style. I need this for creating a good overall look for my project.

    Store_StylizedLowPolyBuildings_screenshot_1-1920x1080-49963e1828eedada4315aec1629a8f3d.pngOlbertsLowPolyWoodStrongHold_screenshot_02-1920x1080-0c2ef8894e1491a8b45b9c69445fa1f9.png

    I am thankful for any documentation, information you can give me for setting up a scene like this in Leadwerks. Thanks for your answers in advance!

    Markus

  10. Hi :)

    after I exported my hands model as mdl (with Leadwerks Blender exporter) many of the animations were malformed? Anyone had the same problem? This makes the exporter pretty useless for me, as it works fine when I export as fbx.

    This is how it looks in LW:

    59f033361eb6b_InsideLW.PNG.228a14b066363db8537f5bab0cb1f77e.PNG

    An this is how it looks originally:

    59f0333242746_InBlender.PNG.a710bc757f0f7960efc48d2d0fb2a3be.PNG

    Thank you in advance!

  11. Hi,

    recently I am working on some new animations for my FPS hands. The problem I have is I have for example a sword attack animation, and want the player to be able to equip diffrent weapons (types of swords). I kind of worked out a solution which works, but I causes a lot of trouble and is not much fun to work with and I cannot believe there is no better solution.

    I simply put a weapon bone into my rig, then I imported the sword model inside Blender, parented it to the bone to see the sword while animating. Then I export the rig an hand model, afterwards I export the Sword model (in its original position and rotation of course), but if I parent it to the weapon bone, its rotation is weird and I need to manually fix it, or I can't even find the right rotation. I tried fbx export, and leadwerks exporter. I get very diffrent results. I tested this stuff for hours now and are kind of frustrated :(.

    So far to what I already did.

    Now my question: What is a common way to do such a thing, as I dont know? Any tutorials, guides how to realise a system like this? How do you guys solve that? Because it is really a pain to syncronize the positions/rotations I have inside Blender, with the Leadwerks dimensions. Thank you in advance for your answers.

     

  12. Hey, I am currently working on my AI, and I wonder what would be a good way, to make my NPC hold a specific distance to the player. In my case I need it for my AI behavior when it is using range weapons. I think a nice idea is to let the AI find a random point, which keeps a few conditions like, 10 units away from player, not outside of the map, not inside another object. But how to realise that. I would be very thankful if you can give me ideas, examples, descriptions etc.

  13. If you want to, I could explain this to you more detailed in out next "lesson" ^^, but yes it pretty much works like you explain it. It can be a little bit confusing to make the weapon/item appear correctly inside the characters hands. You need to take care when setting the origin of the weapon. This can get more difficult, when working on a range weapon, especially when you visually see the projectile (e.g a bow/crossbow).

  14. @Marcousik Okey I guess I understand now what you mean, thank you for that. But I am searching for a solution, where my player model does not have every cloth available attached to it, because I think its not that smart. Or is this how that kind of stuff works normally, I have no idea.

    I think this method should work for me, still it would be cool, to be able to have all the cloths as seperate entites inside Leadewerks and attach them to a rig inside leadwerks (like you would do inside your modelling software).

     

    11 hours ago, Marcousik said:

    the clothes required definivly to get animated, else the programm just does not know how the meshes have to move

    Thats actually was what I am asking for, IF there is a way to tell Leadwerks, to use a specific rig for an yet unrigged model.

    Actually, it does work if you put an entity to an BONE inside an rig, this object moves with the animation, but it does not work for multiple bones.

    Edit: So again thank you for this idea, after thinking about it I guess its a pretty good solution, although not 100 % perfect.

  15. Haven't you tried my timer code? There is no built in timer function or something like that. Try that out:

    Script.timer = 0
    Script.widgetLifeTime = 30
    
    function Script:UpdateWorld()
       if self.enabled then
        --This is the timer:
        self.timer = self.timer + Time:GetSpeed()
          if self.timer >= self.widgetLifeTime then 
             self.timer = 0 
             self:Disable() 
          end
       end
    end

    You need any function which updates every frame and put that timer code in there. Do NOT put this lines of code into a function which just gets called once. You can for example put this inside the post render function.

    The "Time:Delay" function freezes your code for a specific amount of time I guess.

  16. Yeah I know, thats why I said its a stupid answer ^^, especially because you knew that already didn't you :P. But don't you have a website maybe? You can make a password saved area there where you upload the newester version or something like that? I gues thats a more smart solution.

  17. I personally use my own UI system, so I am not much into the Leadwerks built in UI system, but I can help you with the stopping after a specific time. As far as I understand it you want the message just be displayed for a specific of time don't you?

    For this simple add a timer, which disables the widget like this:

    Script.timer = 0
    Script.widgetLifeTime = 30
    
    function Script:UpdateWorld()
       if self.enabled then
        self.timer = self.timer + Time:GetSpeed()
          if self.timer >= self.widgetLifeTime then 
             self.timer = 0 
             self:Disable() 
          end
       end
    end

    But your disable function won't work. I guess you have to release the widget somewhere, but at them moment I dont know how this exactly works with the leadwerks UI, maybe check the Reference for that.

    I don't get what you mean with:

    8 hours ago, randomdude said:

    but how do  get only the window with text and the game as background?

     

  18. Hi,

    I have not solved this problem, yet, although I have it for quiet a while. I want to make a system so a character can wear diffrent clothing. Say I have an Character which I want to wear a shirt. How is the best way to make the shirt play the same animation as the Character?

    The only way, I know, which is working, is to put the same rig, the character has to the shirt inside your model software (Blender in my case) and export it. Then play the animation on both.

    Recently I played around with seperating the armature from the model and add another model to the rig (as a parent) inside Leadwerks but that does not work. If you export only an rig from blender this rig has no animations inside Leadwerks. Even if you load animations in, the model, set as the parent of the rig, does not play any animation. Well I would have wondered if that worked anyway.

    What I know, what works is if you parent an entity to an bone inside an rig in Leadwerks, this entity moves with the bone. This is very helpful for weapon animation, but what if I need more than one bone to affect my model? Any ideas on that?

×
×
  • Create New...