Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Everything posted by Rick

  1. The API doesn't show this but I thought it was added (to lua as well) to be able to draw rounded rects? What was the syntax to that again? Also was gradient ability added to fill it in too?
  2. Josh really needs to build this idea into all our scripts. Have enter/stay/exit collision script functions is highly useful but look at all the code we would have to copy and paste all over to get it in a comprehensive way in any script we would want. That really isn't the right way you want ppl doing it.
  3. You might be better off uploading to workshop so it puts things in the right dir and it won't get lost on the forums.
  4. I'm confused as System GetProperty() says it reads a command line property in the docs. There is no doc for System SetProperty() that I see. Where is that saving data and why does GetProperty() say command line properties? That's not what we would need to read saved data. Edit: nvm I see
  5. I don't recall, did we have a way to save game data for game player games? I seemed to recall that we can't write to file from there. If that's right will that ever be addressed? I would think having ppl play the games more than once is deminished if their progress isn't saved. Maybe there is some game saving API company out there?
  6. Josh takes great pride I think in LEs post fx so if you're going to come in with a claim bashing them you better give some solid examples to prove your point.
  7. I assume since this is a template it'll show up like the fps template when we make a new project so we can modify all we want. If someone wants to make it a more formal community project they can do that then.
  8. I generally do the reverse. Create an LE project and add raknet. Can google fir how to add raknet and it's more common of a question if there are issues so more resources existing.
  9. Good idea. Just make sure your maps are high enough and always going in the positive direction of x & z. So does it only take the highest value though? I.e. If the value was 10 and you later set it to 8 does it actually store the 8? That's strange that multiple leaderboards time out or is that slow. Why would you need a couple dozen? I would think one for each field which should just be 7? 3 for pos, 3 for rot, and 1 for score?
  10. That's why you wrap it up in a class so those details are hidden . I'm playing around with this because I'm curious if I can get it to work. I'll see if I can figure something out as this would be handy for other things. It wouldn't be to store multiple records per user though as that's way more complex, but I think I can get it so each user gets one record of any number of columns so you could store its final position, rotation, score, any other int. This would all work if the value gets overwritten. Looking back at Josh's original post I see that at that time it would only write the value if it was higher than the current value which wouldn't work for this as a general storage of nits per user. If you just showed the top 5 cars I don't think that would look bad at all. I'd want to see them. I would be much more inclined to keep playing the game to try and beat those guys. Each start of the race you'd have to re-get the data and clear out the old cars and place the new top 5. I'll test if the value we write each time makes it or if it only takes the highest value as that's the key to the entire thing really.
  11. Guessing your post about web API was to track this? I think you could uses leaderboards for this. I like how you have an instance of the car stay where it left off. What might be cool is to incorporate that into the leaderboard data. Maybe you can store the position of each user in the leaderboard (remember you can create multiple leaderboards to store whatever numeric data you want), and then when we start you query the leaderboard to get the top 5 players. Take their images and use that to create a unique material in code and use that material for an instance of a car that you place at that players pos/rot that you stored in leadboards. It's a sort of bastardizatiin of the leaderboard but it would be cool to see top 5 cars and where they fell. You could have "score", "score.pos.x", "score.pos.y", "score.pos.z" leaderboard names and the same for rotation to store your data for each user.
  12. I've asked josh to give us a generic interface for this since he's in there doing it specifically for that API that allows us to track what players are doing. I doubt we will have that anytime soon, if at all though. He seems to be focusing on this specific API he's working with. Other than that anything that allows this via Lua would require an external non Lua library which means it's not going to work for the game player.
  13. We had this issue when we made the Cobra demo. When we have an emitter that uses a spritesheet (making an explosion) and make that a prefab that emitter won't cycle through the spritesheet. It just shows the entire spritesheet. As a workaround is there a way to unlink a prefab? It works if the prefab is no longer an instanced prefab (when I do this via the editor it makes the spritesheet play. Can I do this via code?). Trying to work around this. My explosion is a parent pivot and 4 emitter children (one being the spritesheet of fireball explosion, others being smoke and dust kicking up). I pass this as a script parameter to the thing I want to blow up. That works but clearly if I want 5 things to blow up the can't all share the same explosion. So I figured I'll use :Instance() on the passed in explosion entity. That gives the same results as the prefab where the entire spritesheet is displayed vs cycling through the sub images so that doesn't work. Any other ideas?
  14. Josh should just add that code to this site and do it for us!
  15. http://www.leadwerks.com/werkspace/page/api-reference/_/entity/entityfollow-r697 I have a floor with a high box csg on it. I have a navmesh and on top of the csg box and the floor it shows the navmesh in the editor. However you can't get to the high csg box from the floor. If I place the player on top of the box and the crawler on the floor the crawler returns true from Follow() even though there is no way it can actually get to the player because the navmesh isn't connected.
  16. I was looking for a way to avoid having to make time variables manually and a more inline way when I wanted to do something on an interval. I came up with the function below. The idea is that it's something that's in an Update function so it's called every frame (normally what you would do anyway if you were tracking it manually). First it's usage: -- this will play an attack animation every 2 seconds. the false variable tells if it should call the function you are passing in right away the first time or wait until the interval is up for the first time only. after that it'll do it at the interval DoEvery(2000, false, function() self.animMgr:SetAnimationSequence("Attack"..tostring(1 + task.actor.attackmode), 0.05, 300, 1, self, self.EndAttack) end) This should be slap in ready. Just copy it to your project and use away. function DoEvery(interval, doRightAway, method) local info = debug.getinfo(method, "S") local id = info.linedefined..string.gsub(string.gsub(info.source, "/", "_"), ":", "") -- if this is the first time every calling this then create the global class that will hold all instances of these if DoEveryInstances == nil then DoEveryInstances = {} end -- if this is the first time trying to do this specific function then create it's entry if DoEveryInstances[id] == nil then DoEveryInstances[id] = {} if doRightAway == true then DoEveryInstances[id].lastUpdateTime = interval * -1 else DoEveryInstances[id].lastUpdateTime = Time:GetCurrent() end end -- handle the do every function for a specific instance if Time:GetCurrent() >= DoEveryInstances[id].lastUpdateTime + interval then DoEveryInstances[id].lastUpdateTime = Time:GetCurrent() method() end end
  17. I know Follow() will return a bool telling us if a path is found but it also does the move. Is there a way to just do the check and not do the move? I mean the workaround would be to stop it right away if returns true but I seem to recall there was a way to just check a different way.
  18. Fonts in general would be nice if they could be relative to screen res somehow?
  19. I think this covers the main idea of the crawler. Now I just fill in code for each node. The oval ones are conditions so they are simple. Just checking flags in the crawler script. The rounded rectangles are the actions. I'll have to translate what you have in the crawler code for those. I have family over this weekend but hoping to get to those Sunday evening sometime. After I do that I had an idea to expand it to have the crawler look for a health pack if its health is less than 50, and if it's health is less than 25 to explode . That would look like the below. The cool thing is with this editor (http://behavior3js.guineashots.com/editor/#) I can map out how I want my AI to look before doing any code. Once I get how I want the AI to work I go and create the code for each node which is its own LUA file in the way I have the system setup. My vision would be we have a big library of nodes that anyone can create and people can piece them together with the visual editor to make different behaviors. Some behaviors would require certain things to exist in the world editor. For example hiding behind a barricade would require something to be classified as a barricade so the node could possibly do a ForEachEntityInAABBDo() looking for the entity defined as a barricade and figure out which side it needs to be on (where is it being shot from). Then a person simply drops that node in here and their AI now has that functionality.
  20. I'll replicate the LE monster with my behavior tree lib I made work with LE. I used this in our Dino game for the dinosaurs but they were pretty basic and people probably didn't notice the fact that they found food and would remember where food was as they came across it and go there if they got hungry later.
  21. They have stored on their side your key so you had to register with them to get one I assume. This is unique per person who registered and tells the API provider that you're ok to use their API. I'm kind of shocked the URL isn't https though. Also I would assume each game dev would need their own key or else we'd all be using yours which you don't want. That would mean we have to sign up, get a key, and tell LE to use our key.
  22. If I had to critique it I'd say: - Replace your arg values at the end with 3 dots (...) as that's how you get unlimited arguments. Inside a function is a special variable then called arg which is a table of all the arguments that could be in the ... When you pass them to the function to call you can pass the arg var to the unpack() function and it'll place them into each individual parameters of the users function by order they are in the arg table. That's makes your function truly generic so we don't have to make our own if we want more arguments. - I think you'd want to remove the call after it was called once. So giving that object to the user could invalidate the object if you did that which might lead to them using it. If you don't remove the object it's function will just keep getting called which isn't desirable. [Philosophical rant] Simpler and easier comes with structure and less choices. More choices (freedom) is harder. You're providing little functions here and there but hesitant to provide structure around how people make games with Leadwerks. We see game engine succeed both with freedom and structure. Structured game engines are often more newbie friendly. What I see is that you dip your toe into structure but don't go all the way in. One could really take the Leadwerks API and make a very structured game engine from it because it's so free and open. This doesn't mean "here is a fps template and you mod it". It really means providing the common game design structures for your users. The pathfinding is an example of toe dipping by you and it was a HUGE success! There are more structured systems out there that you can adapt to Leadwerks though. You went big with the pathfinding but you're hesitant to go big with other things and your mind goes to little functions here and there vs implementing a system. You implemting Raycast DEFINED how people do pathfinding in Leadwerks. You removed the freedom (not really but when you officially do something the majority use it) and people loved it! Think bigger than single functions. [edit] Just for the record I think behavior trees for ai is that next thing that would be as big as pathfinding was. Then I think state machines built in for structure is another. Finally a cinema maker using coroutines would be on that list too.
  23. My own. I just would want the ability to call any web api. This could allow some basic turn based multiplayer games on the launcher which would be nice.
  24. You might want to check with Valve. Seeing as we can't save to file or execute anything from the game launcher I'm not sure what harm could come from allowing web API calls.
  25. While you are in LE adding curl can you make it so we can call out to any API? When it's a get call pass the string data received back to a callback function we specify and put this into the game launcher exe as this would be very handy.
×
×
  • Create New...