Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Everything posted by Rick

  1. Twice so far, if I'm in project A and go to project manager to open project B, I get Access Violation and the editor closes. However, if I reopen the editor and open project B it works.
  2. Why do you not need LOD for OpenGL4?
  3. @YouGroove If you hide a parent the children will be hidden too as far as I know. There wouldn't be any need to make a parent/child relationship I don't think. I for sure wouldn't want to manually check the distance of ALL entities in the scene to the camera. The ForEachEntityInAABBDo() is doing a distance check, and ForEachVisibleEntityDo() would reduce it even further to only care about the models we can see. Shader can be changed at run-time but instances share the material/shader and if one was to care about LOD one will be using instances to further optimize. So you can't change the shader because it'll effect closer entities as well. Using Animations would be possible. I would make a custom one maybe that is geared more for LOD support. I don't think this would make much of a difference between separate models though.
  4. @Dude I think it's still there because there is a workaround (for scripts anyway) to manually create the scripts. I agree it needs to get fixed though as it's highly annoying and does screw things up because of some reference to the original script is kept and screws up what entity points to what actual script.
  5. Why do do you say that? Even in LE 2.x I'm pretty sure all LOD models got loaded right away and not in the background as needed. They would get loaded on startup and swapped based on the distance to the camera.
  6. Rick

    Terrain meshes

    Oh bummer on the price. I tried exporting an 8-bit RAW file from World Machine (free version). When I try to import that into LE it says failed to load raw file. What other considerations are there when exporting/importing raw files from World Machine?
  7. Rick

    Terrain meshes

    Thanks Rastar! I'm torn on spending $99 for an experiment, but it's nice to know it has this functionality.
  8. Does anyone know of any software that can make a large terrain and then split it up and export each section as a model?
  9. I'm curious as to how you would go about making an LOD system given LE 3.1 as it stands today. The only way I can think of is by using the common entities between ForEachEntityInAABBD0() and ForEachVisibleEntityDo() around the player at different sizes to get the various levels, where anything outside uses the lowest poly model as the default model. I'm thinking of attaching a script to every model that needs this functionality and having it load all the LOD models in Start() (the models would be script parameters), and in UpdateWorld() always showing the lowest poly model. Then in App:Loop() after the world is updated, running the this LOD code to switch what models are shown based on the camera position and the AABB's around it. Any other ideas on how to do this?
  10. LE is really a 3D engine. It does have some 2D functions though so if you wanted you could make a 2D game with it Your drawing commands: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/context/ The most lacking functionality would be drawing a sub image from a texture file. You could put in a pivot into your scene, and attach an entity script to it. Then you can use PostRender(context) to draw all your stuff. You could also do all the drawing in App:Loop() after the world is drawn.
  11. Don't make a frustrating game and people won't feel the need to cheat . The argument goes both ways. They could get frustrated and stop playing as well. I don't think this is a good argument for this functionality as it can go both ways. There really isn't any valid argument for this. If you're the kind of person who wants to cheat at a singleplayer game then you will find a way. Personally it never even occurs for me to try, but if someone wants too who are we to stop them? They paid their money to you already and either they want to enjoy it with cheating or you made it too difficult.
  12. Oh ok that was the different then and still is for the request above. It needs to be per entity. That's why SetColor was used! I knew there was a reason.
  13. The entity is the gatekeeper to all information about the entity. local pos = entity:GetPosition()
  14. wtf Why did you let me use SetColor() back in the day then shadmar
  15. You could probably find some Lua specific library for this, but I would say that it's sort of a pointless task. The only data you would want to store would be for single player (you would never store anything of importance on the client side in a multiplayer game), and if it's singleplayer does it really matter? If the user wants to cheat then why would you care if that's how they choose to play your game? Also any sort of encryption all done on the users machine will be hacked anyway. You can't store anything securely on a client machine. You can make it slightly harder to get at, but all it takes is one person to crack it (which if your game is at all popular will happen) and share how it's done on the internet for all to do the same and all your efforts were for nothing. As I said though, google for Lua encryption and I'm sure you'll find some Lua library for it.
  16. Oh wow, I didn't know that. That really frees things up! Was that added in 3.0 or 3.1?
  17. There are 2 ways to do this: 1) A custom shader (I created one with the help of shamdar for 3.0) that allows basically a table of textures inside 1 giant texture and it uses the SetColor() function to decide on which one to pick (of course this removes the normal functionality of SetColor() as the data passed to it are bastardized for the selection of what row/col in the texture to use). I think this is the most efficient way to do it. I can't find my shader for this here on the site. I'm sure I have it at home with my 3.0 build (if I still have it installed). I'll see if I can find it when I get home. 2) There is a parameter to Model:Load() that allows you to have separate materials for the returned model but the geometry is instanced still. http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/asset/ I think Unmanaged gives you separate material but shared geometry and CreateNew gives you a non-instanced model completely. I just asked a question around this for loading prefabs as it has this extra parameter in Load() as well. I haven't tested this yet but Josh did reply saying how you can get the prefab to both load scripts AND be Unmanaged. http://www.leadwerks.com/werkspace/topic/8593-how-to-have-prefabs-be-unique-and-load-scripts/
  18. Note that the entity that collided with a trigger box gets passed into the Collision() function by the engine so that should be all you need to know if it's the player or not, by either checking it's key values (entity:GetKeyValue("tag")) or by checking if it has certain variables/functions in the script (if entity.script.GetType ~= nil then type = entity.script:GetType()). Generally you'll pass entities around through script level parameters only if you can't get it another way. For example I have an enemy spawner object that spawns bombs. These bombs need a target to move towards, but the bombs are created at run-time so I can't directly set this in the editor. However, my spawner entity (just a pivot) is setup in the editor at design time and so it can have a parameter that is the target (player or something else) as a script parameter and it can pass on that information to the bombs it creates when it dynamically creates them.
  19. @YouGroove how would you do a day/night cycle with backed shadows? I personally don't think baked shadows look bad, but they aren't as flexible and light source limitations is annoying to me.
  20. I guess I don't agree with this statement. This is why we have schools and teachers. Yes, learning 100% yourself is one path to go, but learning from a mentor/teacher is often a much faster path. Of course everyone still has to code and get their own experience, but teachers are there to help you learn the concepts faster and allow you to ask questions, which can really help the learning process. I believe this is a better learning environment than following a tutorial. I'm not trying to turn people into master programmers here, just help them get started with Lua & Leadwerks.
  21. I have a training session planned for the OP this evening via Team Viewer. If this goes well I do plan on having more of these for people who are newer to help them get started. I'm a very patient person who likes teaching/helping. I know how frustrating it can be when you are new and I think learning from a mentor can really speed things up. So, I'm doing something I always wished someone would have done for me
  22. I guess I would disagree that a prefab could only be used for instancing. It could easily be used to accomplish this also. Creating my own system is possible, but I'm trying to point things out that would help the engine be better as well.
  23. Sent you a PM. Let's talk, because I've had some ideas on something I want to try out that might be a good fit for.
  24. I do change the material at run-time to get this effect, but since the models are instances of each other they share a material which means when 1 changes they all change. There is a way when loading models (not prefabs) to make model instances that use their own material, and I need to do this with prefabs. For now I guess I could use SetColor() to shade everything red though, but this would still be nice. [edit] The red shading doesn't look at good because the body is black and you can't see the change. In what I was doing I made another texture that painted the black body red, which is a much better effect. The original question stands.
  25. I want to be able to push back an entity in a "backward" direction from where the pick that I did for shooting them happened. So they could be sideways point a different way but if I shoot them from the side I want them to be pushed the opposite side, instead of what I currently have which is always backward which assumes I shot them from the front. I'm assuming I use the pickinfo.normal somehow to get this? I'm just not confident with how to use it correctly.
×
×
  • Create New...