Jump to content

Daimour

Members
  • Posts

    191
  • Joined

  • Last visited

Everything posted by Daimour

  1. I tested this case in LE2. And it works fine with GetVelosity()/SetVelocity() instead of GetPosition()/SetPosition(). But I can't see SetPosition() in LE3 documentation.
  2. I may assume that both physics driven update and entity->SetPosition() are producing new position in world->Update() simultaneously. So they concurrent to each other and SetPosition() wins. I don't know if it will be suitable for you, but you can try call entity->SetPosition() not every frame, but every second frame. Thus first world->Update() will move entity by physics and the second one will execute SetPosition(). Or you can try to call world->Update() twice in one frame for that purpose. And use SetPosition() between them. But I'm afraid it will eat a lot of FPS.
  3. Daimour

    plane

    Did you try to create "surface" from scratch? Like in docs: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/surface/surfaceaddtriangle-r218
  4. But note, if you didn't set "occlusion culling" mode for entity, the "frustrum culling" only will be checked with EntityCulled().
  5. Here is error message in web browser: Full text under spoiler.
  6. There are tons of approaches to make inheritance in Lua. First of all you need to decide - "do you really need inheritance?" Or you just need similar behave for group of objects? In Lua you can override properties and methods of objects "on the fly". And you don't need "polymorphism" because Lua has no types in common and you don't have to deal with type-casting. The easiest way (IMO) to create similar-behave objects - to make factory-functions for each type of objects. function CreateInventoryItem(picture, weight) local obj = {} obj.picture = picture obj.weight = weight return obj end function CreateGunItem(picture, weight, damage) local obj = CreateInventoryItem(picture, weight) obj.damage = damage return obj end
  7. Try to increase force. Or decrease mass. Or play around with friction adjustments (http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entitysetfriction-r142).
  8. I think it's better for perfomance to find the bone once and then store it in some variable. Not to look for it every update. local child = self.entity:FindChild(self.LeftHand) function Script:UpdatePhysics() ... mat = child:GetMatrix(); self.weap:SetMatrix(mat)
  9. ParaToxic did something similar in LE2: http://www.leadwerks.com/werkspace/page/videos/_/-r179
  10. So we can conclude that LE2 is very fast engine but nobody (except couple of people and may be Josh) can use it properly to rich decent FPS and nice picture. It's very very tricky, I know. That's why we can't see tons of games created with LE2. So will this situation repeat with LE3? May be to have a good engine is not enough? Josh, did you consider ways to teach people use your engine(s) properly? And teach them to make decent games with engine? I know, you are a programmer and not a teacher. But think about it. You teach people -> They make many decent games with LE -> More people see it -> More people buy LE
  11. I didn't try networking with Leadwerks. And may be RakNet is better. But you might look at integrated in Leadwerks 2 networking capabilities: http://www.leadwerks.com/werkspace/page/Documentation/le2/_/command-reference/networking/
  12. As Red October already said, dynamic light eat a lot of FPS especially for complex scene with many point light sources (we experienced that in our project). Besides, dynamic light sources have strong limitations (light radius, shadow distance etc.). Thus for best performance: - bake as much as you can - use as little light sources as possible
  13. Looks interesting. How did you do that in Editor? Why are you using userdata? You can store Width, Height, Depth as "keys" for model. They will be stored as plain text in SBX, so you could change them manualy.
  14. Very very good! Suggestion, as always. Cut out first 10 seconds. Drums are not very nice intro. They are too broken(?), not rhythmic. And make scary filling which is not suitable for followed music. If you want an intro, try to replace drums with may be some squeal of the wind (if it matches the picture). As usual, I just suggested the easiest way - to cut out first 10 second. The song sounds very good starting from 11-th second.
  15. Exactly. You can try to disable the shader for grass only. Or you can replace this grass with better one which will look nice with shader. Or you can completely remove that grass to make picture more clean. I just suggested the easiest way.
  16. Nice job! I'd try to remove that grass. I think it makes picture dirty.
  17. You can try to add this code to class.lua script. So it will work for all entities on the scene. If they have attached script with: local class=CreateClass(...)
  18. I did something similar for waypoints. Video: But it's not a ring actually (it's a 12 connected lines). It's not for selected entity (only for newly created or moved entity). It's for only one entity class (so it works not for all entities on the scene). And it's hiding automatically after some period of time. Code example (for entity-attached lua-script):
  19. Looks cool! Suggestions: You can try to add point light source (with shadows) following your mouse cursor. Just an idea. And would be nice to keep orange (or other) color for choozen item. So when you move frome one list to another you can still see active (parent) item. And when you come back it's still active (orange) while camera rotating.
  20. Because KeyDown() means you are holding pressed key. Let assume you are holding key "A". After line if (KeyDown(KEY_A)){sequence = 2;} else sequence = 1; variable "sequence" will have value 2. But after line if (KeyDown(KEY_D)){sequence = 2;} else sequence = 1; variable "sequence" will have value 1. Because you are not holding "D" key pressed.
  21. A little example of using buffers: http://www.leadwerks.com/werkspace/topic/4746-load-texture-pieces/#entry41584 It's not a postprocess filter, but may be usefull for undestanding buffers.
  22. Yes. It should work. You could hide preloaded entities or move them far away. But if you don't render the scene while loading it's not necessary. I think it will be better to turn physics off for that preloaded entities to avoid collisions between them.
  23. Daimour

    game over

    I don't know if you can check collisions for character controller or not. But you could measure it's speed with GetBodyVelocity() and check for difference from previous frame.
  24. Yeah. And in the future you could recognize a gamer by it's bandaged neck.
×
×
  • Create New...