-
Posts
7,936 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Rick
-
I always thought the design of us having to load a sound then make a source and attach the sound was kind of unnecessary from our point of view. Why can't I as the user of the LE API just make a "source" where I pass in the wav/ogg path like I do sound and let the API manage things for me? If a sound is needed then you create it and keep it in scope. Don't put that on the user. I see no point in putting that on the user.
-
I used to be C++ but I'm Lua all the way now. Way more flexible. You fight less with the language but it can be more error prone since it's not compiled, but you get used to running/testing after small changes. Never code some giant system and then test it in Lua. It'll drive you insane because you've probably fat fingered about 10 different things and the errors they don't always point to the actual error in case of missing an 'end' or whatever.
-
There is a shader around that let's you hide a section of the terrain. This was generally done at design time so I'm not 100% sure if you can do it at run-time. It would also create a circle patch and would look strange. You would probably fake this in various ways to make it look good but in general LE doesn't do this very well.
-
This more sounds like you want to play sounds closer together not really speed up the sound itself. This would mean you play them with shorter distance of time between when you play.
-
camRotation.y = camRotation.y + (mouseDifference.x / mouseSensitivity) The only real difference is there is no shorthand += in lua.
-
I think he's asking for crouching.
-
I would think that just making the "hitbox" of the entities you need be bigger. You can do this with invisible csg with a dummy script attached. Making it bigger than the model that you want picked. Generally this gives you finer control over each entity you want to be picked vs doing it on the picking itself.
-
What is Player that is in the jugador field? Is it a csg with no script attached? Behind your code window I see a character controller and it looks like some csg on it. CSG if it doesn't have mass or script collapses and can't be used as an entity.
-
Custom Lua tables called via Interpreter::EvaluateString
Rick replied to martyj's topic in Programming
Have you tried the following? Does it give an error? -
You have to trick him into opening the door to check on you. Fake dying or foaming at the mouth.
-
A look at C++11 Weak Pointers in Leadwerks 5
Rick commented on Josh's blog entry in Ultra Software Company Blog
Is it supposed to be? shared_ptr<Entity> enemy = this->target.lock(); -
+1 This is a better solution.
-
What is the situation this happens? I was confused on how this would happen. My example was a specific example. I could do a lot manually if I wanted but it's nice when an API helps you. At it's core it's about raising events at specific times in animations so you can do whatever you want to do. This is a very common thing that the other engines have and it would be nice to have it built in. He has end hook but that's not good enough. I use the old AnimationManager.lua which I'm manipulated to allow this but it's an extra dependency which would be nice to not have.
-
So his GUI has KeyDown and KeyUp events and one blog talks about KeyChar events. Does anyone know if these events are called when attached to any script? Even entity scripts? This would certainly help.
-
Is that how the new GUI system does it? I swear Josh added some function that returned the key for his textbox GUI but I don't have access to any LE code right now.
-
I don't recall and Window doc doesn't seem to show this, but was there a way to get what key was hit vs having to loop over them all to check KeyDown()? This is handy for allowing uses to type in a textbox.
-
Right, I assume each entity has a list of animations playing (because of blending mostly) but we know the sequence name of each. Given this we should be able to query the list for that name to get it's current frame. All of this is about attaching events/callbacks to "frames" within the animation so that one can do things at certain points within the animation. Something that is very handy for a lot of reason. Will it always be perfectly on that frame? No, but it can be close enough where to humans it looks to be perfectly on that "frame". Examples of usage is real footsteps when the feet are hitting the ground, casting spells requires doing things at certain points in the frame, causing melee damage in some turn based games, etc. This is a pretty common thing to do. I'm able to do this with the AnimationManager script because I've added a special frame callback system. It would just be nice to not have this script requirement for playing animations anymore and use built in functions for this.
-
With the new animation functions on the entity, is there any way to tell where you are within the animation? There is a SetAnimationFrame() but I don't see a GetAnimationFrame(). I need this to tell when we've hit or just went passed special frames in an animation. I use this all the time and it's the only thing that keeps me on the old AnimationManager.lua so it would be handy if we could tell what "frame" we are currently on.
-
Can you show your entire main.lua?
-
Note that Tim and I just had to move our project to gitlab from bitbucket because bitbucket's max repository size is 2gig where gitlab is 10gig. For simplicity sake we add everything to our repo and so needed the extra space.
-
It looks like each segment is its own model. Maybe the towers all grow segment by segment over time and randomly and you have to shoot the tower to lower it by one segment. If any segment reaches a certain height you lose. Each round could be time based and each round gets faster and faster. Each new level has a different pattern of towers and more towers. Its just the first thing that popped into my head when I saw the image.
-
Right, so on the client side you can be storing all position updates from the server of all the remote/ghost clients in a queue. Then be tweening between the current position to the next position on the queue. This would give you smooth constant movement. The goal would to be able to keep 2 position items in the queue always while you are popping the current tweening one off it. If you have less than 2 then you know you're lagging because you haven't gotten an update from the server. If you have more than 2 then you know you just got an update from the server because you were lagging. In either cases you can handle it how you see fit. If more than 2 you can skip a couple or increase your tween steps slightly to catch up (but not fast forward like). If you have less than 2 then not much you can do but keep them there OR extrapolate for a couple seconds and fix it when you get packets again. From my understanding this is similar to how Source engine does it. It visually lags other remote clients on a client by 50-100ms so that it always has a future position so they can interpolate. Just throwing out ideas.
-
Why would your entities fast forward? Are you not having a queue of positions/rotations that you're lagging behind by x ms and interpolating between current and next in queue?
-
If the goal is to close the Game then I wouldn't worry about what gets deleted as the OS will free up everything when the app ends.
-
What do you mean do the output? Thats a fairly primitive style of ui but it looks like I'm that certain case yiu would set some variable that causes the app to exit?