Jump to content

Josh

Staff
  • Posts

    24,155
  • Joined

  • Last visited

Everything posted by Josh

  1. I uploaded a slightly modified version of hooks.lua.
  2. That blog is just speculation, and some of the things he says are very incorrect. For example, he is suggesting the large world was achieved by combining one super low-res heightmap with a high frequency detail heightmap.
  3. The way we are handling the forum now is a big improvement.
  4. I updated the file. It's 21 pages now and growing. So far it covers all aspects of scripting, and next I will write about integrating Lua with other languages.
  5. I am adding to this lesson. It's getting quite long, and talks about all aspects of the engine and Lua.
  6. Josh

    Roads in code

    If you just loaded a model and set the target it would actually work automagically.
  7. I think by "procedural" they probably mean they have a series of connected nodes the artist places, and the engine builds a mesh at runtime, sort of like how ours work.
  8. Josh

    Road bug fixed

    Let me know if you find any other problems. I am going through the scripts looking for any errors. This is a good practical lesson in the importance of consistency. B)
  9. Josh

    2.3 Sync

    This should work to set globals in the Lua virtual machine: Function SetScriptObject(name:String,o:Object) Local size:Int=GetStackSize() lua_pushbmaxobject(luastate.L,o) lua_setglobal(luastate.L,name) SetStackSize(size) EndFunction Function GetStackSize:Int() Return lua_gettop(luastate.L) EndFunction Function SetStackSize(size:Int) Local currentsize:Int=GetStackSize() If size<currentsize lua_pop(luastate.L,currentsize-size) EndIf EndFunction
  10. It may be invisible, but it will still be stored in memory and in the lua object table. The class will never get freed either.
  11. I usually like to have a lot of extra checks: function class:CreateObject(model) local object=self.super:CreateObject(model) object.cube=CreateCube() function object:Free() if self.cube~=nil then self.cube:Free() self.cube=nil end self.super:Free() end end Don't forget self.super:Free()!
  12. Josh

    Road bug fixed

    Yes, just apply a different material. I fixed the math function name thing. It's in the sync folder.
  13. Nope. The terrain shader doesn't use a matrix multiplication, for better speed.
  14. Turn on trilinear filtering and set anistropic filtering to 4.0.
  15. You can do quite a bit to the 2.3 editor with scripts.
  16. I added a vcproject to the Transparency and Refraction lesson. I'm going to include a project with each lesson showing the final result. Unfortunately, the Windows 64-bit Program Files convention interferes with this, because the project doesn't know if the header files are in C:\Program Files\Leadwerks Engine SDK or C:\Program Files (x86)\Leadwerks Engine SDK. I am going to make these projects with the header in C:\Leadwerks Engine SDK, and the default installation directory will be moved there as well.
  17. The floor/ceiling sliders can be used to control the opacity.
  18. There are still a few things I can do to improve performance with points lights especially. Multithreading won't actually make that much of a difference, because most of the bottlenecks occur on the GPU.
  19. TerrainHeight will return the height at a specific grid point. Terrain elevation will return an interpolated height at a 3D position in global coordinates.
  20. http://leadwerks.com/werkspace/index.php?/tracker/issue-25-road-position/
  21. The issue is resolved. Sync.
  22. Your first code you posted worked perfectly.
×
×
  • Create New...