Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Everything posted by Rick

  1. Yep, we're seeing this in our summer competition game. Sometimes the mouse is hidden, sometimes it's not.
  2. You could also be a little more standard library friendly and use remove_if: items.remove_if([] (item*i) { bool isActive = (*i)->update(); if (!isActive) return true; other_code_involving(*i); return false; });
  3. If you're talking about animation blending (smoothly blending between animations) and you're using Lua then the Animation Manager has a parameter for that. The 3rd parameter determines that: function AnimationManager:SetAnimationSequence(sequence, speed, blendtime, mode, endHookScript, endHook, endFrame)
  4. Here is a video with my early works of getting Behaviour Tree's in Leadwerks! At the end of the tourney I'm hoping to release this on the workshop. I hope I didn't ramble to bad in the video
  5. Rick

    Run away!

    That's much less code! I'll check that out. Thanks!
  6. The headers just give you the function signatures so the compiler see's the functions and it can tell everything is in order, so yes altering those shouldn't cause any real functionality to change as the actual code is in the LE library which we don't have access to that source that it was compiled from.
  7. Rick

    Run away!

    I was actually doing that, but listening to you I was rotating and then moving forward but I should be able to cut a couple lines and just give a negative z value in the move. Thanks! [edit] Saved me 1 line of code, but every line counts
  8. Rick

    Run away!

    It's sort of messy and more code than I'm guessing is needed but it does the trick. Thanks for the idea!
  9. Rick

    Run away!

    So the controller has Follow() but I'm looking at run away functionality. I'm curious if there is a cool LE entity way (low math) to do this. At a high level I'm thinking a point could be found in the complete opposite direction of the thing the controller is running away from at a given distance and then I could call the controllers GoToPoint(). I'm sure this is some vector math here. Get the vector between the controller and the thing I want to run away from, and then get the complete opposite. Normalize it, then scale it to some distance and see what point that is. Is there a different way that people can think of?
  10. It looks like currently we can only go so deep in the tables/nested tables. It would be nice if we could maybe configure how far we want to go. When I'm debugging some things I can't go as deep as I'd like to and it's really limiting the debug functionality in that respect.
  11. the problem with import is that we would have to go thru each library and change it from using require, because they all use require internally, and I've tried that and it's a pain in the *** and it's error prone. Is there any way you can make le's own version of require so these will work? When require is used the module can return the object from the source. Import doesn't seem to allow that and so we have to go in and heavily modify these libraries to work differently for le which sucks. So for example try to use import in that library and try to create an object like in the example page on git and you'll see you quickly go down a rabbi hole of modifying every file and how it works to get the thing to work in le and hope what you just did didn't screw something up.
  12. https://github.com/tanema/behaviourtree.lua
  13. No, just pure Lua libraries. All are built using require. package.loadlib() is how you load dlls and I totally get not allowing that but require should be safe to load just Lua libsraies.
  14. Using require in sandbox mode has failed. Im wondering why because many useful Lua libraries, if not all, use require. But in leadwerks that doesn't work. Is there any way we can get require working in leadwerks so we can use these pure Lua libraries that exist that can help make things easier for us? I can help change the way ppl make ai in leadwerks easier if this works.
  15. Does it have a mass on the physics tab > 0?
  16. This seems strange. This isn't generally what you think of with networking a game. Can you load any file that isn't is the games directory even?
  17. You should log how many people use the flowgraph system. I assume with steam connection you could do that. It would be interesting data. My assumption would be very little with it being pretty limited in features. You were bigger on it in the past and now you're even going farther away given your recent c++ endeavors. I feel like the flowgraph needs some love at some point as it seems like it's fallen to the wayside.
  18. The flowgraph is not a coding environment like Blueprint over in UDK. I think that's more of what he is looking for so he can do all sorts of things visually on his own. Basically you'd make nodes for all LE functions for people to code visually. Then you'd have to break flowgraphs out because one wouldn't be enough. Then add comments ability, etc.
  19. Sure, it's possible but you'll be limited to what other coders have made in terms of visual scripts for you to use with the flowgraph editor. There was a point where I made a decent amount of scripts purely for the flowgraph editor but Josh doesn't put much focus on making that thing more than a toy to play around with so its missing a lot of features to make it more "programming" friendly as he doesn't want it to be for that and just for little interactions.
  20. Oh wow you are thinking of taking this even farther! That would be pretty cool. Scanning c header files seems a little iffy to me but if it works well it's easier on the user so they don't have any configuration. You mentioned auto generating c++ though and generally the users never should touch auto generated files but those files you create would be the specific actor files we need to add our stuff to. This would be very interesting. I'll have to put more thought into this if you're willing to entertain, for now, how a system like this could work and various ways of doing it.
  21. We still need a way to have entities in the editor better "tell" the c++ code what class object to create and possibly any other entity data to populate class data with without using Lua. On a side note you aren't really adding reflection. The idea of reflection is doing all that stuff at runtime not compile time. You're doing code generation.
  22. You can do it now but it's a little painful. If you don't want to use the name of the entity how do you tell c++ what clas instance to make for said entity? You need to attach a script to the entity so you can set some key value that you then read from c++. Kind of clunky, and requires you to make a script. Maybe like entities can have different values that you want to set in the editor vs code. How would you do that? Why would you want that? Well an rpg game may have an NPC actor class but in you editor you want to assign that specific instance of the NPC a unique name, health, armor, etc. You need to get that info from that entity in the editor to the C++ actor class. Lots of things to think about of the C++ side. You are starting to see why C# is so valuable. Since it has reflection all of this stuff becomes easy without needing code generation. Not saying LE should switch but you understand why some engines use C#. If you go generation you could allow us to add key/values to an entity from its properties window so lua isn't needed. Then match the name of the key to a setter function that we must define. So if my key is Name I should make a function to my NPC class to setName(string name);
  23. Rick

    Lua or C++?

    If Josh would create a key/value system for each entity in the editor (when an entity is selected have this option in the properties area) then it can help people attach information to an entity without having to attach a lua script to it. This information could be details C++ would use. This would give people a Lua free option if they wanted. I've pushed for this a couple times but since he wasn't in the C++ mindset like he is now, I don't think he saw much value in it.
  24. I love the idea. You are starting to actually use C++ features! Why not keep the old hook system so it doesn't break anything but add this as well? The biggest issue with this in C++ is attaching map entities up with C++ code. Something to help with that would be nice if possible. With C++ not really allowing reflection (boost can sort of get it) that makes it a little more difficult. Generally a factory pattern along with some configuration would be required. Right now you kind of have to still use Lua to set key/value to help you figure out that map entity should use this C++ class and then check that in C++ to figure out which class instance to create. Kind of clunky. Something that might help not require Lua with this would be a key/value system built into the entity properties so people could add key/values that get attached to the entity via SetEntityValue() automatically by the engine when the map is loaded so it can be read in with C++. Now that entity can just be an entity with no Lua script attached and they can make their own key (Class) to use in C++ after the map is loaded to figure out what C++ class instance to make. There are a bunch of ways to map a string to a class name but they require some config in C++: http://stackoverflow.com/questions/582331/is-there-a-way-to-instantiate-objects-from-a-string-holding-their-class-name
×
×
  • Create New...